@lovrabet/lovrabet-cli 2.1.12 → 2.1.13
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(_0xcba0fe,_0x3e3d5f){const _0x38cb3e=a41_0x19c2,_0x2d6381=_0xcba0fe();while(!![]){try{const _0x481fa1=-parseInt(_0x38cb3e(0x188))/0x1*(-parseInt(_0x38cb3e(0x1a1))/0x2)+parseInt(_0x38cb3e(0x19c))/0x3+-parseInt(_0x38cb3e(0x199))/0x4+-parseInt(_0x38cb3e(0x176))/0x5+-parseInt(_0x38cb3e(0x19b))/0x6*(-parseInt(_0x38cb3e(0x1ac))/0x7)+parseInt(_0x38cb3e(0x1b7))/0x8*(-parseInt(_0x38cb3e(0x1b6))/0x9)+-parseInt(_0x38cb3e(0x183))/0xa*(-parseInt(_0x38cb3e(0x1ca))/0xb);if(_0x481fa1===_0x3e3d5f)break;else _0x2d6381['push'](_0x2d6381['shift']());}catch(_0x265f5d){_0x2d6381['push'](_0x2d6381['shift']());}}}(a41_0x249f,0x7ac28));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x4c8c7={}){const _0x5d3039=a41_0x19c2;return resolve(_0x4c8c7[_0x5d3039(0x1bf)]??homedir(),PRODUCT_CONFIG[_0x5d3039(0x1b9)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x1fff56={}){const _0x4e5444=a41_0x19c2,_0x3c6e51=getServiceRegistryPath(_0x1fff56);if(!existsSync(_0x3c6e51))return emptyServiceRegistry();try{const _0x51fbfe=readFileSync(_0x3c6e51,_0x4e5444(0x1a0));if(!_0x51fbfe[_0x4e5444(0x1c2)]())return emptyServiceRegistry();const _0x39e195=JSON[_0x4e5444(0x195)](_0x51fbfe);if(_0x39e195['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x4e5444(0x198)](_0x4e5444(0x18d)+String(_0x39e195[_0x4e5444(0x181)]),_0x4e5444(0x17c)+_0x3c6e51+'.');if(!Array[_0x4e5444(0x1b5)](_0x39e195[_0x4e5444(0x1c0)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x39e195[_0x4e5444(0x1bd)],'services':_0x39e195[_0x4e5444(0x1c0)]};}catch(_0x5bddfc){if(_0x5bddfc instanceof Error&&_0x5bddfc[_0x4e5444(0x1b4)]===_0x4e5444(0x1c5))throw _0x5bddfc;throw CliErrors['validation'](_0x4e5444(0x193)+_0x3c6e51,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x416304,_0x4e100d={}){const _0x3abe96=a41_0x19c2,_0x268ec9=getServiceRegistryPath(_0x4e100d),_0x40378c=dirname(_0x268ec9);!existsSync(_0x40378c)&&mkdirSync(_0x40378c,{'recursive':!![]});const _0x27d04e=_0x268ec9+_0x3abe96(0x178);try{writeFileSync(_0x27d04e,JSON['stringify'](_0x416304,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x27d04e,_0x268ec9);}catch(_0x328e98){try{unlinkSync(_0x27d04e);}catch{}if(_0x328e98?.['code']===_0x3abe96(0x19a))throw CliErrors['validation']('Cannot\x20write\x20service\x20registry:\x20'+_0x268ec9);throw _0x328e98;}return _0x268ec9;}export function loadServiceManifestFromFile(_0x5a3128){const _0x1bae59=a41_0x19c2,_0x2114bf=resolve(_0x5a3128);if(!existsSync(_0x2114bf))throw CliErrors[_0x1bae59(0x198)](_0x1bae59(0x17d)+_0x5a3128);let _0x4030a6;const _0x46f007=readFileSync(_0x2114bf,'utf8');try{_0x4030a6=JSON['parse'](_0x46f007);}catch{throw CliErrors[_0x1bae59(0x198)](_0x1bae59(0x194)+_0x5a3128,_0x1bae59(0x19f));}const _0x3e168d=sha256(_0x46f007),_0x34bf41=extractLoadedServiceManifests(_0x4030a6,_0x3e168d),_0x35c7f6=aggregateValidationReports(_0x34bf41),_0x37b7ee=_0x34bf41[0x0];return{'filePath':_0x2114bf,'hash':_0x3e168d,'kind':isServiceRegistryLike(_0x4030a6)?_0x1bae59(0x185):'manifest','manifest':_0x37b7ee?.['manifest']??_0x4030a6,'report':_0x35c7f6,'normalizedManifest':_0x34bf41[_0x1bae59(0x17b)]===0x1?_0x37b7ee?.[_0x1bae59(0x1c1)]:undefined,'manifests':_0x34bf41};}export function importServiceManifest(_0x3ce82d,_0x4a37bb={}){const _0x5e392a=a41_0x19c2,_0x36eb8c=loadServiceManifestFromFile(_0x3ce82d);if(!_0x36eb8c[_0x5e392a(0x1ae)]['ok'])throw CliErrors[_0x5e392a(0x198)](formatValidationFailure(_0x36eb8c['report']),_0x5e392a(0x189));if(_0x36eb8c['manifests'][_0x5e392a(0x17b)]===0x0)throw CliErrors[_0x5e392a(0x198)](_0x5e392a(0x182),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x44a487=readServiceRegistry(_0x4a37bb),_0x56da80=(_0x4a37bb[_0x5e392a(0x196)]??(()=>new Date()))()[_0x5e392a(0x187)](),_0x5a00d2=[];let _0x3ea812=0x0,_0x4b3ffa=0x0;for(const _0x4c39ee of _0x36eb8c[_0x5e392a(0x1b2)]){if(!_0x4c39ee[_0x5e392a(0x1c1)])continue;const _0x3eb217=_0x4c39ee[_0x5e392a(0x1c1)][_0x5e392a(0x1a9)][_0x5e392a(0x1a3)],_0x21016f={'serviceCode':_0x3eb217,'version':_0x4c39ee['normalizedManifest'][_0x5e392a(0x1be)],'importedAt':_0x56da80,'source':{'type':_0x5e392a(0x1b8),'path':_0x36eb8c[_0x5e392a(0x180)],'hash':_0x4c39ee[_0x5e392a(0x1a5)]},'manifest':_0x4c39ee[_0x5e392a(0x18c)],'normalizedManifest':_0x4c39ee[_0x5e392a(0x1c1)]},_0x177669=_0x44a487[_0x5e392a(0x1c0)][_0x5e392a(0x197)](_0x2a594f=>_0x2a594f[_0x5e392a(0x18a)]===_0x3eb217);_0x177669>=0x0?(_0x44a487[_0x5e392a(0x1c0)][_0x177669]=_0x21016f,_0x4b3ffa++):(_0x44a487[_0x5e392a(0x1c0)][_0x5e392a(0x1b1)](_0x21016f),_0x3ea812++),_0x5a00d2[_0x5e392a(0x1b1)](_0x21016f);}_0x44a487[_0x5e392a(0x1c0)][_0x5e392a(0x1c3)]((_0x1dd888,_0x173593)=>_0x1dd888['serviceCode'][_0x5e392a(0x186)](_0x173593[_0x5e392a(0x18a)])),_0x44a487['updatedAt']=_0x56da80;const _0x538c67=writeServiceRegistry(_0x44a487,_0x4a37bb);return{'registryPath':_0x538c67,'entry':_0x5a00d2[0x0],'replaced':_0x5a00d2[_0x5e392a(0x17b)]===0x1?_0x4b3ffa===0x1:_0x4b3ffa>0x0,'entries':_0x5a00d2,'imported':_0x3ea812,'updated':_0x4b3ffa,'serviceCount':_0x44a487[_0x5e392a(0x1c0)][_0x5e392a(0x17b)]};}function a41_0x19c2(_0x365d31,_0xd2dab0){_0x365d31=_0x365d31-0x176;const _0x249ff3=a41_0x249f();let _0x19c277=_0x249ff3[_0x365d31];return _0x19c277;}export function exportServiceManifest(_0x500ab5,_0x293f6f,_0x1c29db={}){const _0x4531fc=a41_0x19c2,_0xc31e16=getServiceRegistryPath(_0x1c29db),_0x4a3a0f=getLocalServiceEntry(_0x500ab5,_0x1c29db);if(!_0x4a3a0f)throw CliErrors[_0x4531fc(0x198)](_0x4531fc(0x1aa)+_0x500ab5,_0x4531fc(0x1b0));const _0x4a2cbb=resolve(_0x293f6f),_0x3978d1=dirname(_0x4a2cbb);return!existsSync(_0x3978d1)&&mkdirSync(_0x3978d1,{'recursive':!![]}),writeFileSync(_0x4a2cbb,JSON[_0x4531fc(0x1bc)](_0x4a3a0f[_0x4531fc(0x18c)],null,0x2)+'\x0a',{'encoding':_0x4531fc(0x1a0),'mode':0x180}),{'registryPath':_0xc31e16,'filePath':_0x4a2cbb,'entry':_0x4a3a0f};}export function removeServiceManifest(_0xd06f6,_0x21416f={}){const _0x14c32e=a41_0x19c2,_0x4246c3=readServiceRegistry(_0x21416f),_0xfab58d=_0xd06f6['trim'](),_0x3865a5=_0x4246c3[_0x14c32e(0x1c0)][_0x14c32e(0x197)](_0x29f0d5=>_0x29f0d5['serviceCode']===_0xfab58d);if(_0x3865a5<0x0)throw CliErrors['validation']('Local\x20service\x20not\x20found:\x20'+_0xfab58d,_0x14c32e(0x1b0));const [_0x314361]=_0x4246c3[_0x14c32e(0x1c0)][_0x14c32e(0x19d)](_0x3865a5,0x1),_0x53c1df=(_0x21416f[_0x14c32e(0x196)]??(()=>new Date()))()[_0x14c32e(0x187)]();_0x4246c3[_0x14c32e(0x1bd)]=_0x53c1df;const _0x597350=writeServiceRegistry(_0x4246c3,_0x21416f);return{'registryPath':_0x597350,'entry':_0x314361,'serviceCount':_0x4246c3[_0x14c32e(0x1c0)][_0x14c32e(0x17b)]};}export function listLocalServices(_0x56f357={}){const _0x2bb685=a41_0x19c2;return readServiceRegistry(_0x56f357)[_0x2bb685(0x1c0)];}export function getLocalServiceEntry(_0x4cfb18,_0x443465={}){const _0x25ba97=a41_0x19c2;return readServiceRegistry(_0x443465)[_0x25ba97(0x1c0)]['find'](_0x3f293e=>_0x3f293e[_0x25ba97(0x18a)]===_0x4cfb18[_0x25ba97(0x1c2)]());}export function listLocalServiceTrees(_0xf103f9={}){const _0x5f5325=a41_0x19c2;return readServiceRegistry(_0xf103f9)['services']['map'](_0x30570d=>_0x30570d[_0x5f5325(0x1c1)]);}export function inspectServiceRegistry(_0x3b85ea={}){const _0x217a67=a41_0x19c2,_0x3fc654=getServiceRegistryPath(_0x3b85ea);if(!existsSync(_0x3fc654))return emptyServiceRegistryInspection(_0x3fc654,_0x217a67(0x17f),![]);try{const _0x2e179f=readFileSync(_0x3fc654,_0x217a67(0x1a0));if(!_0x2e179f['trim']())return emptyServiceRegistryInspection(_0x3fc654,'empty',!![]);const _0x348f8c=JSON[_0x217a67(0x195)](_0x2e179f);if(_0x348f8c['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x3fc654,_0x217a67(0x1ab),!![]),'schemaVersion':_0x348f8c[_0x217a67(0x181)],'message':'Unsupported\x20schemaVersion:\x20'+String(_0x348f8c[_0x217a67(0x181)])};if(!Array[_0x217a67(0x1b5)](_0x348f8c[_0x217a67(0x1c0)]))return{...emptyServiceRegistryInspection(_0x3fc654,_0x217a67(0x1ab),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x348f8c['updatedAt'],'message':_0x217a67(0x1a8)};const _0x107b1f=_0x348f8c[_0x217a67(0x1c0)][_0x217a67(0x184)](summarizeLocalServiceEntry);return{'registryPath':_0x3fc654,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x348f8c[_0x217a67(0x1bd)],'serviceCount':_0x107b1f['length'],'commandCount':_0x107b1f[_0x217a67(0x179)]((_0x1f0602,_0x2f6de6)=>_0x1f0602+_0x2f6de6['commandCount'],0x0),'services':_0x107b1f};}catch(_0x479859){return{...emptyServiceRegistryInspection(_0x3fc654,_0x217a67(0x1ab),!![]),'message':_0x479859 instanceof Error?_0x479859[_0x217a67(0x191)]:String(_0x479859)};}}function a41_0x249f(){const _0x585e17=['Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','serviceCode','].manifest.','manifest','Unsupported\x20service\x20registry\x20schemaVersion:\x20','object','source','flatMap','message','update','Invalid\x20service\x20registry\x20JSON:\x20','Invalid\x20service\x20manifest\x20JSON:\x20','parse','now','findIndex','validation','2350084MAkoFI','ENOENT','5387706wIxjoP','2313735FVMleh','splice','slice','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','utf8','234FVMODv','commands','code','startsWith','sourceHash','errors','risk','services\x20must\x20be\x20an\x20array','service','Local\x20service\x20not\x20found:\x20','invalid','7gjVhqA','path','report','description','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','push','manifests','cliPath','name','isArray','989838ObXZWI','56zgPsUH','file','homeDirName','hex','registryIndex','stringify','updatedAt','version','homeDir','services','normalizedManifest','trim','sort','sha256','CliError','$.services[','Service\x20manifest\x20validation\x20failed:\x0a','warnings','target','180114TSllAr','3077020EVkDiB','].manifest','.tmp','reduce','kind','length','Remove\x20or\x20migrate\x20','Service\x20manifest\x20file\x20not\x20found:\x20','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','missing','filePath','schemaVersion','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','90YoMjgt','map','registry','localeCompare','toISOString','5633jsdwaL'];a41_0x249f=function(){return _0x585e17;};return a41_0x249f();}export function formatValidationFailure(_0x160540){const _0x4517b9=a41_0x19c2,_0x38d214=_0x160540['errors']['map'](_0x4d365d=>_0x4d365d[_0x4517b9(0x1ad)]+':\x20'+_0x4d365d[_0x4517b9(0x191)]);return _0x4517b9(0x1c7)+_0x38d214['join']('\x0a');}function extractLoadedServiceManifests(_0x67aa9b,_0x73e62b){const _0x2b22b6=a41_0x19c2;if(!isServiceRegistryLike(_0x67aa9b)){const _0x1cc564=_0x67aa9b,{manifest:_0x2a4598,errors:_0x4b3913}=adaptServiceTreeManifestForLegacyFramework(_0x1cc564),_0x387e3e=validateServiceTreeManifest(_0x2a4598),_0x112f34=mergeValidationErrors(_0x387e3e,_0x4b3913);return[{'manifest':_0x1cc564,'report':_0x112f34,'normalizedManifest':_0x112f34['ok']?normalizeServiceTreeManifest(_0x2a4598):undefined,'sourceHash':_0x73e62b}];}return _0x67aa9b['services'][_0x2b22b6(0x184)]((_0x2976d5,_0x38ab25)=>{const _0x492942=_0x2b22b6,_0x435df0=isObjectRecord(_0x2976d5)?_0x2976d5[_0x492942(0x18c)]:undefined,{manifest:_0x525367,errors:_0x2993a5}=adaptServiceTreeManifestForLegacyFramework(_0x435df0),_0x1a1282=validateServiceTreeManifest(_0x525367),_0x4bd709=mergeValidationErrors(_0x1a1282,_0x2993a5),_0x11ce53=isObjectRecord(_0x2976d5)&&typeof _0x2976d5['serviceCode']==='string'?_0x2976d5[_0x492942(0x18a)]:undefined;return{'manifest':_0x435df0,'report':_0x4bd709,'normalizedManifest':_0x4bd709['ok']?normalizeServiceTreeManifest(_0x525367):undefined,'sourceHash':sha256(JSON[_0x492942(0x1bc)](_0x435df0,null,0x2)+'\x0a'),'registryIndex':_0x38ab25,'registryServiceCode':_0x11ce53};});}function mergeValidationErrors(_0x5a383c,_0x83b5d7){const _0x1d094a=a41_0x19c2,_0x230cef=_0x5a383c[_0x1d094a(0x1a6)][_0x1d094a(0x184)](_0x1ba1a3=>_0x1ba1a3[_0x1d094a(0x191)]===_0x1d094a(0x17e)?{..._0x1ba1a3,'message':'bff\x20target\x20requires\x20functionName.'}:_0x1ba1a3),_0x3699c8=[..._0x83b5d7,..._0x230cef];return{'ok':_0x3699c8[_0x1d094a(0x17b)]===0x0,'errors':_0x3699c8,'warnings':_0x5a383c[_0x1d094a(0x1c8)]};}function aggregateValidationReports(_0x3a2da8){const _0x176d8b=a41_0x19c2,_0x520f1d=_0x3a2da8['flatMap'](_0x184444=>_0x184444[_0x176d8b(0x1bb)]===undefined?_0x184444[_0x176d8b(0x1ae)][_0x176d8b(0x1a6)]:_0x184444[_0x176d8b(0x1ae)][_0x176d8b(0x1a6)][_0x176d8b(0x184)](_0x54426c=>({..._0x54426c,'path':prefixRegistryIssuePath(_0x184444['registryIndex'],_0x54426c[_0x176d8b(0x1ad)])}))),_0x18e60e=_0x3a2da8[_0x176d8b(0x190)](_0x152277=>_0x152277['registryIndex']===undefined?_0x152277[_0x176d8b(0x1ae)]['warnings']:_0x152277[_0x176d8b(0x1ae)][_0x176d8b(0x1c8)]['map'](_0x190e55=>({..._0x190e55,'path':prefixRegistryIssuePath(_0x152277[_0x176d8b(0x1bb)],_0x190e55[_0x176d8b(0x1ad)])})));return{'ok':_0x520f1d[_0x176d8b(0x17b)]===0x0,'errors':_0x520f1d,'warnings':_0x18e60e};}function prefixRegistryIssuePath(_0x15496b,_0x48f8f2){const _0x3f0ac0=a41_0x19c2;if(_0x48f8f2==='$')return _0x3f0ac0(0x1c6)+_0x15496b+'].manifest';if(_0x48f8f2[_0x3f0ac0(0x1a4)]('$.'))return'$.services['+_0x15496b+_0x3f0ac0(0x177)+_0x48f8f2[_0x3f0ac0(0x19e)](0x1);if(_0x48f8f2[_0x3f0ac0(0x1a4)]('$['))return _0x3f0ac0(0x1c6)+_0x15496b+_0x3f0ac0(0x177)+_0x48f8f2[_0x3f0ac0(0x19e)](0x1);return _0x3f0ac0(0x1c6)+_0x15496b+_0x3f0ac0(0x18b)+_0x48f8f2;}function isServiceRegistryLike(_0x47e349){const _0xb3d9a2=a41_0x19c2;return isObjectRecord(_0x47e349)&&_0x47e349[_0xb3d9a2(0x181)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0xb3d9a2(0x1b5)](_0x47e349[_0xb3d9a2(0x1c0)]);}function isObjectRecord(_0x35274f){const _0x532c8f=a41_0x19c2;return Boolean(_0x35274f)&&typeof _0x35274f===_0x532c8f(0x18e)&&!Array[_0x532c8f(0x1b5)](_0x35274f);}function emptyServiceRegistryInspection(_0x5780ad,_0x3f4e78,_0x4c21c6){return{'registryPath':_0x5780ad,'exists':_0x4c21c6,'status':_0x3f4e78,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x210751){const _0x249c00=a41_0x19c2,_0x15b527=_0x210751[_0x249c00(0x1c1)],_0x2f8ccb=_0x15b527[_0x249c00(0x1a2)][_0x249c00(0x184)](_0xc66022=>({'path':_0xc66022[_0x249c00(0x1b3)],'description':_0xc66022[_0x249c00(0x1af)],'risk':_0xc66022[_0x249c00(0x1a7)],'targetKind':_0xc66022['target'][_0x249c00(0x17a)],'targetCommand':_0xc66022[_0x249c00(0x1c9)]['command']}));return{'serviceCode':_0x210751[_0x249c00(0x18a)],'name':_0x15b527['service'][_0x249c00(0x1b4)],'description':_0x15b527[_0x249c00(0x1a9)][_0x249c00(0x1af)],'version':_0x210751[_0x249c00(0x1be)],'importedAt':_0x210751['importedAt'],'source':_0x210751[_0x249c00(0x18f)],'commandCount':_0x2f8ccb[_0x249c00(0x17b)],'commands':_0x2f8ccb};}function sha256(_0x35fc8a){const _0x5c09e9=a41_0x19c2;return createHash(_0x5c09e9(0x1c4))[_0x5c09e9(0x192)](_0x35fc8a)['digest'](_0x5c09e9(0x1ba));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a42_0x2e9f(){const _0x44076f=['isDirectory','map','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','trim','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','Refusing\x20to\x20overwrite\x20symlink:\x20','force','1101423tCoUjv','create','46809wALmxC','6eryPhf','WRITE','files','4PiYDgu','type','172193eoQOco','210GbgfmG','1895NncLJm','1108ewgTPQ','name','22RSatAF','Skill\x20directory\x20already\x20exists:\x20','942324eZHmXR','utf8','3167600PqnQFB','target','isSymbolicLink','path','skillDir','rendered','str','1443106INABwG','skillName'];a42_0x2e9f=function(){return _0x44076f;};return a42_0x2e9f();}const a42_0x45450f=a42_0x1972;(function(_0x244887,_0x199a8e){const _0x41a3dd=a42_0x1972,_0x46504b=_0x244887();while(!![]){try{const _0x23b289=-parseInt(_0x41a3dd(0xb8))/0x1*(-parseInt(_0x41a3dd(0xb6))/0x2)+-parseInt(_0x41a3dd(0xb0))/0x3+-parseInt(_0x41a3dd(0xbb))/0x4*(-parseInt(_0x41a3dd(0xba))/0x5)+parseInt(_0x41a3dd(0xb3))/0x6*(-parseInt(_0x41a3dd(0xc8))/0x7)+parseInt(_0x41a3dd(0xc1))/0x8+parseInt(_0x41a3dd(0xb2))/0x9*(parseInt(_0x41a3dd(0xb9))/0xa)+parseInt(_0x41a3dd(0xbd))/0xb*(-parseInt(_0x41a3dd(0xbf))/0xc);if(_0x23b289===_0x199a8e)break;else _0x46504b['push'](_0x46504b['shift']());}catch(_0x268280){_0x46504b['push'](_0x46504b['shift']());}}}(a42_0x2e9f,0x36bbb));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';function a42_0x1972(_0xcfa1c7,_0xe39fc9){_0xcfa1c7=_0xcfa1c7-0xa8;const _0x2e9f53=a42_0x2e9f();let _0x1972a4=_0x2e9f53[_0xcfa1c7];return _0x1972a4;}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':'skill','command':a42_0x45450f(0xb1),'description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x530c0f){const _0x45a0eb=a42_0x45450f,_0x4f7b1e=buildSkillCreatePlan(_0x530c0f['str']('name'),_0x530c0f[_0x45a0eb(0xc7)]('type'),_0x530c0f['str'](_0x45a0eb(0xc2)));return{'method':_0x45a0eb(0xb4),'url':_0x4f7b1e[_0x45a0eb(0xc5)],'body':{'skillName':_0x4f7b1e[_0x45a0eb(0xc6)][_0x45a0eb(0xa8)],'type':_0x4f7b1e['rendered']['type'],'selfContained':!![],'files':_0x4f7b1e[_0x45a0eb(0xc6)][_0x45a0eb(0xb5)][_0x45a0eb(0xaa)](_0x445052=>_0x445052[_0x45a0eb(0xc4)])},'description':_0x45a0eb(0xab)};},async 'execute'(_0xc83c77){const _0x465368=a42_0x45450f,_0x2f96c1=buildSkillCreatePlan(_0xc83c77['str'](_0x465368(0xbc)),_0xc83c77['str'](_0x465368(0xb7)),_0xc83c77[_0x465368(0xc7)](_0x465368(0xc2)));return writeSkillDraft(_0x2f96c1,_0xc83c77['bool'](_0x465368(0xaf))),{'ok':!![],'data':{'skillName':_0x2f96c1[_0x465368(0xc6)]['skillName'],'type':_0x2f96c1[_0x465368(0xc6)]['type'],'dir':_0x2f96c1[_0x465368(0xc5)],'files':_0x2f96c1[_0x465368(0xc6)][_0x465368(0xb5)][_0x465368(0xaa)](_0x2fd034=>_0x2fd034[_0x465368(0xc4)])},'message':'Created\x20local\x20Skill\x20draft\x20'+_0x2f96c1[_0x465368(0xc6)][_0x465368(0xa8)]};}};function buildSkillCreatePlan(_0x29baaf,_0x37cf97,_0x541d67){const _0x2ef20a=a42_0x45450f,_0x19c585=renderSkillTemplate({'skillName':_0x29baaf,'type':_0x37cf97}),_0x4a2c2f=resolve(normalizeSkillTarget(_0x541d67));return{'rendered':_0x19c585,'targetRoot':_0x4a2c2f,'skillDir':resolve(_0x4a2c2f,_0x19c585[_0x2ef20a(0xa8)])};}function normalizeSkillTarget(_0x34a873){const _0xb7a921=a42_0x45450f;return(_0x34a873||DEFAULT_SKILL_TARGET)[_0xb7a921(0xac)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x4afcf9,_0x2f57e8){const _0xf24360=a42_0x45450f;if(existsSync(_0x4afcf9[_0xf24360(0xc5)])){const _0x599b8e=lstatSync(_0x4afcf9[_0xf24360(0xc5)]);if(!_0x599b8e[_0xf24360(0xa9)]()||_0x599b8e[_0xf24360(0xc3)]())throw CliErrors['validation']('Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20'+_0x4afcf9[_0xf24360(0xc5)]);if(!_0x2f57e8)throw CliErrors['validation'](_0xf24360(0xbe)+_0x4afcf9[_0xf24360(0xc5)],_0xf24360(0xad));}for(const _0x44fcef of _0x4afcf9[_0xf24360(0xc6)][_0xf24360(0xb5)]){const _0x4375e8=resolve(_0x4afcf9[_0xf24360(0xc5)],_0x44fcef[_0xf24360(0xc4)]),_0x1a3fc4=dirname(_0x4375e8);mkdirSync(_0x1a3fc4,{'recursive':!![]});if(existsSync(_0x4375e8)&&lstatSync(_0x4375e8)[_0xf24360(0xc3)]())throw CliErrors['validation'](_0xf24360(0xae)+_0x4375e8);writeFileSync(_0x4375e8,_0x44fcef['content'],_0xf24360(0xc0));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x2f06f2=a43_0x57a6;(function(_0x465813,_0x521b3d){const _0x170bc4=a43_0x57a6,_0x42af70=_0x465813();while(!![]){try{const _0x559c65=parseInt(_0x170bc4(0x175))/0x1+parseInt(_0x170bc4(0x17e))/0x2*(-parseInt(_0x170bc4(0x180))/0x3)+-parseInt(_0x170bc4(0x17a))/0x4*(-parseInt(_0x170bc4(0x168))/0x5)+-parseInt(_0x170bc4(0x15f))/0x6*(parseInt(_0x170bc4(0x18b))/0x7)+-parseInt(_0x170bc4(0x186))/0x8*(parseInt(_0x170bc4(0x17d))/0x9)+parseInt(_0x170bc4(0x16f))/0xa*(parseInt(_0x170bc4(0x17b))/0xb)+parseInt(_0x170bc4(0x161))/0xc;if(_0x559c65===_0x521b3d)break;else _0x42af70['push'](_0x42af70['shift']());}catch(_0x1eefd5){_0x42af70['push'](_0x42af70['shift']());}}}(a43_0x5497,0xe28a3));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a43_0x5497(){const _0x1ebc53=['updated','all','company','\x20company\x20Skill(s).','code','269608dfYtTu','skillCode','../../../core/api-client.js','action','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','7uxGwBI','includes','unchanged','8741562oWlBFK','accessKey','22913004kpRUCw','filter','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','authRequired','scope','length','reduce','1355LEZRQH','\x20personal\x20and\x20','production','write','trim','removed','skipped','14584580bvIbox','version','map','skill','created','force','244318klwIkA','Installed\x20','appCode','flatMap','str','2892GdUxlG','11FoVkEl','install','63hBElwG','2yOBugt','personal','3562155SfcHJa'];a43_0x5497=function(){return _0x1ebc53;};return a43_0x5497();}function a43_0x57a6(_0x3edd58,_0x100388){_0x3edd58=_0x3edd58-0x15e;const _0x5497b4=a43_0x5497();let _0x57a61f=_0x5497b4[_0x3edd58];return _0x57a61f;}import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a43_0x2f06f2(0x172),'command':a43_0x2f06f2(0x17c),'description':a43_0x2f06f2(0x163),'risk':a43_0x2f06f2(0x16b),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x56c42e){return syncRuntimeSkills(_0x56c42e);}};async function syncRuntimeSkills(_0x356950){const _0x57f725=a43_0x2f06f2,{downloadRuntimeSkillPackage:_0x1d0918,listRuntimeSkills:_0xeebc6}=await import(_0x57f725(0x188)),{linkEffectiveRuntimeSkills:_0x24ad26,materializeRuntimeSkill:_0xc1955f,pruneStaleRuntimeSkillCache:_0x10b8e2,pruneStaleRuntimeSkillLinks:_0x31fa0f}=await import('../../../skills/runtime-skill-sync.js'),_0x5999e6=_0x356950[_0x57f725(0x179)](_0x57f725(0x185)),_0x4ad632=normalizeSyncScopes(_0x356950['str'](_0x57f725(0x165))),_0x1b1710=_0x356950['envName']??_0x57f725(0x16a),_0x348a9b=_0x356950[_0x57f725(0x160)],_0x337682=_0x356950['bool'](_0x57f725(0x174));if(!_0x348a9b)throw CliErrors[_0x57f725(0x164)](_0x57f725(0x18a));const _0xf90354=await Promise[_0x57f725(0x182)](_0x4ad632[_0x57f725(0x171)](_0x1cb58b=>_0xeebc6({'appCode':_0x356950[_0x57f725(0x177)],'scope':_0x1cb58b,'code':_0x5999e6[_0x57f725(0x16c)]()||undefined}))),_0x278741=_0x4ad632[_0x57f725(0x18c)](_0x57f725(0x17f))?_0xf90354[_0x57f725(0x178)]((_0x79e2d4,_0x2a053d)=>_0x4ad632[_0x2a053d]==='personal'?_0x79e2d4[_0x57f725(0x17f)]:[]):[],_0x92e04f=_0x4ad632[_0x57f725(0x18c)](_0x57f725(0x183))?_0xf90354[_0x57f725(0x178)]((_0x205fc3,_0x2279ab)=>_0x4ad632[_0x2279ab]===_0x57f725(0x183)?_0x205fc3[_0x57f725(0x183)]:[]):[],_0x53a9da=new Set([..._0x278741[_0x57f725(0x171)](_0x3123b4=>_0x3123b4[_0x57f725(0x187)]?.[_0x57f725(0x16c)]())[_0x57f725(0x162)](_0x14a2aa=>Boolean(_0x14a2aa)),..._0x92e04f[_0x57f725(0x171)](_0x90f3d8=>_0x90f3d8[_0x57f725(0x187)]?.[_0x57f725(0x16c)]())[_0x57f725(0x162)](_0x31e6aa=>Boolean(_0x31e6aa))]),_0x10c528=_0x5999e6[_0x57f725(0x16c)]()?[_0x5999e6['trim']()]:undefined,_0xfb51ea=_0x4ad632['length']===0x2&&_0x4ad632[_0x57f725(0x18c)](_0x57f725(0x17f))&&_0x4ad632[_0x57f725(0x18c)](_0x57f725(0x183)),_0x21e998=_0xfb51ea?_0x31fa0f(_0x356950['appCode'],_0x53a9da,{},_0x10c528):[],_0x590611=_0x10b8e2({'env':_0x1b1710,'accessKey':_0x348a9b,'appCode':_0x356950[_0x57f725(0x177)],'activeSkillCodes':_0x53a9da,'pruneSkillCodes':_0x10c528,'scopes':_0x4ad632}),_0x3e4f2c=[];for(const _0x4563f4 of _0x278741){_0x3e4f2c['push'](_0xc1955f(_0x4563f4,_0x57f725(0x17f),{'env':_0x1b1710,'accessKey':_0x348a9b,'appCode':_0x356950[_0x57f725(0x177)],'force':_0x337682,'packageBytes':await downloadSkillPackage(_0x4563f4,'personal',_0x356950['appCode'],_0x1d0918)}));}for(const _0x30ec0e of _0x92e04f){_0x3e4f2c['push'](_0xc1955f(_0x30ec0e,_0x57f725(0x183),{'env':_0x1b1710,'accessKey':_0x348a9b,'appCode':_0x356950['appCode'],'force':_0x337682,'packageBytes':await downloadSkillPackage(_0x30ec0e,_0x57f725(0x183),_0x356950[_0x57f725(0x177)],_0x1d0918)}));}const _0x294a7d=_0x24ad26(_0x3e4f2c,_0x356950[_0x57f725(0x177)]),_0x237c41=countLinkActions(_0x294a7d);return{'ok':!![],'data':{'appCode':_0x356950[_0x57f725(0x177)],'personal':_0x278741[_0x57f725(0x166)],'company':_0x92e04f[_0x57f725(0x166)],'materialized':_0x3e4f2c[_0x57f725(0x166)],'links':{'total':_0x294a7d[_0x57f725(0x166)],'created':_0x237c41[_0x57f725(0x173)]??0x0,'updated':_0x237c41[_0x57f725(0x181)]??0x0,'unchanged':_0x237c41[_0x57f725(0x15e)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x21e998[_0x57f725(0x162)](_0x921dc4=>_0x921dc4['action']===_0x57f725(0x16d))[_0x57f725(0x166)],'cacheDirs':_0x590611['filter'](_0x58a28f=>_0x58a28f['action']===_0x57f725(0x16d))[_0x57f725(0x166)],'skipped':[..._0x21e998,..._0x590611][_0x57f725(0x162)](_0x2502ba=>_0x2502ba[_0x57f725(0x189)]===_0x57f725(0x16e))[_0x57f725(0x166)]},'skills':{'personal':_0x278741[_0x57f725(0x171)](summarizeRuntimeSkill),'company':_0x92e04f[_0x57f725(0x171)](summarizeRuntimeSkill)}},'message':_0x57f725(0x176)+_0x278741[_0x57f725(0x166)]+_0x57f725(0x169)+_0x92e04f['length']+_0x57f725(0x184)};}async function downloadSkillPackage(_0x3e0a07,_0x1dc1e7,_0x11717b,_0x30224c){const _0x188704=a43_0x2f06f2,_0xbeba2e=_0x3e0a07[_0x188704(0x170)]?.[_0x188704(0x16c)]();return _0xbeba2e?_0x30224c(_0x1dc1e7,_0x3e0a07['skillCode'],_0x11717b,_0xbeba2e):_0x30224c(_0x1dc1e7,_0x3e0a07[_0x188704(0x187)],_0x11717b);}function countLinkActions(_0xae7f99){const _0x362243=a43_0x2f06f2;return _0xae7f99[_0x362243(0x167)]((_0x38f840,_0x5e572d)=>{const _0x31b823=_0x362243;return _0x38f840[_0x5e572d[_0x31b823(0x189)]]=(_0x38f840[_0x5e572d['action']]??0x0)+0x1,_0x38f840;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x417570=a44_0x18d5;function a44_0x18d5(_0x40890e,_0x5a1438){_0x40890e=_0x40890e-0x15e;const _0x50a694=a44_0x50a6();let _0x18d5c7=_0x50a694[_0x40890e];return _0x18d5c7;}function a44_0x50a6(){const _0x4ab451=['personal','233058yKxAXo','map','\x20local\x20Skill(s).','company','skill','appCode','1094409hvhukk','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','code','4192388LMeVTg','scope','Listed\x20','remote','1128nTBKCa','envName','\x20remote\x20Skill(s).','13710WoNrXk','str','builtin','20120296xeDgQN','bool','1722286Hqzvry','list','accessKey','7872676PjxOky','length','local','filter','../../../skills/runtime-skill-sync.js','trim','read'];a44_0x50a6=function(){return _0x4ab451;};return a44_0x50a6();}(function(_0x4bb3d5,_0x22d0c8){const _0x48fc03=a44_0x18d5,_0x2e563c=_0x4bb3d5();while(!![]){try{const _0x4ab4cb=-parseInt(_0x48fc03(0x16a))/0x1+-parseInt(_0x48fc03(0x15f))/0x2+-parseInt(_0x48fc03(0x170))/0x3+-parseInt(_0x48fc03(0x173))/0x4+parseInt(_0x48fc03(0x17a))/0x5*(-parseInt(_0x48fc03(0x177))/0x6)+parseInt(_0x48fc03(0x162))/0x7+parseInt(_0x48fc03(0x17d))/0x8;if(_0x4ab4cb===_0x22d0c8)break;else _0x2e563c['push'](_0x2e563c['shift']());}catch(_0x921254){_0x2e563c['push'](_0x2e563c['shift']());}}}(a44_0x50a6,0x96a94));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';export const listCommand={'service':a44_0x417570(0x16e),'command':a44_0x417570(0x160),'description':a44_0x417570(0x171),'risk':a44_0x417570(0x168),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x2b3d9f){const _0x3556d7=a44_0x417570,_0x858c29=_0x2b3d9f[_0x3556d7(0x17b)](_0x3556d7(0x172)),_0x2f0d08=normalizeListScope(_0x2b3d9f[_0x3556d7(0x17b)]('scope'));if(_0x2b3d9f[_0x3556d7(0x15e)](_0x3556d7(0x164))){const _0x782f9a=_0x2b3d9f[_0x3556d7(0x161)];if(!_0x782f9a)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x43a12b}=await import(_0x3556d7(0x166)),_0x225d24=_0x43a12b({'env':_0x2b3d9f[_0x3556d7(0x178)]??'production','accessKey':_0x782f9a,'appCode':_0x2b3d9f[_0x3556d7(0x16f)],'scopes':listScopeToRuntimeScopes(_0x2f0d08),'code':_0x858c29[_0x3556d7(0x167)]()||undefined}),_0x151e2e=groupLocalRuntimeSkills(_0x225d24);return{'ok':!![],'data':{'appCode':_0x2b3d9f[_0x3556d7(0x16f)],'source':'local','scope':_0x2f0d08,'total':_0x225d24[_0x3556d7(0x163)],'personal':_0x151e2e[_0x3556d7(0x169)]['length'],'company':_0x151e2e[_0x3556d7(0x16d)][_0x3556d7(0x163)],'items':_0x225d24[_0x3556d7(0x16b)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x151e2e[_0x3556d7(0x169)][_0x3556d7(0x16b)](summarizeLocalRuntimeSkill),'company':_0x151e2e['company'][_0x3556d7(0x16b)](summarizeLocalRuntimeSkill)}},'message':_0x3556d7(0x175)+_0x225d24[_0x3556d7(0x163)]+_0x3556d7(0x16c)};}const {listRuntimeSkills:_0x373ea4}=await import('../../../core/api-client.js'),_0x3e9233=await _0x373ea4({'appCode':_0x2b3d9f['appCode'],'scope':listScopeToRemoteScope(_0x2f0d08),'code':_0x858c29[_0x3556d7(0x167)]()||undefined}),_0x2d916e=shouldListScope(_0x2f0d08,'personal')?_0x3e9233['personal']??[]:[],_0x247635=shouldListScope(_0x2f0d08,'company')?_0x3e9233[_0x3556d7(0x16d)]??[]:[],_0x414cd6=[..._0x2d916e,..._0x247635];return{'ok':!![],'data':{'appCode':_0x2b3d9f[_0x3556d7(0x16f)],'source':_0x3556d7(0x176),'scope':_0x2f0d08,'total':_0x414cd6[_0x3556d7(0x163)],'personal':_0x2d916e[_0x3556d7(0x163)],'company':_0x247635[_0x3556d7(0x163)],'items':_0x414cd6['map'](summarizeRuntimeSkill),'skills':{'personal':_0x2d916e[_0x3556d7(0x16b)](summarizeRuntimeSkill),'company':_0x247635[_0x3556d7(0x16b)](summarizeRuntimeSkill)}},'message':'Listed\x20'+_0x414cd6[_0x3556d7(0x163)]+_0x3556d7(0x179)};}};function groupLocalRuntimeSkills(_0x15b83b){const _0x233da0=a44_0x417570;return{'personal':_0x15b83b[_0x233da0(0x165)](_0x12e6f2=>_0x12e6f2[_0x233da0(0x174)]===_0x233da0(0x169)),'company':_0x15b83b['filter'](_0x3e4c1c=>_0x3e4c1c[_0x233da0(0x174)]==='company'),'builtin':_0x15b83b['filter'](_0x1f3148=>_0x1f3148[_0x233da0(0x174)]===_0x233da0(0x17c))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a45_0x25c17f=a45_0x4119;function a45_0x4119(_0x3f4b38,_0x4c9061){_0x3f4b38=_0x3f4b38-0x173;const _0x2d2440=a45_0x2d24();let _0x41192b=_0x2d2440[_0x3f4b38];return _0x41192b;}(function(_0x5010b5,_0x38dbd9){const _0x5dbc5a=a45_0x4119,_0x54efa3=_0x5010b5();while(!![]){try{const _0x56f8b7=-parseInt(_0x5dbc5a(0x174))/0x1+parseInt(_0x5dbc5a(0x179))/0x2*(-parseInt(_0x5dbc5a(0x178))/0x3)+parseInt(_0x5dbc5a(0x180))/0x4*(-parseInt(_0x5dbc5a(0x17b))/0x5)+parseInt(_0x5dbc5a(0x17d))/0x6*(parseInt(_0x5dbc5a(0x181))/0x7)+-parseInt(_0x5dbc5a(0x176))/0x8*(parseInt(_0x5dbc5a(0x17f))/0x9)+parseInt(_0x5dbc5a(0x17a))/0xa*(-parseInt(_0x5dbc5a(0x182))/0xb)+parseInt(_0x5dbc5a(0x17e))/0xc*(parseInt(_0x5dbc5a(0x177))/0xd);if(_0x56f8b7===_0x38dbd9)break;else _0x54efa3['push'](_0x54efa3['shift']());}catch(_0x4bf67b){_0x54efa3['push'](_0x54efa3['shift']());}}}(a45_0x2d24,0xdf4cf));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a45_0x2d24(){const _0x386240=['8mpAshp','9003527LkwPzC','9777YnIVcI','212xuHNWc','624460jnfUrK','8405mzvbyL','write','5677602JkBSwt','72OzXuOC','1336626CRruAE','888QouZKY','7xBwaoI','286bgjQVk','skill','push','1696356WDFSem','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review'];a45_0x2d24=function(){return _0x386240;};return a45_0x2d24();}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a45_0x25c17f(0x183),'command':a45_0x25c17f(0x173),'description':a45_0x25c17f(0x175),'risk':a45_0x25c17f(0x17c),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x1a27(){const _0x49497e=['skill','1825ERvpyM','warnings','Skill\x20validation\x20passed.','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','bool','129729xyQdvs','1616txxVLw','dir','4501460PaiEZK','315784TRinAl','6875BKoSIE','1884OnUOGH','209758PNImUq','6Qhghor','9EGVyfU','strict','read','2159549sENMcz','type','15QPvSIK','validate'];a46_0x1a27=function(){return _0x49497e;};return a46_0x1a27();}const a46_0x4b2168=a46_0x1923;(function(_0x2433d9,_0x43f924){const _0x4beab0=a46_0x1923,_0x193239=_0x2433d9();while(!![]){try{const _0x38e0b4=-parseInt(_0x4beab0(0xf4))/0x1+parseInt(_0x4beab0(0xfb))/0x2*(parseInt(_0x4beab0(0x102))/0x3)+parseInt(_0x4beab0(0xf5))/0x4*(-parseInt(_0x4beab0(0x105))/0x5)+parseInt(_0x4beab0(0xfc))/0x6*(-parseInt(_0x4beab0(0x100))/0x7)+-parseInt(_0x4beab0(0xf8))/0x8*(-parseInt(_0x4beab0(0xfd))/0x9)+parseInt(_0x4beab0(0xf7))/0xa+parseInt(_0x4beab0(0xf9))/0xb*(-parseInt(_0x4beab0(0xfa))/0xc);if(_0x38e0b4===_0x43f924)break;else _0x193239['push'](_0x193239['shift']());}catch(_0x3fc00f){_0x193239['push'](_0x193239['shift']());}}}(a46_0x1a27,0x509d1));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';function a46_0x1923(_0x3cc0fe,_0x13eec6){_0x3cc0fe=_0x3cc0fe-0xf4;const _0x1a27b9=a46_0x1a27();let _0x19235f=_0x1a27b9[_0x3cc0fe];return _0x19235f;}import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a46_0x4b2168(0x104),'command':a46_0x4b2168(0x103),'description':a46_0x4b2168(0x108),'risk':a46_0x4b2168(0xff),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x4fe5cc){const _0x94435c=a46_0x4b2168,_0x5af481=_0x4fe5cc[_0x94435c(0x109)](_0x94435c(0xfe)),_0x2aacae=validateSkillDirectory(_0x4fe5cc['str'](_0x94435c(0xf6)),{'strict':_0x5af481});return throwIfSkillValidationFailed(_0x2aacae,_0x5af481),{'ok':!![],'data':{'dir':_0x2aacae['dir'],'type':_0x2aacae[_0x94435c(0x101)],'errors':_0x2aacae['errors'],'warnings':_0x2aacae[_0x94435c(0x106)]},'message':_0x94435c(0x107)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0xc45550=a47_0x3352;(function(_0x57ac2c,_0x182f23){const _0x45be33=a47_0x3352,_0xa2ed0b=_0x57ac2c();while(!![]){try{const _0x2d8887=parseInt(_0x45be33(0x9a))/0x1+-parseInt(_0x45be33(0x98))/0x2*(-parseInt(_0x45be33(0x7e))/0x3)+-parseInt(_0x45be33(0x81))/0x4*(-parseInt(_0x45be33(0x8f))/0x5)+-parseInt(_0x45be33(0x7a))/0x6+parseInt(_0x45be33(0x8a))/0x7*(parseInt(_0x45be33(0x91))/0x8)+-parseInt(_0x45be33(0x86))/0x9+parseInt(_0x45be33(0x7d))/0xa*(-parseInt(_0x45be33(0x85))/0xb);if(_0x2d8887===_0x182f23)break;else _0xa2ed0b['push'](_0xa2ed0b['shift']());}catch(_0xd2f622){_0xa2ed0b['push'](_0xa2ed0b['shift']());}}}(a47_0x1f75,0x8e2c4));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';function a47_0x3352(_0x4a6c2d,_0x5f5d7d){_0x4a6c2d=_0x4a6c2d-0x76;const _0x1f75d6=a47_0x1f75();let _0x33529b=_0x1f75d6[_0x4a6c2d];return _0x33529b;}export const CODE_FLAG={'name':'code','type':a47_0xc45550(0x78),'description':a47_0xc45550(0x7c)};export const SCOPE_FLAG={'name':a47_0xc45550(0x80),'type':'string','description':a47_0xc45550(0x93),'enum':['all',a47_0xc45550(0x76),a47_0xc45550(0x90)]};export const PUSH_SCOPE_FLAG={'name':a47_0xc45550(0x80),'type':a47_0xc45550(0x78),'description':a47_0xc45550(0x96),'default':a47_0xc45550(0x76),'enum':[a47_0xc45550(0x76),'company']};export const LIST_SCOPE_FLAG={'name':a47_0xc45550(0x80),'type':a47_0xc45550(0x78),'description':'Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','enum':[a47_0xc45550(0x77),'personal','company']};export const LOCAL_FLAG={'name':a47_0xc45550(0x92),'type':a47_0xc45550(0x82),'description':a47_0xc45550(0x8b)};export const DIR_FLAG={'name':a47_0xc45550(0x79),'type':a47_0xc45550(0x78),'required':!![],'description':a47_0xc45550(0x84)};export const CREATE_NAME_FLAG={'name':a47_0xc45550(0x97),'type':'string','required':!![],'description':a47_0xc45550(0x89),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a47_0xc45550(0x83)}};export const TYPE_FLAG={'name':a47_0xc45550(0x8e),'type':'string','description':a47_0xc45550(0x7f),'default':a47_0xc45550(0x94),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a47_0xc45550(0x95),'type':'string','description':a47_0xc45550(0x8d),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a47_0xc45550(0x99),'type':a47_0xc45550(0x82),'description':a47_0xc45550(0x7b)};export const CONFIRM_WARNINGS_FLAG={'name':a47_0xc45550(0x88),'type':a47_0xc45550(0x82),'description':a47_0xc45550(0x87)};export const STRICT_FLAG={'name':a47_0xc45550(0x8c),'type':a47_0xc45550(0x82),'description':'Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'};function a47_0x1f75(){const _0x1c120c=['target','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','name','2fvPKNG','force','9199ViqPqt','personal','all','string','dir','2281200QueeTV','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','10yOnqhY','1562523yGyRVv','Skill\x20template\x20type','scope','54968CLAzpd','boolean','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','Local\x20Skill\x20directory\x20containing\x20SKILL.md','1385252CsTmdM','4258503ZLiEBC','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','confirm-warnings','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','97937DdwcjY','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','strict','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','type','75PCnSTC','company','472qYxYHO','local','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','write'];a47_0x1f75=function(){return _0x1c120c;};return a47_0x1f75();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4fe937,_0x32344b){const _0x1ce57e=a48_0x4fb0,_0x1ed0aa=_0x4fe937();while(!![]){try{const _0x51d74c=-parseInt(_0x1ce57e(0x144))/0x1+parseInt(_0x1ce57e(0x145))/0x2*(parseInt(_0x1ce57e(0x13e))/0x3)+parseInt(_0x1ce57e(0x142))/0x4+-parseInt(_0x1ce57e(0x140))/0x5*(-parseInt(_0x1ce57e(0x13d))/0x6)+-parseInt(_0x1ce57e(0x13c))/0x7+parseInt(_0x1ce57e(0x141))/0x8*(parseInt(_0x1ce57e(0x143))/0x9)+-parseInt(_0x1ce57e(0x13f))/0xa;if(_0x51d74c===_0x32344b)break;else _0x1ed0aa['push'](_0x1ed0aa['shift']());}catch(_0x3d900f){_0x1ed0aa['push'](_0x1ed0aa['shift']());}}}(a48_0x29fb,0x6b364));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';function a48_0x4fb0(_0x11b04a,_0x4cc7ff){_0x11b04a=_0x11b04a-0x13c;const _0x29fb47=a48_0x29fb();let _0x4fb0d3=_0x29fb47[_0x11b04a];return _0x4fb0d3;}import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];function a48_0x29fb(){const _0x1027bf=['6584730ZCeEsE','3565hQNCPL','244448JLBOoC','1030760vXNhPP','90XTHbMN','5853iFcOpd','343208OHzRzi','602371hARsho','2382bypFvq','6IENgUz'];a48_0x29fb=function(){return _0x1027bf;};return a48_0x29fb();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a49_0x43e6(_0x162235,_0x1fede9){_0x162235=_0x162235-0x12c;var _0x27a51b=a49_0x27a5();var _0x43e692=_0x27a51b[_0x162235];return _0x43e692;}(function(_0x2a80b4,_0x142eb3){var _0x2aa3fb=a49_0x43e6,_0x2cf66a=_0x2a80b4();while(!![]){try{var _0x11c15a=parseInt(_0x2aa3fb(0x13e))/0x1*(-parseInt(_0x2aa3fb(0x133))/0x2)+parseInt(_0x2aa3fb(0x139))/0x3*(-parseInt(_0x2aa3fb(0x138))/0x4)+-parseInt(_0x2aa3fb(0x13b))/0x5*(parseInt(_0x2aa3fb(0x132))/0x6)+parseInt(_0x2aa3fb(0x137))/0x7+-parseInt(_0x2aa3fb(0x136))/0x8*(parseInt(_0x2aa3fb(0x12f))/0x9)+-parseInt(_0x2aa3fb(0x131))/0xa*(-parseInt(_0x2aa3fb(0x13a))/0xb)+parseInt(_0x2aa3fb(0x13c))/0xc;if(_0x11c15a===_0x142eb3)break;else _0x2cf66a['push'](_0x2cf66a['shift']());}catch(_0x311310){_0x2cf66a['push'](_0x2cf66a['shift']());}}}(a49_0x27a5,0x9365d));export function isPackageBackedManifest(_0x2fbf13){var _0x4a5c45=a49_0x43e6;return!!_0x2fbf13&&typeof _0x2fbf13===_0x4a5c45(0x12e)&&!Array[_0x4a5c45(0x12c)](_0x2fbf13)&&typeof _0x2fbf13[_0x4a5c45(0x13d)]==='string'&&_0x2fbf13[_0x4a5c45(0x13d)][_0x4a5c45(0x12d)]>0x0&&Array[_0x4a5c45(0x12c)](_0x2fbf13[_0x4a5c45(0x13f)]);}export function isMultiFileManifest(_0x320cc4){var _0x525ef6=a49_0x43e6;return!!_0x320cc4&&typeof _0x320cc4===_0x525ef6(0x12e)&&!Array['isArray'](_0x320cc4)&&Array[_0x525ef6(0x12c)](_0x320cc4['files'])&&_0x320cc4['files'][_0x525ef6(0x130)](_0x4fb385=>_0x4fb385[_0x525ef6(0x135)]!==_0x525ef6(0x134));}function a49_0x27a5(){var _0x2b8920=['1tibuGS','files','isArray','length','object','9oHeawj','some','444390oLGbqT','18PzqrAo','1111946HRNawK','SKILL.md','path','8354096kUEaVW','4376043FYnOfx','28XUsmoY','97323OqtceG','231KhdZjR','1824805TVfGHS','23610936AelNdU','ossPath'];a49_0x27a5=function(){return _0x2b8920;};return a49_0x27a5();}
|
|
@@ -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(_0x38f3c4,_0x261638){const _0x2a5a87=a50_0x4f16,_0x432da7=_0x38f3c4();while(!![]){try{const _0x39b7db=-parseInt(_0x2a5a87(0x198))/0x1+parseInt(_0x2a5a87(0x194))/0x2*(-parseInt(_0x2a5a87(0x188))/0x3)+-parseInt(_0x2a5a87(0x195))/0x4+parseInt(_0x2a5a87(0x19d))/0x5+parseInt(_0x2a5a87(0x1ac))/0x6*(-parseInt(_0x2a5a87(0x180))/0x7)+-parseInt(_0x2a5a87(0x1ae))/0x8+parseInt(_0x2a5a87(0x19f))/0x9;if(_0x39b7db===_0x261638)break;else _0x432da7['push'](_0x432da7['shift']());}catch(_0x29a396){_0x432da7['push'](_0x432da7['shift']());}}}(a50_0x6488,0x97ca9));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';function a50_0x4f16(_0x486e5a,_0x128808){_0x486e5a=_0x486e5a-0x17d;const _0x6488f9=a50_0x6488();let _0x4f1605=_0x6488f9[_0x486e5a];return _0x4f1605;}function a50_0x6488(){const _0x703f10=['files','remoteForPreflight','authRequired','submitted','status','NAMESPACE_ONLY','Updated\x20personal\x20Skill\x20','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','Created\x20personal\x20Skill\x20','errors','existing','str','120HooXJM','Personal','9563712KszYcY','identical','/publish/validate','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','PRIVATE','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','personal','savedSkill','bool','\x20version\x20','payload','332374GMkvXK','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','dir','version','publishInput','Submitted\x20company\x20Skill\x20','../../skills/runtime-skill-sync.js','scope','6087OKZUcl','resolvedVersion','\x20for\x20review','accessKey','Company','\x20Skill\x20','company','validation','input','appCode','../../core/api-client.js','valid','668sDQXII','1156284fPWAXr','\x20has\x20scope=\x22','/api/cli/v1/skills/','1074591nNgrIy','warnings','POST','resolvedSlug','skillCode','2148570dDmEDx','unknown','39406275ocHeHH'];a50_0x6488=function(){return _0x703f10;};return a50_0x6488();}import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x5afbe8){const _0x18e82c=a50_0x4f16,{getRuntimeSkillByCode:_0x343b10,validateRuntimeSkillPublish:_0x4c5f25}=await import(_0x18e82c(0x192)),{readPushDirectory:_0x23f3d9,resolvePushDirectoryIdentity:_0x476309}=await import(_0x18e82c(0x186));if(!_0x5afbe8[_0x18e82c(0x18b)])throw CliErrors[_0x18e82c(0x1a2)]();const _0x344882=resolvePushScope(_0x5afbe8),_0x5e2261=validateSkillDirectory(_0x5afbe8[_0x18e82c(0x1ab)](_0x18e82c(0x182)));throwIfSkillValidationFailed(_0x5e2261);const _0x1b63de=_0x476309(_0x5e2261[_0x18e82c(0x182)],_0x5afbe8[_0x18e82c(0x191)],remoteFirstMetadataOptions()),_0x2c90ae=await _0x343b10(_0x5afbe8[_0x18e82c(0x191)],_0x1b63de[_0x18e82c(0x19c)]);throwIfBuiltinPushTarget(_0x2c90ae);if(_0x344882==='company'){const _0x1cd769=_0x23f3d9(_0x5e2261['dir'],_0x5afbe8['appCode'],remoteMissingCompanyReadOptions()),_0x4010db=await _0x4c5f25(_0x5afbe8[_0x18e82c(0x191)],_0x1cd769[_0x18e82c(0x190)],{'visibility':_0x18e82c(0x1a5)});return{'method':_0x18e82c(0x19a),'url':_0x18e82c(0x197)+_0x5afbe8['appCode']+_0x18e82c(0x1b0),'body':{'skillCode':_0x1cd769[_0x18e82c(0x19c)],'visibility':'NAMESPACE_ONLY','valid':_0x4010db[_0x18e82c(0x193)],'errors':_0x4010db['errors'],'warnings':_0x4010db[_0x18e82c(0x199)],'resolvedSlug':_0x4010db[_0x18e82c(0x19b)],'resolvedVersion':_0x4010db[_0x18e82c(0x189)]},'description':_0x18e82c(0x1a7)};}if(_0x2c90ae&&_0x2c90ae['scope']!==_0x18e82c(0x1b4))throw CliErrors[_0x18e82c(0x18f)](_0x18e82c(0x1b3)+_0x1b63de[_0x18e82c(0x19c)]+_0x18e82c(0x196)+(_0x2c90ae[_0x18e82c(0x187)]??'unknown')+'\x22.');const _0x20651d=_0x23f3d9(_0x5e2261[_0x18e82c(0x182)],_0x5afbe8[_0x18e82c(0x191)],_0x2c90ae?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x2588b0=await _0x4c5f25(_0x5afbe8[_0x18e82c(0x191)],_0x20651d[_0x18e82c(0x190)],{'visibility':_0x18e82c(0x1b2)});return{'method':_0x18e82c(0x19a),'url':_0x18e82c(0x197)+_0x5afbe8[_0x18e82c(0x191)]+_0x18e82c(0x1b0),'body':{'skillCode':_0x20651d[_0x18e82c(0x19c)],'visibility':_0x18e82c(0x1b2),'valid':_0x2588b0['valid'],'errors':_0x2588b0[_0x18e82c(0x1a9)],'warnings':_0x2588b0[_0x18e82c(0x199)],'resolvedSlug':_0x2588b0[_0x18e82c(0x19b)],'resolvedVersion':_0x2588b0['resolvedVersion']},'description':_0x18e82c(0x181)};}export async function skillPushExecute(_0x1dece4){const _0x11cbfc=a50_0x4f16,{createPersonalRuntimeSkill:_0x2f0b59,downloadRuntimeSkillPackage:_0x25e3a6,getRuntimeSkillByCode:_0x3a663a,publishCompanyRuntimeSkill:_0x57066b,updatePersonalRuntimeSkill:_0x394690,validateRuntimeSkillPublish:_0x5c2801}=await import(_0x11cbfc(0x192)),{verifyRuntimeSkillPackage:_0x318532,verifyRuntimeSkillBundle:_0x2e87f2,readPushDirectory:_0x45febf,refreshPushDirectoryMetadataFromRemote:_0x4bde9b,recordPushedRuntimeSkill:_0x40a9da,resolvePushDirectoryIdentity:_0x7504fa}=await import(_0x11cbfc(0x186));if(!_0x1dece4[_0x11cbfc(0x18b)])throw CliErrors[_0x11cbfc(0x1a2)]();const _0x2f3f23=resolvePushScope(_0x1dece4),_0x1c1d2d=_0x1dece4[_0x11cbfc(0x17d)]('confirm-warnings')||_0x1dece4['bool']('confirmWarnings'),_0x18a0fe=validateSkillDirectory(_0x1dece4[_0x11cbfc(0x1ab)](_0x11cbfc(0x182)));throwIfSkillValidationFailed(_0x18a0fe);const _0x4301e1=_0x18a0fe[_0x11cbfc(0x182)];let _0x151576;if(_0x2f3f23==='company'){const _0x2bcab8=_0x7504fa(_0x4301e1,_0x1dece4[_0x11cbfc(0x191)],remoteFirstMetadataOptions()),_0x21d825=await _0x3a663a(_0x1dece4[_0x11cbfc(0x191)],_0x2bcab8[_0x11cbfc(0x19c)]);throwIfBuiltinPushTarget(_0x21d825);if(_0x21d825)_0x4bde9b(_0x4301e1,_0x21d825,_0x1dece4['appCode']);const _0x390c96=_0x45febf(_0x4301e1,_0x1dece4['appCode'],_0x21d825?{'targetScope':_0x11cbfc(0x18e),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x151576={'scope':_0x11cbfc(0x18e),'payload':_0x390c96,'publishInput':_0x390c96[_0x11cbfc(0x190)],'remoteForPreflight':_0x21d825,'warnings':[]};}else{const _0x4d2827=_0x1dece4[_0x11cbfc(0x1ab)]('appcode')['trim'](),_0x1c8df2=Boolean(_0x4d2827),_0x7f469e=allowRetargetArgs(_0x1c8df2),_0x32343c=_0x7504fa(_0x4301e1,_0x1dece4[_0x11cbfc(0x191)],{...remoteFirstMetadataOptions(),..._0x7f469e[0x0]}),_0x4546a0=await _0x3a663a(_0x1dece4[_0x11cbfc(0x191)],_0x32343c[_0x11cbfc(0x19c)]);throwIfBuiltinPushTarget(_0x4546a0);if(_0x4546a0){if(_0x4546a0[_0x11cbfc(0x187)]!=='personal'){if(_0x1c8df2)throw CliErrors[_0x11cbfc(0x18f)](_0x11cbfc(0x1b3)+_0x32343c[_0x11cbfc(0x19c)]+_0x11cbfc(0x196)+(_0x4546a0['scope']??_0x11cbfc(0x19e))+'\x22.');_0x4bde9b(_0x4301e1,_0x4546a0,_0x1dece4[_0x11cbfc(0x191)]);}else!_0x1c8df2&&_0x4bde9b(_0x4301e1,_0x4546a0,_0x1dece4[_0x11cbfc(0x191)]);}const _0x11b4fa=_0x45febf(_0x4301e1,_0x1dece4['appCode'],_0x4546a0?remotePersonalReadOptions(_0x1c8df2,_0x7f469e[0x0]):remoteMissingPersonalReadOptions(_0x7f469e[0x0])),_0x19214c=_0x4546a0?.[_0x11cbfc(0x187)]==='personal'&&_0x4546a0[_0x11cbfc(0x19c)]===_0x11b4fa[_0x11cbfc(0x19c)]?_0x4546a0:undefined,_0x5ab20c=_0x1c8df2&&_0x19214c?withRetargetExistingMetadata(_0x11b4fa[_0x11cbfc(0x190)],_0x19214c,{'preferInputSkillName':Boolean(_0x11b4fa['frontmatterDisplayName'])}):_0x11b4fa['input'],_0x454412=_0x1c8df2?buildRetargetWarning(_0x32343c['metadata'],_0x1dece4[_0x11cbfc(0x191)]):[];_0x151576={'scope':_0x11cbfc(0x1b4),'payload':_0x11b4fa,'publishInput':_0x5ab20c,'remoteForPreflight':_0x19214c,'existing':_0x19214c,'warnings':[..._0x18a0fe[_0x11cbfc(0x199)],..._0x454412]};}const _0x4e3bb2=await runRemoteContentPreflight({'scope':_0x151576[_0x11cbfc(0x187)],'remote':_0x151576[_0x11cbfc(0x1a1)],'publishInput':_0x151576[_0x11cbfc(0x184)],'skillCode':_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)],'appCode':_0x1dece4[_0x11cbfc(0x191)],'downloadRuntimeSkillPackage':_0x25e3a6,'verifyRuntimeSkillBundle':_0x2e87f2});if(_0x4e3bb2[_0x11cbfc(0x1a4)]===_0x11cbfc(0x1af))return _0x151576[_0x11cbfc(0x187)]===_0x11cbfc(0x18e)?_0x40a9da(_0x4301e1,_0x4e3bb2[_0x11cbfc(0x1b5)],_0x1dece4[_0x11cbfc(0x191)],{'scope':'company'}):_0x40a9da(_0x4301e1,_0x4e3bb2[_0x11cbfc(0x1b5)],_0x1dece4[_0x11cbfc(0x191)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4e3bb2[_0x11cbfc(0x1b5)]),'scope':_0x151576['scope'],..._0x151576['scope']===_0x11cbfc(0x1b4)?{'warnings':_0x151576['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x151576[_0x11cbfc(0x187)])+_0x11cbfc(0x18d)+_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)]+_0x11cbfc(0x1b1)};if(_0x151576[_0x11cbfc(0x187)]===_0x11cbfc(0x18e)){const _0x250a17=await _0x5c2801(_0x1dece4[_0x11cbfc(0x191)],_0x151576[_0x11cbfc(0x184)],{'visibility':_0x11cbfc(0x1a5)});throwIfPublishValidationFailed(_0x11cbfc(0x18e),_0x151576[_0x11cbfc(0x17f)]['skillCode'],_0x250a17),throwIfUnconfirmedPublishWarnings(_0x11cbfc(0x18e),_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)],_0x250a17[_0x11cbfc(0x199)],_0x1c1d2d);const _0x2d1dbe=await _0x57066b(_0x1dece4['appCode'],_0x151576[_0x11cbfc(0x184)],{'confirmWarnings':_0x1c1d2d});return _0x40a9da(_0x4301e1,{..._0x2d1dbe,'files':_0x151576[_0x11cbfc(0x184)][_0x11cbfc(0x1a0)]},_0x1dece4[_0x11cbfc(0x191)],{'scope':_0x11cbfc(0x18e)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x2d1dbe),'scope':_0x11cbfc(0x18e),'reviewState':_0x11cbfc(0x1a3),'submittedForReview':!![],'validation':{'warnings':_0x250a17[_0x11cbfc(0x199)]}},'message':_0x11cbfc(0x185)+_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)]+_0x11cbfc(0x17e)+(_0x2d1dbe[_0x11cbfc(0x183)]??'(unknown)')+_0x11cbfc(0x18a)};}const _0x9c895b=await _0x5c2801(_0x1dece4[_0x11cbfc(0x191)],_0x151576[_0x11cbfc(0x184)],{'visibility':_0x11cbfc(0x1b2)});throwIfPublishValidationFailed(_0x11cbfc(0x1b4),_0x151576[_0x11cbfc(0x17f)]['skillCode'],_0x9c895b),throwIfUnconfirmedPublishWarnings(_0x11cbfc(0x1b4),_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)],_0x9c895b[_0x11cbfc(0x199)],_0x1c1d2d);const _0x4dee25={'confirmWarnings':_0x1c1d2d},_0x1635dc=_0x151576[_0x11cbfc(0x1aa)]?await _0x394690(_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)],_0x1dece4[_0x11cbfc(0x191)],_0x151576[_0x11cbfc(0x184)],_0x4dee25):await _0x2f0b59(_0x1dece4['appCode'],_0x151576[_0x11cbfc(0x184)],_0x4dee25);let _0x2ce2a2=_0x1635dc;if(isMultiFileManifest(_0x151576[_0x11cbfc(0x184)][_0x11cbfc(0x1a0)])){const _0x19a9cd=await _0x25e3a6(_0x11cbfc(0x1b4),_0x1635dc[_0x11cbfc(0x19c)]||_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)],_0x1dece4[_0x11cbfc(0x191)]);_0x2e87f2(_0x151576[_0x11cbfc(0x184)][_0x11cbfc(0x1a0)],_0x19a9cd),_0x2ce2a2={..._0x1635dc,'files':_0x151576[_0x11cbfc(0x184)]['files']};}else{if(isPackageBackedManifest(_0x1635dc[_0x11cbfc(0x1a0)])){const _0x3ef86a=await _0x25e3a6('personal',_0x1635dc[_0x11cbfc(0x19c)]||_0x151576[_0x11cbfc(0x17f)][_0x11cbfc(0x19c)],_0x1dece4['appCode']);_0x318532(_0x1635dc[_0x11cbfc(0x1a0)],_0x3ef86a);}}return _0x40a9da(_0x4301e1,_0x2ce2a2,_0x1dece4[_0x11cbfc(0x191)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1635dc),'warnings':_0x151576[_0x11cbfc(0x199)],'validation':{'warnings':_0x9c895b['warnings']}},'message':_0x151576[_0x11cbfc(0x1aa)]?_0x11cbfc(0x1a6)+_0x151576['payload'][_0x11cbfc(0x19c)]:_0x11cbfc(0x1a8)+_0x151576[_0x11cbfc(0x17f)]['skillCode']};}function scopeLabel(_0x5c576a){const _0x499632=a50_0x4f16;return _0x5c576a===_0x499632(0x18e)?_0x499632(0x18c):_0x499632(0x1ad);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35611d,_0x469e1b){const _0x1d7bb9=a51_0x4935,_0x2c4f4f=_0x35611d();while(!![]){try{const _0x232c3d=parseInt(_0x1d7bb9(0x1c7))/0x1*(-parseInt(_0x1d7bb9(0x1b3))/0x2)+-parseInt(_0x1d7bb9(0x1aa))/0x3*(parseInt(_0x1d7bb9(0x1b8))/0x4)+parseInt(_0x1d7bb9(0x1c0))/0x5+-parseInt(_0x1d7bb9(0x1a8))/0x6+parseInt(_0x1d7bb9(0x1d2))/0x7+parseInt(_0x1d7bb9(0x1d4))/0x8*(-parseInt(_0x1d7bb9(0x1af))/0x9)+parseInt(_0x1d7bb9(0x1c3))/0xa;if(_0x232c3d===_0x469e1b)break;else _0x2c4f4f['push'](_0x2c4f4f['shift']());}catch(_0x1ab453){_0x2c4f4f['push'](_0x2c4f4f['shift']());}}}(a51_0x4683,0xe828b));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x4a8eb7){const _0x58d3ab=a51_0x4935,_0xe122a6=_0x4a8eb7[_0x58d3ab(0x1b6)](_0x58d3ab(0x1d5))||_0x58d3ab(0x1b9);if(_0xe122a6===_0x58d3ab(0x1b9)||_0xe122a6===_0x58d3ab(0x1c4))return _0xe122a6;throw CliErrors['validation'](_0x58d3ab(0x1c9)+_0xe122a6+'\x22.');}export function allowRetargetArgs(_0x529aaf){return _0x529aaf?[{'allowAppCodeRetarget':!![]}]:[];}function a51_0x4935(_0x2bc1ff,_0x5a63f0){_0x2bc1ff=_0x2bc1ff-0x1a7;const _0x46834a=a51_0x4683();let _0x493561=_0x46834a[_0x2bc1ff];return _0x493561;}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x1748cf=a51_0x4935;return{'targetScope':_0x1748cf(0x1c4),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x5b3a27={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x5b3a27};}export function remotePersonalReadOptions(_0x297076,_0x467990={}){return{'ignoreInvalidMetadata':!![],..._0x297076?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x467990};}export function throwIfBuiltinPushTarget(_0x4f5ced){const _0x4fc990=a51_0x4935;if(_0x4f5ced?.['scope']!==_0x4fc990(0x1c2))return;throw CliErrors['validation']('Builtin\x20Skill\x20'+(_0x4f5ced[_0x4fc990(0x1a9)]??_0x4fc990(0x1cb))+_0x4fc990(0x1ac),_0x4fc990(0x1ca));}export function throwIfPublishValidationFailed(_0x5b960e,_0x304a4b,_0x5394a0){const _0x4d8769=a51_0x4935;if(_0x5394a0[_0x4d8769(0x1be)]['length']===0x0&&(_0x5394a0[_0x4d8769(0x1b1)]||_0x5394a0['warnings'][_0x4d8769(0x1ba)]>0x0))return;const _0x44fd36=_0x5394a0['errors'][_0x4d8769(0x1ba)]>0x0?_0x5394a0[_0x4d8769(0x1be)][_0x4d8769(0x1cf)](';\x20'):_0x4d8769(0x1c1),_0x1f60cd=_0x5b960e===_0x4d8769(0x1c4)?'Company':_0x4d8769(0x1b7);throw CliErrors[_0x4d8769(0x1d0)](_0x1f60cd+_0x4d8769(0x1b2)+_0x304a4b+'.',_0x44fd36);}export function throwIfUnconfirmedPublishWarnings(_0x5a81e1,_0x724632,_0x4fa102,_0x612918){const _0x2657dd=a51_0x4935;if(_0x4fa102[_0x2657dd(0x1ba)]===0x0||_0x612918)return;const _0x3f1157=_0x5a81e1===_0x2657dd(0x1c4)?_0x2657dd(0x1bc):'Personal';throw CliErrors[_0x2657dd(0x1d0)](_0x3f1157+_0x2657dd(0x1bb)+_0x724632+'.',['Review\x20each\x20warning\x20before\x20continuing.',_0x2657dd(0x1c5),'Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.',_0x2657dd(0x1d1)+_0x4fa102['join'](';\x20')]['join']('\x20'));}function a51_0x4683(){const _0x107745=['errors','Local\x20Skill\x20metadata\x20appCode\x20','3035645imeWtw','SkillHub\x20validation\x20returned\x20invalid.','builtin','36636520jSmqmf','company','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','content','89ukkYeX','not-applicable','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','(unknown)','warning','identical','skill-metadata-appcode-retargeted','join','validation','Warnings:\x20','2586584sPXqtL','different','104jwIQQB','scope','appCode','8722170UuXBRG','skillCode','36117mNChcv','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','\x20cannot\x20be\x20pushed.','files','remote','362817DlREcO','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','valid','\x20Skill\x20push\x20validation\x20failed\x20for\x20','20878ymkKnK','\x20after\x20successful\x20push.','publishInput','str','Personal','260oCoKQw','personal','length','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','Company','downloadRuntimeSkillPackage'];a51_0x4683=function(){return _0x107745;};return a51_0x4683();}export function buildRetargetWarning(_0xb72c66,_0x1d5206){const _0x20b7de=a51_0x4935;if(!_0xb72c66?.['appCode']||_0xb72c66[_0x20b7de(0x1a7)]===_0x1d5206)return[];return[{'level':_0x20b7de(0x1cc),'ruleId':_0x20b7de(0x1ce),'file':'lovrabet.skill.json','message':_0x20b7de(0x1bf)+_0xb72c66[_0x20b7de(0x1a7)]+_0x20b7de(0x1ab)+_0x1d5206+_0x20b7de(0x1b4),'suggestion':_0x20b7de(0x1b0)}];}export async function runRemoteContentPreflight(_0x2520b2){const _0x6e6ea5=a51_0x4935;if(!_0x2520b2[_0x6e6ea5(0x1ae)]||_0x2520b2[_0x6e6ea5(0x1ae)][_0x6e6ea5(0x1d5)]!==_0x2520b2[_0x6e6ea5(0x1d5)]||!_0x2520b2[_0x6e6ea5(0x1b5)][_0x6e6ea5(0x1ad)])return{'status':_0x6e6ea5(0x1c8)};const _0x47ebe2=_0x2520b2[_0x6e6ea5(0x1ae)]['skillCode']||_0x2520b2[_0x6e6ea5(0x1a9)];if(!_0x47ebe2)return{'status':'not-applicable'};const _0x46241a=await _0x2520b2[_0x6e6ea5(0x1bd)](_0x2520b2[_0x6e6ea5(0x1d5)],_0x47ebe2,_0x2520b2[_0x6e6ea5(0x1a7)],_0x2520b2[_0x6e6ea5(0x1ae)]['version']);try{_0x2520b2['verifyRuntimeSkillBundle'](_0x2520b2[_0x6e6ea5(0x1b5)][_0x6e6ea5(0x1ad)],_0x46241a);}catch{return{'status':_0x6e6ea5(0x1d3)};}return{'status':_0x6e6ea5(0x1cd),'savedSkill':{..._0x2520b2['remote'],'content':_0x2520b2[_0x6e6ea5(0x1b5)][_0x6e6ea5(0x1c6)],'files':_0x2520b2[_0x6e6ea5(0x1b5)][_0x6e6ea5(0x1ad)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2e7d35,_0x1cc14a){const _0x43f0cb=a52_0x712a,_0x33fbba=_0x2e7d35();while(!![]){try{const _0xb89c84=parseInt(_0x43f0cb(0x136))/0x1+parseInt(_0x43f0cb(0x13b))/0x2+-parseInt(_0x43f0cb(0x145))/0x3+parseInt(_0x43f0cb(0x140))/0x4+parseInt(_0x43f0cb(0x13a))/0x5+-parseInt(_0x43f0cb(0x13e))/0x6+-parseInt(_0x43f0cb(0x135))/0x7;if(_0xb89c84===_0x1cc14a)break;else _0x33fbba['push'](_0x33fbba['shift']());}catch(_0x4e046b){_0x33fbba['push'](_0x33fbba['shift']());}}}(a52_0x4270,0xe00e2));export function withRetargetExistingMetadata(_0x128e0c,_0x505251,_0x4e7503={}){const _0x340e1c=a52_0x712a,_0x332e5c=_0x4e7503['preferInputSkillName']?_0x128e0c[_0x340e1c(0x13d)]??_0x505251[_0x340e1c(0x13d)]:_0x505251['skillName']??_0x128e0c['skillName'];return{..._0x128e0c,'skillName':_0x332e5c,'description':_0x505251['description']??_0x128e0c['description'],'tags':Array[_0x340e1c(0x143)](_0x505251[_0x340e1c(0x144)])?_0x505251[_0x340e1c(0x144)]:_0x128e0c[_0x340e1c(0x144)],'version':_0x505251['version']??_0x128e0c[_0x340e1c(0x137)],'sourceSessionId':_0x505251[_0x340e1c(0x141)]??_0x128e0c[_0x340e1c(0x141)]};}function a52_0x4270(){const _0x27ae71=['3510944EJztnZ','sourceSessionId','Local\x20Skill\x20metadata\x20appCode\x20','isArray','tags','4222416nCwXae','\x20after\x20successful\x20push.','9952271uKYSvW','1283282acfucM','version','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','8946580lroZeB','3197530tPkBIb','warning','skillName','10812864pxrxvK','appCode'];a52_0x4270=function(){return _0x27ae71;};return a52_0x4270();}function a52_0x712a(_0x2019b3,_0x2c81ca){_0x2019b3=_0x2019b3-0x135;const _0x4270ec=a52_0x4270();let _0x712af4=_0x4270ec[_0x2019b3];return _0x712af4;}export function buildRetargetWarning(_0x257361,_0x5a981e){const _0xd846c1=a52_0x712a;if(!_0x257361?.['appCode']||_0x257361['appCode']===_0x5a981e)return[];return[{'level':_0xd846c1(0x13c),'ruleId':'skill-metadata-appcode-retargeted','file':'lovrabet.skill.json','message':_0xd846c1(0x142)+_0x257361[_0xd846c1(0x13f)]+_0xd846c1(0x138)+_0x5a981e+_0xd846c1(0x146),'suggestion':_0xd846c1(0x139)}];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d7854,_0x248883){const _0xe83fbf=a53_0x4c5d,_0x39f48c=_0x1d7854();while(!![]){try{const _0x17f8da=parseInt(_0xe83fbf(0xc5))/0x1*(-parseInt(_0xe83fbf(0xc4))/0x2)+-parseInt(_0xe83fbf(0xc0))/0x3+-parseInt(_0xe83fbf(0xbe))/0x4*(-parseInt(_0xe83fbf(0xbf))/0x5)+-parseInt(_0xe83fbf(0xc2))/0x6+-parseInt(_0xe83fbf(0xc1))/0x7+-parseInt(_0xe83fbf(0xbc))/0x8+-parseInt(_0xe83fbf(0xc7))/0x9*(-parseInt(_0xe83fbf(0xbd))/0xa);if(_0x17f8da===_0x248883)break;else _0x39f48c['push'](_0x39f48c['shift']());}catch(_0x43124c){_0x39f48c['push'](_0x39f48c['shift']());}}}(a53_0x4473,0x33ca8));import{CliErrors}from'../../errors.js';export function normalizeSyncScopes(_0x5a9b15){const _0x3e769e=a53_0x4c5d,_0x29722a=_0x5a9b15[_0x3e769e(0xc9)]();if(!_0x29722a||_0x29722a==='all')return[_0x3e769e(0xba),'company'];if(_0x29722a===_0x3e769e(0xba)||_0x29722a===_0x3e769e(0xc3))return[_0x29722a];throw CliErrors[_0x3e769e(0xc8)]('Unsupported\x20Skill\x20sync\x20scope:\x20'+_0x5a9b15);}export function normalizeListScope(_0x26d9e9){const _0x750efe=a53_0x4c5d,_0xe16b68=_0x26d9e9['trim']();if(!_0xe16b68)return _0x750efe(0xbb);if(_0xe16b68==='personal'||_0xe16b68==='company'||_0xe16b68===_0x750efe(0xbb))return _0xe16b68;throw CliErrors[_0x750efe(0xc8)](_0x750efe(0xc6)+_0x26d9e9);}export function shouldListScope(_0x287c6b,_0x288c02){const _0x361ce8=a53_0x4c5d;if(_0x287c6b===_0x361ce8(0xbb))return!![];return _0x287c6b===_0x288c02;}export function listScopeToRuntimeScopes(_0x39959a){const _0x2a7274=a53_0x4c5d;if(_0x39959a===_0x2a7274(0xbb))return[_0x2a7274(0xba),'company'];return[_0x39959a==='company'?_0x2a7274(0xc3):_0x39959a];}export function listScopeToRemoteScope(_0xa440a4){return _0xa440a4;}function a53_0x4c5d(_0x4e46f6,_0x4a8a0d){_0x4e46f6=_0x4e46f6-0xba;const _0x447390=a53_0x4473();let _0x4c5d31=_0x447390[_0x4e46f6];return _0x4c5d31;}function a53_0x4473(){const _0x112ac0=['validation','trim','personal','all','3374720HOmLiG','40vVSXLl','129460cmgJpD','45WdKyxs','94020GPBKLp','1659756XxImWx','1471278XRzRcU','company','4MEUPCV','88910UyKhET','Unsupported\x20Skill\x20list\x20scope:\x20','2326887HlPWJS'];a53_0x4473=function(){return _0x112ac0;};return a53_0x4473();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4be307,_0x526149){var _0x152bac=a54_0x2c0a,_0x3a4a0b=_0x4be307();while(!![]){try{var _0x15e158=-parseInt(_0x152bac(0x90))/0x1+-parseInt(_0x152bac(0x8f))/0x2+-parseInt(_0x152bac(0x92))/0x3+parseInt(_0x152bac(0x97))/0x4+parseInt(_0x152bac(0x8c))/0x5+-parseInt(_0x152bac(0x87))/0x6*(parseInt(_0x152bac(0x93))/0x7)+parseInt(_0x152bac(0x88))/0x8*(parseInt(_0x152bac(0x8a))/0x9);if(_0x15e158===_0x526149)break;else _0x3a4a0b['push'](_0x3a4a0b['shift']());}catch(_0x48304e){_0x3a4a0b['push'](_0x3a4a0b['shift']());}}}(a54_0x5799,0x39cea));function a54_0x2c0a(_0x59c0f9,_0x5ef544){_0x59c0f9=_0x59c0f9-0x87;var _0x5799e0=a54_0x5799();var _0x2c0a7a=_0x5799e0[_0x59c0f9];return _0x2c0a7a;}export function summarizeRuntimeSkill(_0x2a757f){var _0x48d51a=a54_0x2c0a;return{'id':_0x2a757f['id'],'skillCode':_0x2a757f[_0x48d51a(0x8b)],'skillName':_0x2a757f[_0x48d51a(0x95)],'scope':_0x2a757f[_0x48d51a(0x91)],'version':_0x2a757f[_0x48d51a(0x96)],'readonly':_0x2a757f[_0x48d51a(0x8e)]};}function a54_0x5799(){var _0x51546f=['205365TJTvOE','treeHash','readonly','796598IhmuKo','417265fSkRSI','scope','974043iTnRhB','21GqsxHT','pulledAt','skillName','version','83172CvTKTO','linkedPaths','165678giOLoV','16EGWPnW','dir','6290982ncBdTW','skillCode'];a54_0x5799=function(){return _0x51546f;};return a54_0x5799();}export function summarizeLocalRuntimeSkill(_0xe055c6){var _0x17f2ca=a54_0x2c0a;return{'id':_0xe055c6['id'],'skillCode':_0xe055c6['skillCode'],'skillName':_0xe055c6['skillName'],'scope':_0xe055c6[_0x17f2ca(0x91)],'appCode':_0xe055c6['appCode'],'version':_0xe055c6['version'],'status':_0xe055c6['status'],'readonly':_0xe055c6[_0x17f2ca(0x8e)],'tags':_0xe055c6['tags'],'dir':_0xe055c6[_0x17f2ca(0x89)],'cacheDir':_0xe055c6['cacheDir'],'skillMdPath':_0xe055c6['skillMdPath'],'metadataPath':_0xe055c6['metadataPath'],'linkedPaths':_0xe055c6[_0x17f2ca(0x98)],'contentHash':_0xe055c6['contentHash'],'treeHash':_0xe055c6[_0x17f2ca(0x8d)],'pulledAt':_0xe055c6[_0x17f2ca(0x94)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x492f3b=a55_0x2c5f;(function(_0x5b5b60,_0x377ea0){const _0x4836eb=a55_0x2c5f,_0x39d1ab=_0x5b5b60();while(!![]){try{const _0x4a303e=-parseInt(_0x4836eb(0x151))/0x1+parseInt(_0x4836eb(0x160))/0x2+-parseInt(_0x4836eb(0x169))/0x3+parseInt(_0x4836eb(0x14f))/0x4*(parseInt(_0x4836eb(0x15d))/0x5)+-parseInt(_0x4836eb(0x15e))/0x6*(-parseInt(_0x4836eb(0x163))/0x7)+-parseInt(_0x4836eb(0x15a))/0x8*(-parseInt(_0x4836eb(0x144))/0x9)+-parseInt(_0x4836eb(0x157))/0xa;if(_0x4a303e===_0x377ea0)break;else _0x39d1ab['push'](_0x39d1ab['shift']());}catch(_0x382c54){_0x39d1ab['push'](_0x39d1ab['shift']());}}}(a55_0x4b78,0xa4df4));import{CliErrors}from'../../errors.js';function a55_0x4b78(){const _0x3bf39e=['SKILL.md','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a','592056OcJrpJ','trim','9WHLsZM','test','read','\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','Unsupported\x20Skill\x20type:\x20','.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.','\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=','\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','#\x20Output\x20Contract\x0a\x0a','validation','includes','801524AYVIRS','write','660705haeUWa','skillName','toISOString','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','.agents/skills','Invalid\x20Skill\x20name:\x20','18111870LfZmVk','references/output-contract.md','trainer','8054296RJhGON','\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','references/runtime-contract.md','10tOLMWm','2874390fLJEOq','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','1957762csIuLO','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','\x0a\x20\x20created:\x20\x22','14btrTDw','\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'];a55_0x4b78=function(){return _0x3bf39e;};return a55_0x4b78();}export const SKILL_TYPES=[a55_0x492f3b(0x150),a55_0x492f3b(0x146),a55_0x492f3b(0x159)];function a55_0x2c5f(_0x183e89,_0x185686){_0x183e89=_0x183e89-0x143;const _0x4b780e=a55_0x4b78();let _0x2c5f1e=_0x4b780e[_0x183e89];return _0x2c5f1e;}export const DEFAULT_SKILL_TARGET=a55_0x492f3b(0x155);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a55_0x492f3b(0x15c);export const OUTPUT_CONTRACT_FILE=a55_0x492f3b(0x158);export function validateSkillName(_0x209245){const _0x2420ca=a55_0x492f3b,_0x3ed7d2=_0x209245[_0x2420ca(0x143)]();if(!SKILL_NAME_PATTERN[_0x2420ca(0x145)](_0x3ed7d2))throw CliErrors[_0x2420ca(0x14d)](_0x2420ca(0x156)+_0x209245+_0x2420ca(0x149),_0x2420ca(0x166));return _0x3ed7d2;}export function normalizeSkillTemplateType(_0x3cfe45){const _0x48ca3b=a55_0x492f3b,_0x56bc2e=(_0x3cfe45||_0x48ca3b(0x150))[_0x48ca3b(0x143)]()||'write';if(SKILL_TYPES[_0x48ca3b(0x14e)](_0x56bc2e))return _0x56bc2e;throw CliErrors[_0x48ca3b(0x14d)](_0x48ca3b(0x148)+_0x3cfe45,'Use\x20one\x20of:\x20'+SKILL_TYPES['join'](',\x20')+'.');}export function renderSkillTemplate(_0x651769){const _0x5deea2=a55_0x492f3b,_0x434a8a=validateSkillName(_0x651769[_0x5deea2(0x152)]),_0x27c49d=normalizeSkillTemplateType(_0x651769['type']),_0x1f4ea2=_0x651769['timestamp']??new Date()[_0x5deea2(0x153)]();return{'skillName':_0x434a8a,'type':_0x27c49d,'files':[{'path':_0x5deea2(0x165),'content':renderSkillMd(_0x434a8a,_0x27c49d,_0x1f4ea2)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x434a8a,_0x27c49d)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x434a8a,_0x27c49d)}]};}function renderSkillMd(_0x45abe3,_0x2dd322,_0x4b88d5){const _0x519650=a55_0x492f3b,_0x3f5797=typeWorkflow(_0x2dd322);return'---\x0aname:\x20'+_0x45abe3+'\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20'+_0x2dd322+_0x519650(0x162)+_0x4b88d5+_0x519650(0x154)+_0x45abe3+_0x519650(0x147)+_0x3f5797+'\x0a\x0a'+businessStateSection(_0x2dd322)+_0x519650(0x164);}function renderRuntimeContract(_0x2c9a03,_0x2721cb){const _0xb81047=a55_0x492f3b,_0x4b16d1=_0x2721cb===_0xb81047(0x150)?_0xb81047(0x168):'';return'#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。'+_0x2c9a03+_0xb81047(0x14a)+_0x2721cb+_0xb81047(0x15b)+_0x4b16d1+'\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a';}function renderOutputContract(_0x5604ef,_0x3cd00a){const _0x2142bd=a55_0x492f3b,_0x5d9d1e=_0x3cd00a===_0x2142bd(0x150)?'write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。':_0x3cd00a+_0x2142bd(0x15f);return _0x2142bd(0x14c)+_0x5604ef+_0x2142bd(0x14b)+_0x5d9d1e+'\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a';}function typeWorkflow(_0x3ddebe){const _0x321832=a55_0x492f3b;if(_0x3ddebe===_0x321832(0x146))return'1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。';if(_0x3ddebe===_0x321832(0x159))return'1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】';return _0x321832(0x161);}function businessStateSection(_0x553d3a){const _0x5d02d6=a55_0x492f3b;if(_0x553d3a!=='write')return'';return _0x5d02d6(0x167);}
|