@lovrabet/lovrabet-cli 2.1.16-beta.2 → 2.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa172d5,_0x3285d4){const _0xd9f697=a39_0x27d5,_0x1ad09f=_0xa172d5();while(!![]){try{const _0x2b42ae=-parseInt(_0xd9f697(0x1c1))/0x1+-parseInt(_0xd9f697(0x1b2))/0x2*(-parseInt(_0xd9f697(0x1b7))/0x3)+parseInt(_0xd9f697(0x1ad))/0x4*(parseInt(_0xd9f697(0x1c5))/0x5)+parseInt(_0xd9f697(0x1c9))/0x6*(-parseInt(_0xd9f697(0x1b8))/0x7)+parseInt(_0xd9f697(0x1b4))/0x8*(-parseInt(_0xd9f697(0x1b1))/0x9)+parseInt(_0xd9f697(0x1bf))/0xa*(-parseInt(_0xd9f697(0x1bd))/0xb)+parseInt(_0xd9f697(0x1af))/0xc;if(_0x2b42ae===_0x3285d4)break;else _0x1ad09f['push'](_0x1ad09f['shift']());}catch(_0x2171c8){_0x1ad09f['push'](_0x1ad09f['shift']());}}}(a39_0x143d,0xc8f62));export function adaptServiceTreeManifestForLegacyFramework(_0x4a8809){const _0x512456=a39_0x27d5,_0x4cebbf=cloneJsonValue(_0x4a8809),_0x4d0f29=[];if(!isObjectRecord(_0x4cebbf))return{'manifest':_0x4cebbf,'errors':_0x4d0f29};return Array[_0x512456(0x1ab)](_0x4cebbf['commands'])&&_0x4cebbf['commands'][_0x512456(0x1a3)]((_0x491d26,_0x2c7a8b)=>{const _0x146c0e=_0x512456;if(!isObjectRecord(_0x491d26))return;adaptBffTarget(_0x491d26[_0x146c0e(0x1bc)],_0x146c0e(0x1ac)+_0x2c7a8b+_0x146c0e(0x1a0),_0x4d0f29);}),adaptResources(_0x4cebbf[_0x512456(0x1c0)],_0x512456(0x1b0),_0x4d0f29),{'manifest':_0x4cebbf,'errors':_0x4d0f29};}export function toPublicServiceTreeTarget(_0x69b60a){const _0x3bb87a=a39_0x27d5,{scriptName:_0x2d8ce3,..._0x1c9338}=_0x69b60a;return typeof _0x2d8ce3===_0x3bb87a(0x1aa)&&_0x2d8ce3[_0x3bb87a(0x1a4)]()&&(_0x1c9338['functionName']=_0x2d8ce3),_0x1c9338;}export function toPublicNormalizedServiceTree(_0x50a3d5){const _0x43eb31=a39_0x27d5;return{..._0x50a3d5,'commands':_0x50a3d5[_0x43eb31(0x1c8)][_0x43eb31(0x1a7)](_0x2c6b71=>({..._0x2c6b71,'target':toPublicServiceTreeTarget(_0x2c6b71[_0x43eb31(0x1bc)])}))};}function adaptResources(_0x2037b6,_0x32e355,_0x2334d8){const _0x35c756=a39_0x27d5;if(!isObjectRecord(_0x2037b6))return;for(const [_0x15c86e,_0x4dd4da]of Object[_0x35c756(0x1a6)](_0x2037b6)){if(!isObjectRecord(_0x4dd4da))continue;const _0x46cdeb=_0x32e355+'.'+_0x15c86e;if(isObjectRecord(_0x4dd4da['actions']))for(const [_0x3b1ab4,_0x14f5bb]of Object[_0x35c756(0x1a6)](_0x4dd4da['actions'])){if(!isObjectRecord(_0x14f5bb))continue;const _0x168ebc=_0x46cdeb+'.actions.'+_0x3b1ab4,_0x2491ed=isObjectRecord(_0x14f5bb[_0x35c756(0x1bc)])&&_0x14f5bb[_0x35c756(0x1bc)][_0x35c756(0x1c2)]===_0x35c756(0x1b9);adaptBffTarget(_0x14f5bb[_0x35c756(0x1bc)],_0x168ebc+_0x35c756(0x1b6),_0x2334d8),(_0x2491ed||isBffAction(_0x14f5bb))&&adaptFunctionNameField(_0x14f5bb,_0x168ebc,_0x2334d8);}adaptResources(_0x4dd4da[_0x35c756(0x1c0)],_0x46cdeb+_0x35c756(0x1b5),_0x2334d8);}}function a39_0x143d(){const _0x3970b1=['target','13782879rEMrmR','fromEntries','10nelcLM','resources','936264ldGrot','kind','functionName','prototype','872435kmccaR','error','call','commands','3834jFJbgT','].target','scriptName','object','forEach','trim','hasOwnProperty','entries','map','action','.functionName','string','isArray','$.commands[','4yWjLIg','bff.exec','33692556DXpXNo','$.resources','477GSoDNY','2SvmHgK','push','53672kwrcUV','.resources','.target','4855197qyDGgZ','13503jovTdv','bff','functionName\x20must\x20be\x20a\x20non-empty\x20string.','.scriptName'];a39_0x143d=function(){return _0x3970b1;};return a39_0x143d();}function adaptBffTarget(_0x322395,_0x2b7ebb,_0x31c7a0){const _0x36592b=a39_0x27d5;if(!isObjectRecord(_0x322395)||_0x322395[_0x36592b(0x1c2)]!=='bff')return;adaptFunctionNameField(_0x322395,_0x2b7ebb,_0x31c7a0);}function adaptFunctionNameField(_0x52eb5b,_0x40dec3,_0xa6be36){const _0x22a6d3=a39_0x27d5;Object[_0x22a6d3(0x1c4)][_0x22a6d3(0x1a5)][_0x22a6d3(0x1c7)](_0x52eb5b,_0x22a6d3(0x1a1))&&_0xa6be36[_0x22a6d3(0x1b3)]({'level':_0x22a6d3(0x1c6),'path':_0x40dec3+_0x22a6d3(0x1bb),'message':'Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.'});if(Object[_0x22a6d3(0x1c4)][_0x22a6d3(0x1a5)][_0x22a6d3(0x1c7)](_0x52eb5b,'functionName')){if(typeof _0x52eb5b[_0x22a6d3(0x1c3)]!=='string'||!_0x52eb5b[_0x22a6d3(0x1c3)][_0x22a6d3(0x1a4)]()){_0xa6be36[_0x22a6d3(0x1b3)]({'level':_0x22a6d3(0x1c6),'path':_0x40dec3+_0x22a6d3(0x1a9),'message':_0x22a6d3(0x1ba)}),delete _0x52eb5b[_0x22a6d3(0x1c3)];return;}_0x52eb5b[_0x22a6d3(0x1a1)]=_0x52eb5b[_0x22a6d3(0x1c3)],delete _0x52eb5b[_0x22a6d3(0x1c3)];}}function a39_0x27d5(_0x4322de,_0x48042a){_0x4322de=_0x4322de-0x1a0;const _0x143d8b=a39_0x143d();let _0x27d562=_0x143d8b[_0x4322de];return _0x27d562;}function isBffAction(_0x38006b){const _0x5293de=a39_0x27d5;return _0x38006b[_0x5293de(0x1c2)]===_0x5293de(0x1b9)||_0x38006b[_0x5293de(0x1a8)]===_0x5293de(0x1ae)||_0x38006b[_0x5293de(0x1bc)]==='bff.exec';}function cloneJsonValue(_0x1304a0){const _0x4a55e0=a39_0x27d5;if(Array['isArray'](_0x1304a0))return _0x1304a0['map'](_0x104eb9=>cloneJsonValue(_0x104eb9));if(isObjectRecord(_0x1304a0))return Object[_0x4a55e0(0x1be)](Object[_0x4a55e0(0x1a6)](_0x1304a0)[_0x4a55e0(0x1a7)](([_0x1fde1c,_0xd05900])=>[_0x1fde1c,cloneJsonValue(_0xd05900)]));return _0x1304a0;}function isObjectRecord(_0x410d25){const _0x2652c4=a39_0x27d5;return Boolean(_0x410d25)&&typeof _0x410d25===_0x2652c4(0x1a2)&&!Array['isArray'](_0x410d25);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x3825a4=a40_0x4692;(function(_0x2b672e,_0x5f3b38){const _0x2fc2cb=a40_0x4692,_0x46e217=_0x2b672e();while(!![]){try{const _0x833eb6=parseInt(_0x2fc2cb(0x92))/0x1*(parseInt(_0x2fc2cb(0xc0))/0x2)+parseInt(_0x2fc2cb(0x98))/0x3+-parseInt(_0x2fc2cb(0xcc))/0x4+parseInt(_0x2fc2cb(0xc8))/0x5+-parseInt(_0x2fc2cb(0x8d))/0x6*(-parseInt(_0x2fc2cb(0xac))/0x7)+parseInt(_0x2fc2cb(0x8e))/0x8*(-parseInt(_0x2fc2cb(0xa2))/0x9)+-parseInt(_0x2fc2cb(0x8c))/0xa;if(_0x833eb6===_0x5f3b38)break;else _0x46e217['push'](_0x46e217['shift']());}catch(_0xcaa3bd){_0x46e217['push'](_0x46e217['shift']());}}}(a40_0x5c63,0x39849));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a40_0x3825a4(0xd0),'type':a40_0x3825a4(0x8f),'required':!![],'description':a40_0x3825a4(0xa5)},SERVICE_FLAG={'name':'service','type':a40_0x3825a4(0x8f),'required':!![],'description':a40_0x3825a4(0x86),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a40_0x3825a4(0xa7)}};function summarizeService(_0x1c3b31){const _0x28266b=a40_0x3825a4;return{'serviceCode':_0x1c3b31['serviceCode'],'name':_0x1c3b31[_0x28266b(0xb6)][_0x28266b(0xae)][_0x28266b(0xcf)],'version':_0x1c3b31['version'],'importedAt':_0x1c3b31[_0x28266b(0x9c)],'source':_0x1c3b31[_0x28266b(0xc7)],'commandCount':_0x1c3b31[_0x28266b(0xb6)][_0x28266b(0x9a)][_0x28266b(0xbd)],'commands':_0x1c3b31['normalizedManifest'][_0x28266b(0x9a)][_0x28266b(0xc1)](_0x3e90ca=>({'path':_0x3e90ca[_0x28266b(0xa1)],'description':_0x3e90ca[_0x28266b(0x87)],'risk':_0x3e90ca[_0x28266b(0x9e)],'target':toPublicServiceTreeTarget(_0x3e90ca[_0x28266b(0xc3)]),'flags':_0x3e90ca[_0x28266b(0x90)][_0x28266b(0xc1)](_0x133ba7=>({'name':_0x133ba7[_0x28266b(0xcf)],'cliName':_0x133ba7[_0x28266b(0xd1)],'type':_0x133ba7[_0x28266b(0xc9)],'required':_0x133ba7[_0x28266b(0xad)]===!![]}))}))};}function summarizeLoadedManifest(_0x9841b6){const _0x1e2246=a40_0x3825a4;return{'service':_0x9841b6[_0x1e2246(0xb6)]?.['service'],'version':_0x9841b6[_0x1e2246(0xb6)]?.[_0x1e2246(0xc2)],'commandCount':_0x9841b6[_0x1e2246(0xb6)]?.[_0x1e2246(0x9a)]['length']??0x0,'commands':_0x9841b6['normalizedManifest']?.[_0x1e2246(0x9a)][_0x1e2246(0xc1)](_0x3dce96=>({'path':_0x3dce96[_0x1e2246(0xa1)],'risk':_0x3dce96[_0x1e2246(0x9e)],'target':toPublicServiceTreeTarget(_0x3dce96[_0x1e2246(0xc3)])}))??[],'registryIndex':_0x9841b6[_0x1e2246(0xc6)],'registryServiceCode':_0x9841b6[_0x1e2246(0x94)],'errors':_0x9841b6[_0x1e2246(0xa6)][_0x1e2246(0xd4)],'warnings':_0x9841b6[_0x1e2246(0xa6)][_0x1e2246(0x9f)]};}function a40_0x4692(_0x592a8e,_0x3d9d61){_0x592a8e=_0x592a8e-0x85;const _0x5c6380=a40_0x5c63();let _0x46920b=_0x5c6380[_0x592a8e];return _0x46920b;}export const serviceDefinitions=[{'service':a40_0x3825a4(0xae),'command':a40_0x3825a4(0xba),'description':a40_0x3825a4(0xa8),'risk':a40_0x3825a4(0xd3),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x217f6f){const _0x2db9d0=a40_0x3825a4,_0x58d96b=loadServiceManifestFromFile(_0x217f6f[_0x2db9d0(0xce)](_0x2db9d0(0xd0)));if(!_0x58d96b[_0x2db9d0(0xa6)]['ok'])return{'ok':![],'data':{'file':_0x58d96b[_0x2db9d0(0xbe)],'hash':_0x58d96b['hash'],'kind':_0x58d96b['kind'],'serviceCount':_0x58d96b[_0x2db9d0(0xd2)][_0x2db9d0(0xbd)],'services':_0x58d96b['manifests'][_0x2db9d0(0xc1)](summarizeLoadedManifest),'errors':_0x58d96b[_0x2db9d0(0xa6)][_0x2db9d0(0xd4)],'warnings':_0x58d96b['report'][_0x2db9d0(0x9f)]},'message':formatValidationFailure(_0x58d96b['report'])};if(_0x58d96b[_0x2db9d0(0x93)]===_0x2db9d0(0x85)||_0x58d96b[_0x2db9d0(0xd2)][_0x2db9d0(0xbd)]!==0x1)return{'ok':!![],'data':{'file':_0x58d96b[_0x2db9d0(0xbe)],'hash':_0x58d96b[_0x2db9d0(0xc4)],'kind':_0x58d96b[_0x2db9d0(0x93)],'serviceCount':_0x58d96b[_0x2db9d0(0xd2)]['length'],'commandCount':_0x58d96b[_0x2db9d0(0xd2)][_0x2db9d0(0x99)]((_0xa24c4e,_0x54b7e9)=>_0xa24c4e+(_0x54b7e9['normalizedManifest']?.[_0x2db9d0(0x9a)][_0x2db9d0(0xbd)]??0x0),0x0),'services':_0x58d96b[_0x2db9d0(0xd2)][_0x2db9d0(0xc1)](summarizeLoadedManifest),'warnings':_0x58d96b[_0x2db9d0(0xa6)]['warnings']},'message':_0x2db9d0(0xa9)};return{'ok':!![],'data':{'file':_0x58d96b['filePath'],'hash':_0x58d96b[_0x2db9d0(0xc4)],'kind':_0x58d96b[_0x2db9d0(0x93)],'service':_0x58d96b[_0x2db9d0(0xb6)]?.[_0x2db9d0(0xae)],'version':_0x58d96b[_0x2db9d0(0xb6)]?.[_0x2db9d0(0xc2)],'commandCount':_0x58d96b[_0x2db9d0(0xb6)]?.[_0x2db9d0(0x9a)]['length']??0x0,'commands':_0x58d96b['normalizedManifest']?.['commands'][_0x2db9d0(0xc1)](_0x13eaf0=>({'path':_0x13eaf0[_0x2db9d0(0xa1)],'risk':_0x13eaf0[_0x2db9d0(0x9e)],'target':toPublicServiceTreeTarget(_0x13eaf0[_0x2db9d0(0xc3)])})),'warnings':_0x58d96b[_0x2db9d0(0xa6)][_0x2db9d0(0x9f)]},'message':_0x2db9d0(0x8b)};}},{'service':'service','command':a40_0x3825a4(0xb5),'description':'Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x4d32ea){const _0x2050d7=a40_0x3825a4,_0x2c66f1=loadServiceManifestFromFile(_0x4d32ea['str']('file'));return{'method':_0x2050d7(0xb9),'url':getServiceRegistryPath(),'body':{'file':_0x2c66f1[_0x2050d7(0xbe)],'hash':_0x2c66f1[_0x2050d7(0xc4)],'kind':_0x2c66f1[_0x2050d7(0x93)],'ok':_0x2c66f1['report']['ok'],'service':_0x2c66f1[_0x2050d7(0xb6)]?.['service'],'version':_0x2c66f1[_0x2050d7(0xb6)]?.['version'],'serviceCount':_0x2c66f1[_0x2050d7(0xd2)][_0x2050d7(0xbd)],'services':_0x2c66f1['manifests'][_0x2050d7(0xc1)](_0x2487a9=>({'service':_0x2487a9['normalizedManifest']?.[_0x2050d7(0xae)],'version':_0x2487a9['normalizedManifest']?.[_0x2050d7(0xc2)],'commandCount':_0x2487a9['normalizedManifest']?.[_0x2050d7(0x9a)][_0x2050d7(0xbd)]??0x0,'errors':_0x2487a9[_0x2050d7(0xa6)][_0x2050d7(0xd4)]})),'errors':_0x2c66f1[_0x2050d7(0xa6)]['errors'],'commandCount':_0x2c66f1[_0x2050d7(0xb6)]?.[_0x2050d7(0x9a)][_0x2050d7(0xbd)]??0x0},'description':_0x2050d7(0xa3)};},async 'execute'(_0xbce47d){const _0x19ce89=a40_0x3825a4,_0x1fa153=importServiceManifest(_0xbce47d[_0x19ce89(0xce)](_0x19ce89(0xd0)));if(_0x1fa153[_0x19ce89(0x88)][_0x19ce89(0xbd)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x1fa153[_0x19ce89(0xb4)],'imported':_0x1fa153[_0x19ce89(0xb3)],'updated':_0x1fa153[_0x19ce89(0xb2)],'serviceCount':_0x1fa153[_0x19ce89(0xaf)],'services':_0x1fa153[_0x19ce89(0x88)]['map'](summarizeService)},'message':_0x19ce89(0xbc)+_0x1fa153[_0x19ce89(0xb3)]+'\x20service(s),\x20updated\x20'+_0x1fa153[_0x19ce89(0xb2)]+_0x19ce89(0xa4)};return{'ok':!![],'data':{'registryPath':_0x1fa153[_0x19ce89(0xb4)],'replaced':_0x1fa153[_0x19ce89(0x9d)],'imported':_0x1fa153[_0x19ce89(0xb3)],'updated':_0x1fa153[_0x19ce89(0xb2)],'serviceCount':_0x1fa153[_0x19ce89(0xaf)],'service':summarizeService(_0x1fa153['entry'])},'message':(_0x1fa153[_0x19ce89(0x9d)]?_0x19ce89(0xa0):_0x19ce89(0xaa))+_0x19ce89(0xcd)+_0x1fa153[_0x19ce89(0xbb)]['serviceCode']+'.'};}},{'service':a40_0x3825a4(0xae),'command':a40_0x3825a4(0x8a),'description':a40_0x3825a4(0x95),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x1859a1){const _0x60e97f=a40_0x3825a4,_0x529591=getLocalServiceEntry(_0x1859a1[_0x60e97f(0xce)](_0x60e97f(0xae)));return{'method':_0x60e97f(0xb9),'url':_0x1859a1[_0x60e97f(0xce)]('file'),'body':{'service':_0x1859a1[_0x60e97f(0xce)]('service'),'found':Boolean(_0x529591),'version':_0x529591?.[_0x60e97f(0xc2)],'source':_0x529591?.['source']},'description':_0x60e97f(0xb8)};},async 'execute'(_0x2358e1){const _0x558ca1=a40_0x3825a4,_0x5219f3=exportServiceManifest(_0x2358e1[_0x558ca1(0xce)](_0x558ca1(0xae)),_0x2358e1['str']('file'));return{'ok':!![],'data':{'registryPath':_0x5219f3[_0x558ca1(0xb4)],'file':_0x5219f3[_0x558ca1(0xbe)],'service':summarizeService(_0x5219f3[_0x558ca1(0xbb)])},'message':_0x558ca1(0xcb)+_0x5219f3[_0x558ca1(0xbb)][_0x558ca1(0xb1)]+'.'};}},{'service':'service','command':a40_0x3825a4(0xb7),'description':a40_0x3825a4(0xbf),'risk':a40_0x3825a4(0xd3),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x3a1a7d=a40_0x3825a4,_0x3c09b9=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x3c09b9['length'],'services':_0x3c09b9[_0x3a1a7d(0xc1)](summarizeService)}};}},{'service':a40_0x3825a4(0xae),'command':a40_0x3825a4(0x96),'description':a40_0x3825a4(0x97),'risk':a40_0x3825a4(0x9b),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x5eeebc){const _0x32f3fa=a40_0x3825a4,_0x431817=getLocalServiceEntry(_0x5eeebc[_0x32f3fa(0xce)](_0x32f3fa(0xae)));return{'method':_0x32f3fa(0xb9),'url':getServiceRegistryPath(),'body':{'service':_0x5eeebc[_0x32f3fa(0xce)](_0x32f3fa(0xae)),'found':Boolean(_0x431817),'version':_0x431817?.[_0x32f3fa(0xc2)],'source':_0x431817?.[_0x32f3fa(0xc7)]},'description':_0x32f3fa(0xca)};},async 'execute'(_0x330440){const _0x240880=a40_0x3825a4,_0x498671=removeServiceManifest(_0x330440['str'](_0x240880(0xae)));return{'ok':!![],'data':{'registryPath':_0x498671[_0x240880(0xb4)],'serviceCount':_0x498671[_0x240880(0xaf)],'service':summarizeService(_0x498671[_0x240880(0xbb)])},'message':_0x240880(0x89)+_0x498671[_0x240880(0xbb)][_0x240880(0xb1)]+'.'};}},{'service':a40_0x3825a4(0xae),'command':a40_0x3825a4(0xab),'description':a40_0x3825a4(0xc5),'risk':a40_0x3825a4(0xd3),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x333f0a){const _0x50e24d=a40_0x3825a4,_0x312c8f=getLocalServiceEntry(_0x333f0a[_0x50e24d(0xce)](_0x50e24d(0xae)));if(!_0x312c8f)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x333f0a['str'](_0x50e24d(0xae))},'message':_0x50e24d(0x91)+_0x333f0a['str'](_0x50e24d(0xae))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x312c8f),'manifest':_0x312c8f[_0x50e24d(0xb0)],'normalizedManifest':toPublicNormalizedServiceTree(_0x312c8f[_0x50e24d(0xb6)])}};}}];function a40_0x5c63(){const _0x10723f=['Service\x20manifest\x20validation\x20passed.','4819280ysbpeS','2306838YqWmrM','8xjbQUi','string','flags','Local\x20service\x20not\x20found:\x20','193uDGDtN','kind','registryServiceCode','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','remove','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','1384053pcVZGB','reduce','commands','write','importedAt','replaced','risk','warnings','Updated','cliPath','1615869MBIhKf','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','\x20service(s).','Service\x20Tree\x20manifest\x20file\x20path','report','lower\x20kebab-case\x20service\x20code','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','Service\x20registry\x20validation\x20passed.','Imported','detail','7jxPkZp','required','service','serviceCount','manifest','serviceCode','updated','imported','registryPath','import','normalizedManifest','list','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','WRITE','validate','entry','Imported\x20','length','filePath','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','3974HaEwdz','map','version','target','hash','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','registryIndex','source','221650xcwyVC','type','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','Exported\x20service\x20','1506332BOZKbf','\x20service\x20','str','name','file','cliName','manifests','read','errors','registry','Local\x20service\x20code,\x20for\x20example\x20crm','description','entries','Removed\x20service\x20','export'];a40_0x5c63=function(){return _0x10723f;};return a40_0x5c63();}
|
|
1
|
+
const a40_0x25c448=a40_0x11c7;(function(_0x36ed57,_0x5617f0){const _0x2db371=a40_0x11c7,_0x462130=_0x36ed57();while(!![]){try{const _0x184b9e=parseInt(_0x2db371(0xe3))/0x1+parseInt(_0x2db371(0xdb))/0x2*(parseInt(_0x2db371(0xd7))/0x3)+-parseInt(_0x2db371(0x11d))/0x4+parseInt(_0x2db371(0xfb))/0x5+-parseInt(_0x2db371(0xde))/0x6*(parseInt(_0x2db371(0x10f))/0x7)+-parseInt(_0x2db371(0x10b))/0x8*(parseInt(_0x2db371(0xe9))/0x9)+parseInt(_0x2db371(0x11a))/0xa;if(_0x184b9e===_0x5617f0)break;else _0x462130['push'](_0x462130['shift']());}catch(_0x26130b){_0x462130['push'](_0x462130['shift']());}}}(a40_0x113e,0xf1b6b));function a40_0x11c7(_0x45d27b,_0x45e608){_0x45d27b=_0x45d27b-0xd6;const _0x113e16=a40_0x113e();let _0x11c76f=_0x113e16[_0x45d27b];return _0x11c76f;}import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':'file','type':a40_0x25c448(0xed),'required':!![],'description':a40_0x25c448(0x10a)},SERVICE_FLAG={'name':a40_0x25c448(0xdc),'type':a40_0x25c448(0xed),'required':!![],'description':a40_0x25c448(0x10e),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function summarizeService(_0x5d67ca){const _0x1a92e4=a40_0x25c448;return{'serviceCode':_0x5d67ca['serviceCode'],'name':_0x5d67ca[_0x1a92e4(0x102)][_0x1a92e4(0xdc)]['name'],'version':_0x5d67ca[_0x1a92e4(0xfd)],'importedAt':_0x5d67ca[_0x1a92e4(0xee)],'source':_0x5d67ca[_0x1a92e4(0xf6)],'commandCount':_0x5d67ca['normalizedManifest'][_0x1a92e4(0xe5)][_0x1a92e4(0xec)],'commands':_0x5d67ca[_0x1a92e4(0x102)]['commands'][_0x1a92e4(0xda)](_0x29a207=>({'path':_0x29a207['cliPath'],'description':_0x29a207[_0x1a92e4(0xd8)],'risk':_0x29a207['risk'],'target':toPublicServiceTreeTarget(_0x29a207[_0x1a92e4(0xf1)]),'flags':_0x29a207[_0x1a92e4(0x118)]['map'](_0x4b1eb7=>({'name':_0x4b1eb7[_0x1a92e4(0x109)],'cliName':_0x4b1eb7[_0x1a92e4(0xea)],'type':_0x4b1eb7[_0x1a92e4(0xf5)],'required':_0x4b1eb7[_0x1a92e4(0xe6)]===!![]}))}))};}function a40_0x113e(){const _0x332196=['1991150WVXqhx','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','hash','6642308BIWczK','Imported\x20','1137dqYcqJ','description','risk','map','9762hYBjtj','service','export','7278WRMnjV','reduce','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','read','registryServiceCode','1573746MqGUMl','filePath','commands','required','updated','entry','809082AVpUzr','cliName','manifest','length','string','importedAt','Removed\x20service\x20','file','target','registry','kind','WRITE','type','source','serviceCode','list','warnings','serviceCount','9859245cvWQNP','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','version','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','imported','report','str','normalizedManifest','cliPath','write','detail','Updated','\x20service(s).','Exported\x20service\x20','name','Service\x20Tree\x20manifest\x20file\x20path','144RGqzZP','registryPath','entries','Local\x20service\x20code,\x20for\x20example\x20crm','7651zVgDzS','replaced','Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','Local\x20service\x20not\x20found:\x20','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','errors','import','\x20service\x20','flags','manifests'];a40_0x113e=function(){return _0x332196;};return a40_0x113e();}function summarizeLoadedManifest(_0x40b334){const _0x83c34c=a40_0x25c448;return{'service':_0x40b334['normalizedManifest']?.[_0x83c34c(0xdc)],'version':_0x40b334[_0x83c34c(0x102)]?.[_0x83c34c(0xfd)],'commandCount':_0x40b334[_0x83c34c(0x102)]?.['commands'][_0x83c34c(0xec)]??0x0,'commands':_0x40b334[_0x83c34c(0x102)]?.['commands'][_0x83c34c(0xda)](_0x562629=>({'path':_0x562629[_0x83c34c(0x103)],'risk':_0x562629[_0x83c34c(0xd9)],'target':toPublicServiceTreeTarget(_0x562629[_0x83c34c(0xf1)])}))??[],'registryIndex':_0x40b334['registryIndex'],'registryServiceCode':_0x40b334[_0x83c34c(0xe2)],'errors':_0x40b334[_0x83c34c(0x100)][_0x83c34c(0x115)],'warnings':_0x40b334[_0x83c34c(0x100)][_0x83c34c(0xf9)]};}export const serviceDefinitions=[{'service':a40_0x25c448(0xdc),'command':'validate','description':'Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','risk':a40_0x25c448(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x490860){const _0x24e67d=a40_0x25c448,_0x54ba5c=loadServiceManifestFromFile(_0x490860[_0x24e67d(0x101)](_0x24e67d(0xf0)));if(!_0x54ba5c['report']['ok'])return{'ok':![],'data':{'file':_0x54ba5c[_0x24e67d(0xe4)],'hash':_0x54ba5c[_0x24e67d(0x11c)],'kind':_0x54ba5c[_0x24e67d(0xf3)],'serviceCount':_0x54ba5c[_0x24e67d(0x119)][_0x24e67d(0xec)],'services':_0x54ba5c[_0x24e67d(0x119)][_0x24e67d(0xda)](summarizeLoadedManifest),'errors':_0x54ba5c['report'][_0x24e67d(0x115)],'warnings':_0x54ba5c[_0x24e67d(0x100)][_0x24e67d(0xf9)]},'message':formatValidationFailure(_0x54ba5c['report'])};if(_0x54ba5c[_0x24e67d(0xf3)]===_0x24e67d(0xf2)||_0x54ba5c[_0x24e67d(0x119)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x54ba5c[_0x24e67d(0xe4)],'hash':_0x54ba5c[_0x24e67d(0x11c)],'kind':_0x54ba5c[_0x24e67d(0xf3)],'serviceCount':_0x54ba5c['manifests']['length'],'commandCount':_0x54ba5c['manifests'][_0x24e67d(0xdf)]((_0xd48160,_0xee2ce9)=>_0xd48160+(_0xee2ce9[_0x24e67d(0x102)]?.['commands'][_0x24e67d(0xec)]??0x0),0x0),'services':_0x54ba5c[_0x24e67d(0x119)][_0x24e67d(0xda)](summarizeLoadedManifest),'warnings':_0x54ba5c[_0x24e67d(0x100)][_0x24e67d(0xf9)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x54ba5c[_0x24e67d(0xe4)],'hash':_0x54ba5c[_0x24e67d(0x11c)],'kind':_0x54ba5c[_0x24e67d(0xf3)],'service':_0x54ba5c[_0x24e67d(0x102)]?.[_0x24e67d(0xdc)],'version':_0x54ba5c[_0x24e67d(0x102)]?.[_0x24e67d(0xfd)],'commandCount':_0x54ba5c[_0x24e67d(0x102)]?.['commands'][_0x24e67d(0xec)]??0x0,'commands':_0x54ba5c[_0x24e67d(0x102)]?.[_0x24e67d(0xe5)][_0x24e67d(0xda)](_0x5dcf1f=>({'path':_0x5dcf1f[_0x24e67d(0x103)],'risk':_0x5dcf1f[_0x24e67d(0xd9)],'target':toPublicServiceTreeTarget(_0x5dcf1f[_0x24e67d(0xf1)])})),'warnings':_0x54ba5c[_0x24e67d(0x100)][_0x24e67d(0xf9)]},'message':'Service\x20manifest\x20validation\x20passed.'};}},{'service':a40_0x25c448(0xdc),'command':a40_0x25c448(0x116),'description':a40_0x25c448(0x112),'risk':a40_0x25c448(0x104),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x5de56c){const _0x5a9569=a40_0x25c448,_0xec60e=loadServiceManifestFromFile(_0x5de56c[_0x5a9569(0x101)](_0x5a9569(0xf0)));return{'method':_0x5a9569(0xf4),'url':getServiceRegistryPath(),'body':{'file':_0xec60e['filePath'],'hash':_0xec60e[_0x5a9569(0x11c)],'kind':_0xec60e['kind'],'ok':_0xec60e[_0x5a9569(0x100)]['ok'],'service':_0xec60e[_0x5a9569(0x102)]?.['service'],'version':_0xec60e[_0x5a9569(0x102)]?.['version'],'serviceCount':_0xec60e[_0x5a9569(0x119)][_0x5a9569(0xec)],'services':_0xec60e[_0x5a9569(0x119)][_0x5a9569(0xda)](_0x357e67=>({'service':_0x357e67[_0x5a9569(0x102)]?.[_0x5a9569(0xdc)],'version':_0x357e67['normalizedManifest']?.[_0x5a9569(0xfd)],'commandCount':_0x357e67[_0x5a9569(0x102)]?.[_0x5a9569(0xe5)][_0x5a9569(0xec)]??0x0,'errors':_0x357e67[_0x5a9569(0x100)]['errors']})),'errors':_0xec60e[_0x5a9569(0x100)]['errors'],'commandCount':_0xec60e[_0x5a9569(0x102)]?.[_0x5a9569(0xe5)][_0x5a9569(0xec)]??0x0},'description':'Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json'};},async 'execute'(_0x11e52f){const _0x57cbe9=a40_0x25c448,_0x5f949c=importServiceManifest(_0x11e52f[_0x57cbe9(0x101)]('file'));if(_0x5f949c[_0x57cbe9(0x10d)][_0x57cbe9(0xec)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x5f949c['registryPath'],'imported':_0x5f949c[_0x57cbe9(0xff)],'updated':_0x5f949c[_0x57cbe9(0xe7)],'serviceCount':_0x5f949c[_0x57cbe9(0xfa)],'services':_0x5f949c[_0x57cbe9(0x10d)]['map'](summarizeService)},'message':_0x57cbe9(0xd6)+_0x5f949c[_0x57cbe9(0xff)]+'\x20service(s),\x20updated\x20'+_0x5f949c[_0x57cbe9(0xe7)]+_0x57cbe9(0x107)};return{'ok':!![],'data':{'registryPath':_0x5f949c[_0x57cbe9(0x10c)],'replaced':_0x5f949c[_0x57cbe9(0x110)],'imported':_0x5f949c[_0x57cbe9(0xff)],'updated':_0x5f949c['updated'],'serviceCount':_0x5f949c[_0x57cbe9(0xfa)],'service':summarizeService(_0x5f949c['entry'])},'message':(_0x5f949c[_0x57cbe9(0x110)]?_0x57cbe9(0x106):'Imported')+_0x57cbe9(0x117)+_0x5f949c[_0x57cbe9(0xe8)]['serviceCode']+'.'};}},{'service':'service','command':a40_0x25c448(0xdd),'description':a40_0x25c448(0xfc),'risk':a40_0x25c448(0x104),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x2e4802){const _0x4c88a9=a40_0x25c448,_0x48b5c3=getLocalServiceEntry(_0x2e4802[_0x4c88a9(0x101)](_0x4c88a9(0xdc)));return{'method':_0x4c88a9(0xf4),'url':_0x2e4802['str'](_0x4c88a9(0xf0)),'body':{'service':_0x2e4802[_0x4c88a9(0x101)](_0x4c88a9(0xdc)),'found':Boolean(_0x48b5c3),'version':_0x48b5c3?.[_0x4c88a9(0xfd)],'source':_0x48b5c3?.[_0x4c88a9(0xf6)]},'description':_0x4c88a9(0xe0)};},async 'execute'(_0xdea46){const _0x393949=a40_0x25c448,_0x27cfe4=exportServiceManifest(_0xdea46[_0x393949(0x101)]('service'),_0xdea46['str'](_0x393949(0xf0)));return{'ok':!![],'data':{'registryPath':_0x27cfe4[_0x393949(0x10c)],'file':_0x27cfe4[_0x393949(0xe4)],'service':summarizeService(_0x27cfe4['entry'])},'message':_0x393949(0x108)+_0x27cfe4[_0x393949(0xe8)][_0x393949(0xf7)]+'.'};}},{'service':a40_0x25c448(0xdc),'command':a40_0x25c448(0xf8),'description':a40_0x25c448(0x11b),'risk':a40_0x25c448(0xe1),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x3e3390=a40_0x25c448,_0x48fd08=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x48fd08[_0x3e3390(0xec)],'services':_0x48fd08['map'](summarizeService)}};}},{'service':a40_0x25c448(0xdc),'command':'remove','description':a40_0x25c448(0x111),'risk':a40_0x25c448(0x104),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x5b0a23){const _0x496f17=a40_0x25c448,_0x2c732f=getLocalServiceEntry(_0x5b0a23[_0x496f17(0x101)](_0x496f17(0xdc)));return{'method':_0x496f17(0xf4),'url':getServiceRegistryPath(),'body':{'service':_0x5b0a23[_0x496f17(0x101)](_0x496f17(0xdc)),'found':Boolean(_0x2c732f),'version':_0x2c732f?.[_0x496f17(0xfd)],'source':_0x2c732f?.['source']},'description':_0x496f17(0x114)};},async 'execute'(_0x3201d4){const _0x2fa699=a40_0x25c448,_0x3bdc93=removeServiceManifest(_0x3201d4[_0x2fa699(0x101)](_0x2fa699(0xdc)));return{'ok':!![],'data':{'registryPath':_0x3bdc93[_0x2fa699(0x10c)],'serviceCount':_0x3bdc93[_0x2fa699(0xfa)],'service':summarizeService(_0x3bdc93[_0x2fa699(0xe8)])},'message':_0x2fa699(0xef)+_0x3bdc93['entry']['serviceCode']+'.'};}},{'service':'service','command':a40_0x25c448(0x105),'description':a40_0x25c448(0xfe),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x4f3634){const _0x59fe96=a40_0x25c448,_0x50b799=getLocalServiceEntry(_0x4f3634[_0x59fe96(0x101)](_0x59fe96(0xdc)));if(!_0x50b799)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x4f3634[_0x59fe96(0x101)](_0x59fe96(0xdc))},'message':_0x59fe96(0x113)+_0x4f3634[_0x59fe96(0x101)](_0x59fe96(0xdc))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x50b799),'manifest':_0x50b799[_0x59fe96(0xeb)],'normalizedManifest':toPublicNormalizedServiceTree(_0x50b799[_0x59fe96(0x102)])}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x1c2c9f=a41_0x5ecd;(function(_0x2354f8,_0x422348){const _0x3d5b7a=a41_0x5ecd,_0x421eb0=_0x2354f8();while(!![]){try{const _0x3abbbe=-parseInt(_0x3d5b7a(0x126))/0x1+-parseInt(_0x3d5b7a(0x169))/0x2*(-parseInt(_0x3d5b7a(0x12a))/0x3)+parseInt(_0x3d5b7a(0x148))/0x4+-parseInt(_0x3d5b7a(0x11d))/0x5*(parseInt(_0x3d5b7a(0x11a))/0x6)+-parseInt(_0x3d5b7a(0x143))/0x7+-parseInt(_0x3d5b7a(0x161))/0x8*(parseInt(_0x3d5b7a(0x165))/0x9)+-parseInt(_0x3d5b7a(0x13d))/0xa;if(_0x3abbbe===_0x422348)break;else _0x421eb0['push'](_0x421eb0['shift']());}catch(_0x23207c){_0x421eb0['push'](_0x421eb0['shift']());}}}(a41_0x208f,0xa024d));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=a41_0x1c2c9f(0x16f);export function getServiceRegistryPath(_0x1d4394={}){const _0x49de84=a41_0x1c2c9f;return resolve(_0x1d4394[_0x49de84(0x155)]??homedir(),PRODUCT_CONFIG[_0x49de84(0x132)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}function a41_0x208f(){const _0x4fd099=['555030SqtUDI','Local\x20service\x20not\x20found:\x20','object','parse','cliPath','4935672ZCUAJD','Cannot\x20write\x20service\x20registry:\x20','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','code','risk','reduce','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','errors','push','message','schemaVersion','report','homeDir','version','sourceHash','now','manifests','string','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','flatMap','services','commands','.tmp','normalizedManifest','210088iCAram','missing','validation','findIndex','9lilqZv','].manifest.','description','hex','2298854EDKGgQ','empty','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','stringify','].manifest','sort','service.json','246wWKlFR','slice','utf8','107945rwLtWQ','map','startsWith','invalid','filePath','manifest','updatedAt','update','Unsupported\x20service\x20registry\x20schemaVersion:\x20','733517zMZhBw','toISOString','registryIndex','length','3ChYlKb','commandCount','name','file','trim','registry','$.services[','serviceCode','homeDirName','target','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','services\x20must\x20be\x20an\x20array','Service\x20manifest\x20file\x20not\x20found:\x20','digest','source','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','warnings','kind','isArray','31790cfzBtt','Unsupported\x20schemaVersion:\x20','sha256','command','path','service'];a41_0x208f=function(){return _0x4fd099;};return a41_0x208f();}export function readServiceRegistry(_0x27450b={}){const _0x4ce3ed=a41_0x1c2c9f,_0x211dbe=getServiceRegistryPath(_0x27450b);if(!existsSync(_0x211dbe))return emptyServiceRegistry();try{const _0x340f7e=readFileSync(_0x211dbe,_0x4ce3ed(0x11c));if(!_0x340f7e[_0x4ce3ed(0x12e)]())return emptyServiceRegistry();const _0x21a06f=JSON[_0x4ce3ed(0x146)](_0x340f7e);if(_0x21a06f['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x4ce3ed(0x163)](_0x4ce3ed(0x125)+String(_0x21a06f[_0x4ce3ed(0x153)]),'Remove\x20or\x20migrate\x20'+_0x211dbe+'.');if(!Array[_0x4ce3ed(0x13c)](_0x21a06f[_0x4ce3ed(0x15d)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x21a06f['updatedAt'],'services':_0x21a06f[_0x4ce3ed(0x15d)]};}catch(_0x5d3cb6){if(_0x5d3cb6 instanceof Error&&_0x5d3cb6[_0x4ce3ed(0x12c)]==='CliError')throw _0x5d3cb6;throw CliErrors[_0x4ce3ed(0x163)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x211dbe,_0x4ce3ed(0x16b));}}export function writeServiceRegistry(_0x332a97,_0x4caa3e={}){const _0x12989a=a41_0x1c2c9f,_0x2c5130=getServiceRegistryPath(_0x4caa3e),_0x4862c5=dirname(_0x2c5130);!existsSync(_0x4862c5)&&mkdirSync(_0x4862c5,{'recursive':!![]});const _0x293e78=_0x2c5130+_0x12989a(0x15f);try{writeFileSync(_0x293e78,JSON[_0x12989a(0x16c)](_0x332a97,null,0x2)+'\x0a',{'encoding':_0x12989a(0x11c),'mode':0x180}),renameSync(_0x293e78,_0x2c5130);}catch(_0x3b3690){try{unlinkSync(_0x293e78);}catch{}if(_0x3b3690?.[_0x12989a(0x14b)]==='ENOENT')throw CliErrors['validation'](_0x12989a(0x149)+_0x2c5130);throw _0x3b3690;}return _0x2c5130;}export function loadServiceManifestFromFile(_0x359c42){const _0x4a14fa=a41_0x1c2c9f,_0x5c8fbf=resolve(_0x359c42);if(!existsSync(_0x5c8fbf))throw CliErrors[_0x4a14fa(0x163)](_0x4a14fa(0x136)+_0x359c42);let _0x57e94d;const _0x4cdba5=readFileSync(_0x5c8fbf,_0x4a14fa(0x11c));try{_0x57e94d=JSON[_0x4a14fa(0x146)](_0x4cdba5);}catch{throw CliErrors['validation']('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x359c42,_0x4a14fa(0x139));}const _0x2922fa=sha256(_0x4cdba5),_0x58d513=extractLoadedServiceManifests(_0x57e94d,_0x2922fa),_0x50190b=aggregateValidationReports(_0x58d513),_0x435d90=_0x58d513[0x0];return{'filePath':_0x5c8fbf,'hash':_0x2922fa,'kind':isServiceRegistryLike(_0x57e94d)?_0x4a14fa(0x12f):'manifest','manifest':_0x435d90?.[_0x4a14fa(0x122)]??_0x57e94d,'report':_0x50190b,'normalizedManifest':_0x58d513[_0x4a14fa(0x129)]===0x1?_0x435d90?.[_0x4a14fa(0x160)]:undefined,'manifests':_0x58d513};}export function importServiceManifest(_0x5a36bd,_0x57479a={}){const _0x1f2599=a41_0x1c2c9f,_0x4d97bd=loadServiceManifestFromFile(_0x5a36bd);if(!_0x4d97bd[_0x1f2599(0x154)]['ok'])throw CliErrors[_0x1f2599(0x163)](formatValidationFailure(_0x4d97bd[_0x1f2599(0x154)]),_0x1f2599(0x14f));if(_0x4d97bd['manifests'][_0x1f2599(0x129)]===0x0)throw CliErrors[_0x1f2599(0x163)](_0x1f2599(0x14a),_0x1f2599(0x14e));const _0x287a33=readServiceRegistry(_0x57479a),_0x581165=(_0x57479a[_0x1f2599(0x158)]??(()=>new Date()))()[_0x1f2599(0x127)](),_0x2473b7=[];let _0x47bf47=0x0,_0x1c1452=0x0;for(const _0x182ae9 of _0x4d97bd[_0x1f2599(0x159)]){if(!_0x182ae9[_0x1f2599(0x160)])continue;const _0x5cb6c5=_0x182ae9[_0x1f2599(0x160)][_0x1f2599(0x142)][_0x1f2599(0x14b)],_0x26f7c4={'serviceCode':_0x5cb6c5,'version':_0x182ae9[_0x1f2599(0x160)][_0x1f2599(0x156)],'importedAt':_0x581165,'source':{'type':_0x1f2599(0x12d),'path':_0x4d97bd[_0x1f2599(0x121)],'hash':_0x182ae9[_0x1f2599(0x157)]},'manifest':_0x182ae9[_0x1f2599(0x122)],'normalizedManifest':_0x182ae9[_0x1f2599(0x160)]},_0x75fe14=_0x287a33[_0x1f2599(0x15d)][_0x1f2599(0x164)](_0x311748=>_0x311748[_0x1f2599(0x131)]===_0x5cb6c5);_0x75fe14>=0x0?(_0x287a33[_0x1f2599(0x15d)][_0x75fe14]=_0x26f7c4,_0x1c1452++):(_0x287a33[_0x1f2599(0x15d)]['push'](_0x26f7c4),_0x47bf47++),_0x2473b7[_0x1f2599(0x151)](_0x26f7c4);}_0x287a33[_0x1f2599(0x15d)][_0x1f2599(0x16e)]((_0x1ad984,_0x36b989)=>_0x1ad984[_0x1f2599(0x131)]['localeCompare'](_0x36b989[_0x1f2599(0x131)])),_0x287a33['updatedAt']=_0x581165;const _0x1d9190=writeServiceRegistry(_0x287a33,_0x57479a);return{'registryPath':_0x1d9190,'entry':_0x2473b7[0x0],'replaced':_0x2473b7[_0x1f2599(0x129)]===0x1?_0x1c1452===0x1:_0x1c1452>0x0,'entries':_0x2473b7,'imported':_0x47bf47,'updated':_0x1c1452,'serviceCount':_0x287a33[_0x1f2599(0x15d)]['length']};}export function exportServiceManifest(_0x59f9f9,_0x3f1b8b,_0x55ccda={}){const _0x5a5f70=a41_0x1c2c9f,_0x1b0dfa=getServiceRegistryPath(_0x55ccda),_0x385cc4=getLocalServiceEntry(_0x59f9f9,_0x55ccda);if(!_0x385cc4)throw CliErrors[_0x5a5f70(0x163)](_0x5a5f70(0x144)+_0x59f9f9,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x512b25=resolve(_0x3f1b8b),_0x583d4c=dirname(_0x512b25);return!existsSync(_0x583d4c)&&mkdirSync(_0x583d4c,{'recursive':!![]}),writeFileSync(_0x512b25,JSON['stringify'](_0x385cc4[_0x5a5f70(0x122)],null,0x2)+'\x0a',{'encoding':_0x5a5f70(0x11c),'mode':0x180}),{'registryPath':_0x1b0dfa,'filePath':_0x512b25,'entry':_0x385cc4};}export function removeServiceManifest(_0x27e3a8,_0x48601f={}){const _0x3b29fa=a41_0x1c2c9f,_0x4d8c2b=readServiceRegistry(_0x48601f),_0x3ce4f1=_0x27e3a8[_0x3b29fa(0x12e)](),_0x249159=_0x4d8c2b[_0x3b29fa(0x15d)]['findIndex'](_0x542357=>_0x542357[_0x3b29fa(0x131)]===_0x3ce4f1);if(_0x249159<0x0)throw CliErrors['validation']('Local\x20service\x20not\x20found:\x20'+_0x3ce4f1,_0x3b29fa(0x15b));const [_0x4d852c]=_0x4d8c2b[_0x3b29fa(0x15d)]['splice'](_0x249159,0x1),_0x1c671b=(_0x48601f[_0x3b29fa(0x158)]??(()=>new Date()))()[_0x3b29fa(0x127)]();_0x4d8c2b[_0x3b29fa(0x123)]=_0x1c671b;const _0x4f7611=writeServiceRegistry(_0x4d8c2b,_0x48601f);return{'registryPath':_0x4f7611,'entry':_0x4d852c,'serviceCount':_0x4d8c2b[_0x3b29fa(0x15d)]['length']};}export function listLocalServices(_0x3fc36d={}){const _0x2abc75=a41_0x1c2c9f;return readServiceRegistry(_0x3fc36d)[_0x2abc75(0x15d)];}export function getLocalServiceEntry(_0x1de07a,_0x46c7e1={}){const _0x4959ad=a41_0x1c2c9f;return readServiceRegistry(_0x46c7e1)[_0x4959ad(0x15d)]['find'](_0x375a1d=>_0x375a1d[_0x4959ad(0x131)]===_0x1de07a[_0x4959ad(0x12e)]());}export function listLocalServiceTrees(_0x1f9bf1={}){const _0x49ecc2=a41_0x1c2c9f;return readServiceRegistry(_0x1f9bf1)[_0x49ecc2(0x15d)][_0x49ecc2(0x11e)](_0x15377b=>_0x15377b[_0x49ecc2(0x160)]);}export function inspectServiceRegistry(_0x5d6b4c={}){const _0xcc1997=a41_0x1c2c9f,_0x52a713=getServiceRegistryPath(_0x5d6b4c);if(!existsSync(_0x52a713))return emptyServiceRegistryInspection(_0x52a713,_0xcc1997(0x162),![]);try{const _0xd2b754=readFileSync(_0x52a713,'utf8');if(!_0xd2b754['trim']())return emptyServiceRegistryInspection(_0x52a713,_0xcc1997(0x16a),!![]);const _0x1b7887=JSON[_0xcc1997(0x146)](_0xd2b754);if(_0x1b7887[_0xcc1997(0x153)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x52a713,_0xcc1997(0x120),!![]),'schemaVersion':_0x1b7887[_0xcc1997(0x153)],'message':_0xcc1997(0x13e)+String(_0x1b7887[_0xcc1997(0x153)])};if(!Array[_0xcc1997(0x13c)](_0x1b7887[_0xcc1997(0x15d)]))return{...emptyServiceRegistryInspection(_0x52a713,_0xcc1997(0x120),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1b7887[_0xcc1997(0x123)],'message':_0xcc1997(0x135)};const _0x176092=_0x1b7887[_0xcc1997(0x15d)][_0xcc1997(0x11e)](summarizeLocalServiceEntry);return{'registryPath':_0x52a713,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x1b7887['updatedAt'],'serviceCount':_0x176092['length'],'commandCount':_0x176092[_0xcc1997(0x14d)]((_0x4062b8,_0x4596e7)=>_0x4062b8+_0x4596e7[_0xcc1997(0x12b)],0x0),'services':_0x176092};}catch(_0x2fe2f0){return{...emptyServiceRegistryInspection(_0x52a713,_0xcc1997(0x120),!![]),'message':_0x2fe2f0 instanceof Error?_0x2fe2f0[_0xcc1997(0x152)]:String(_0x2fe2f0)};}}export function formatValidationFailure(_0x13e8fd){const _0x38aa39=a41_0x1c2c9f,_0x29cae0=_0x13e8fd[_0x38aa39(0x150)][_0x38aa39(0x11e)](_0x5ec2c9=>_0x5ec2c9['path']+':\x20'+_0x5ec2c9[_0x38aa39(0x152)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x29cae0['join']('\x0a');}function extractLoadedServiceManifests(_0x2d0ffd,_0x21dfa4){const _0x232422=a41_0x1c2c9f;if(!isServiceRegistryLike(_0x2d0ffd)){const _0x51c364=_0x2d0ffd,{manifest:_0x441c2e,errors:_0x1da3be}=adaptServiceTreeManifestForLegacyFramework(_0x51c364),_0x6fdbf9=validateServiceTreeManifest(_0x441c2e),_0x2d7424=mergeValidationErrors(_0x6fdbf9,_0x1da3be);return[{'manifest':_0x51c364,'report':_0x2d7424,'normalizedManifest':_0x2d7424['ok']?normalizeServiceTreeManifest(_0x441c2e):undefined,'sourceHash':_0x21dfa4}];}return _0x2d0ffd['services'][_0x232422(0x11e)]((_0x13ad4a,_0xbb0ef9)=>{const _0x1f6041=_0x232422,_0x18022d=isObjectRecord(_0x13ad4a)?_0x13ad4a[_0x1f6041(0x122)]:undefined,{manifest:_0x3666ce,errors:_0x158c51}=adaptServiceTreeManifestForLegacyFramework(_0x18022d),_0x390110=validateServiceTreeManifest(_0x3666ce),_0x23eea7=mergeValidationErrors(_0x390110,_0x158c51),_0x32ad6f=isObjectRecord(_0x13ad4a)&&typeof _0x13ad4a[_0x1f6041(0x131)]===_0x1f6041(0x15a)?_0x13ad4a[_0x1f6041(0x131)]:undefined;return{'manifest':_0x18022d,'report':_0x23eea7,'normalizedManifest':_0x23eea7['ok']?normalizeServiceTreeManifest(_0x3666ce):undefined,'sourceHash':sha256(JSON['stringify'](_0x18022d,null,0x2)+'\x0a'),'registryIndex':_0xbb0ef9,'registryServiceCode':_0x32ad6f};});}function mergeValidationErrors(_0x295131,_0x1ec7bc){const _0x513f94=a41_0x1c2c9f,_0x5d05a7=_0x295131[_0x513f94(0x150)][_0x513f94(0x11e)](_0x13436d=>_0x13436d[_0x513f94(0x152)]===_0x513f94(0x134)?{..._0x13436d,'message':'bff\x20target\x20requires\x20functionName.'}:_0x13436d),_0x522fb0=[..._0x1ec7bc,..._0x5d05a7];return{'ok':_0x522fb0[_0x513f94(0x129)]===0x0,'errors':_0x522fb0,'warnings':_0x295131['warnings']};}function a41_0x5ecd(_0x295940,_0x13a753){_0x295940=_0x295940-0x11a;const _0x208f74=a41_0x208f();let _0x5ecdc1=_0x208f74[_0x295940];return _0x5ecdc1;}function aggregateValidationReports(_0x22ee33){const _0x162ec4=a41_0x1c2c9f,_0x2bfc67=_0x22ee33[_0x162ec4(0x15c)](_0x4cf6e2=>_0x4cf6e2[_0x162ec4(0x128)]===undefined?_0x4cf6e2['report']['errors']:_0x4cf6e2['report'][_0x162ec4(0x150)]['map'](_0x18e33a=>({..._0x18e33a,'path':prefixRegistryIssuePath(_0x4cf6e2['registryIndex'],_0x18e33a[_0x162ec4(0x141)])}))),_0x47d387=_0x22ee33[_0x162ec4(0x15c)](_0x3deba6=>_0x3deba6['registryIndex']===undefined?_0x3deba6[_0x162ec4(0x154)][_0x162ec4(0x13a)]:_0x3deba6['report'][_0x162ec4(0x13a)][_0x162ec4(0x11e)](_0x1a17e9=>({..._0x1a17e9,'path':prefixRegistryIssuePath(_0x3deba6['registryIndex'],_0x1a17e9[_0x162ec4(0x141)])})));return{'ok':_0x2bfc67[_0x162ec4(0x129)]===0x0,'errors':_0x2bfc67,'warnings':_0x47d387};}function prefixRegistryIssuePath(_0x1c2a0b,_0x190a41){const _0x1007f6=a41_0x1c2c9f;if(_0x190a41==='$')return _0x1007f6(0x130)+_0x1c2a0b+_0x1007f6(0x16d);if(_0x190a41['startsWith']('$.'))return _0x1007f6(0x130)+_0x1c2a0b+_0x1007f6(0x16d)+_0x190a41['slice'](0x1);if(_0x190a41[_0x1007f6(0x11f)]('$['))return _0x1007f6(0x130)+_0x1c2a0b+_0x1007f6(0x16d)+_0x190a41[_0x1007f6(0x11b)](0x1);return _0x1007f6(0x130)+_0x1c2a0b+_0x1007f6(0x166)+_0x190a41;}function isServiceRegistryLike(_0x2dc7fd){const _0x505e5f=a41_0x1c2c9f;return isObjectRecord(_0x2dc7fd)&&_0x2dc7fd[_0x505e5f(0x153)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x2dc7fd[_0x505e5f(0x15d)]);}function isObjectRecord(_0x1113ad){const _0x19994a=a41_0x1c2c9f;return Boolean(_0x1113ad)&&typeof _0x1113ad===_0x19994a(0x145)&&!Array[_0x19994a(0x13c)](_0x1113ad);}function emptyServiceRegistryInspection(_0x5bff5a,_0x25a35f,_0x1504b4){return{'registryPath':_0x5bff5a,'exists':_0x1504b4,'status':_0x25a35f,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1d81ef){const _0xcda8c3=a41_0x1c2c9f,_0x481f1f=_0x1d81ef[_0xcda8c3(0x160)],_0x242bb2=_0x481f1f[_0xcda8c3(0x15e)][_0xcda8c3(0x11e)](_0x53d8fc=>({'path':_0x53d8fc[_0xcda8c3(0x147)],'description':_0x53d8fc[_0xcda8c3(0x167)],'risk':_0x53d8fc[_0xcda8c3(0x14c)],'targetKind':_0x53d8fc[_0xcda8c3(0x133)][_0xcda8c3(0x13b)],'targetCommand':_0x53d8fc[_0xcda8c3(0x133)][_0xcda8c3(0x140)]}));return{'serviceCode':_0x1d81ef[_0xcda8c3(0x131)],'name':_0x481f1f[_0xcda8c3(0x142)][_0xcda8c3(0x12c)],'description':_0x481f1f['service'][_0xcda8c3(0x167)],'version':_0x1d81ef[_0xcda8c3(0x156)],'importedAt':_0x1d81ef['importedAt'],'source':_0x1d81ef[_0xcda8c3(0x138)],'commandCount':_0x242bb2[_0xcda8c3(0x129)],'commands':_0x242bb2};}function sha256(_0x4987cf){const _0xe4a530=a41_0x1c2c9f;return createHash(_0xe4a530(0x13f))[_0xe4a530(0x124)](_0x4987cf)[_0xe4a530(0x137)](_0xe4a530(0x168));}
|
|
1
|
+
const a41_0x1cbda7=a41_0x1406;(function(_0x251f2f,_0x5f58f8){const _0xd4606c=a41_0x1406,_0x470963=_0x251f2f();while(!![]){try{const _0x2cbf10=parseInt(_0xd4606c(0xba))/0x1*(-parseInt(_0xd4606c(0xc8))/0x2)+parseInt(_0xd4606c(0xed))/0x3*(parseInt(_0xd4606c(0xe2))/0x4)+parseInt(_0xd4606c(0xbc))/0x5+parseInt(_0xd4606c(0xb9))/0x6*(parseInt(_0xd4606c(0xad))/0x7)+-parseInt(_0xd4606c(0xe5))/0x8+parseInt(_0xd4606c(0xe3))/0x9+-parseInt(_0xd4606c(0xd9))/0xa;if(_0x2cbf10===_0x5f58f8)break;else _0x470963['push'](_0x470963['shift']());}catch(_0x2f90f2){_0x470963['push'](_0x470963['shift']());}}}(a41_0x12e3,0x5afaf));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=a41_0x1cbda7(0xe9);export function getServiceRegistryPath(_0x1cac8d={}){const _0x3fa66f=a41_0x1cbda7;return resolve(_0x1cac8d[_0x3fa66f(0xe7)]??homedir(),PRODUCT_CONFIG[_0x3fa66f(0xc3)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x52d336={}){const _0x183b63=a41_0x1cbda7,_0x2c0961=getServiceRegistryPath(_0x52d336);if(!existsSync(_0x2c0961))return emptyServiceRegistry();try{const _0x10f7b7=readFileSync(_0x2c0961,_0x183b63(0xb1));if(!_0x10f7b7[_0x183b63(0xab)]())return emptyServiceRegistry();const _0x917856=JSON[_0x183b63(0xd3)](_0x10f7b7);if(_0x917856[_0x183b63(0xae)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors['validation']('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x917856['schemaVersion']),_0x183b63(0xb3)+_0x2c0961+'.');if(!Array[_0x183b63(0xef)](_0x917856[_0x183b63(0xbe)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x917856[_0x183b63(0xa6)],'services':_0x917856[_0x183b63(0xbe)]};}catch(_0x5af138){if(_0x5af138 instanceof Error&&_0x5af138[_0x183b63(0xaa)]===_0x183b63(0xd2))throw _0x5af138;throw CliErrors[_0x183b63(0xf1)](_0x183b63(0xde)+_0x2c0961,_0x183b63(0xd0));}}export function writeServiceRegistry(_0x507066,_0x13f6be={}){const _0x37b8=a41_0x1cbda7,_0x4d81a8=getServiceRegistryPath(_0x13f6be),_0x64817b=dirname(_0x4d81a8);!existsSync(_0x64817b)&&mkdirSync(_0x64817b,{'recursive':!![]});const _0x3c271d=_0x4d81a8+_0x37b8(0xbf);try{writeFileSync(_0x3c271d,JSON[_0x37b8(0xc4)](_0x507066,null,0x2)+'\x0a',{'encoding':_0x37b8(0xb1),'mode':0x180}),renameSync(_0x3c271d,_0x4d81a8);}catch(_0x19c7de){try{unlinkSync(_0x3c271d);}catch{}if(_0x19c7de?.[_0x37b8(0xf7)]===_0x37b8(0xd5))throw CliErrors['validation'](_0x37b8(0xf4)+_0x4d81a8);throw _0x19c7de;}return _0x4d81a8;}export function loadServiceManifestFromFile(_0x4e716f){const _0x1d7777=a41_0x1cbda7,_0x33b093=resolve(_0x4e716f);if(!existsSync(_0x33b093))throw CliErrors[_0x1d7777(0xf1)]('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x4e716f);let _0x2527bd;const _0x420228=readFileSync(_0x33b093,_0x1d7777(0xb1));try{_0x2527bd=JSON[_0x1d7777(0xd3)](_0x420228);}catch{throw CliErrors[_0x1d7777(0xf1)]('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x4e716f,_0x1d7777(0xd7));}const _0xb49bb3=sha256(_0x420228),_0x55dccd=extractLoadedServiceManifests(_0x2527bd,_0xb49bb3),_0x468b68=aggregateValidationReports(_0x55dccd),_0x47e55b=_0x55dccd[0x0];return{'filePath':_0x33b093,'hash':_0xb49bb3,'kind':isServiceRegistryLike(_0x2527bd)?'registry':_0x1d7777(0xc0),'manifest':_0x47e55b?.[_0x1d7777(0xc0)]??_0x2527bd,'report':_0x468b68,'normalizedManifest':_0x55dccd[_0x1d7777(0xf3)]===0x1?_0x47e55b?.[_0x1d7777(0xea)]:undefined,'manifests':_0x55dccd};}export function importServiceManifest(_0x8ddb8,_0x26232f={}){const _0x62ef66=a41_0x1cbda7,_0x3dab15=loadServiceManifestFromFile(_0x8ddb8);if(!_0x3dab15[_0x62ef66(0xf0)]['ok'])throw CliErrors[_0x62ef66(0xf1)](formatValidationFailure(_0x3dab15['report']),_0x62ef66(0xb4));if(_0x3dab15[_0x62ef66(0xb7)][_0x62ef66(0xf3)]===0x0)throw CliErrors['validation'](_0x62ef66(0xec),'Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.');const _0x5e0a6e=readServiceRegistry(_0x26232f),_0x5adab0=(_0x26232f['now']??(()=>new Date()))()[_0x62ef66(0xa8)](),_0x20ecef=[];let _0x22c5f6=0x0,_0x3053b5=0x0;for(const _0x51645c of _0x3dab15[_0x62ef66(0xb7)]){if(!_0x51645c[_0x62ef66(0xea)])continue;const _0x1d3ace=_0x51645c[_0x62ef66(0xea)][_0x62ef66(0xda)][_0x62ef66(0xf7)],_0x621f38={'serviceCode':_0x1d3ace,'version':_0x51645c['normalizedManifest'][_0x62ef66(0xdb)],'importedAt':_0x5adab0,'source':{'type':_0x62ef66(0xb0),'path':_0x3dab15[_0x62ef66(0xe0)],'hash':_0x51645c[_0x62ef66(0xe8)]},'manifest':_0x51645c[_0x62ef66(0xc0)],'normalizedManifest':_0x51645c[_0x62ef66(0xea)]},_0x334018=_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xeb)](_0x213068=>_0x213068['serviceCode']===_0x1d3ace);_0x334018>=0x0?(_0x5e0a6e[_0x62ef66(0xbe)][_0x334018]=_0x621f38,_0x3053b5++):(_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xc7)](_0x621f38),_0x22c5f6++),_0x20ecef[_0x62ef66(0xc7)](_0x621f38);}_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xb8)]((_0xeb93c,_0x41aae3)=>_0xeb93c[_0x62ef66(0xc5)]['localeCompare'](_0x41aae3[_0x62ef66(0xc5)])),_0x5e0a6e[_0x62ef66(0xa6)]=_0x5adab0;const _0x27422b=writeServiceRegistry(_0x5e0a6e,_0x26232f);return{'registryPath':_0x27422b,'entry':_0x20ecef[0x0],'replaced':_0x20ecef[_0x62ef66(0xf3)]===0x1?_0x3053b5===0x1:_0x3053b5>0x0,'entries':_0x20ecef,'imported':_0x22c5f6,'updated':_0x3053b5,'serviceCount':_0x5e0a6e[_0x62ef66(0xbe)][_0x62ef66(0xf3)]};}export function exportServiceManifest(_0x51d967,_0x22b5bb,_0x11b10f={}){const _0x1c3ed1=a41_0x1cbda7,_0x423066=getServiceRegistryPath(_0x11b10f),_0x5a2894=getLocalServiceEntry(_0x51d967,_0x11b10f);if(!_0x5a2894)throw CliErrors[_0x1c3ed1(0xf1)]('Local\x20service\x20not\x20found:\x20'+_0x51d967,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x20bd07=resolve(_0x22b5bb),_0x18d0b0=dirname(_0x20bd07);return!existsSync(_0x18d0b0)&&mkdirSync(_0x18d0b0,{'recursive':!![]}),writeFileSync(_0x20bd07,JSON[_0x1c3ed1(0xc4)](_0x5a2894[_0x1c3ed1(0xc0)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x423066,'filePath':_0x20bd07,'entry':_0x5a2894};}export function removeServiceManifest(_0x593877,_0x3bfada={}){const _0x2b51e7=a41_0x1cbda7,_0x53dd69=readServiceRegistry(_0x3bfada),_0x4fa3ff=_0x593877[_0x2b51e7(0xab)](),_0x4e8677=_0x53dd69[_0x2b51e7(0xbe)][_0x2b51e7(0xeb)](_0xe4393a=>_0xe4393a['serviceCode']===_0x4fa3ff);if(_0x4e8677<0x0)throw CliErrors[_0x2b51e7(0xf1)](_0x2b51e7(0xaf)+_0x4fa3ff,_0x2b51e7(0xee));const [_0x174e77]=_0x53dd69[_0x2b51e7(0xbe)]['splice'](_0x4e8677,0x1),_0x138a6c=(_0x3bfada['now']??(()=>new Date()))()['toISOString']();_0x53dd69[_0x2b51e7(0xa6)]=_0x138a6c;const _0x456fbc=writeServiceRegistry(_0x53dd69,_0x3bfada);return{'registryPath':_0x456fbc,'entry':_0x174e77,'serviceCount':_0x53dd69[_0x2b51e7(0xbe)][_0x2b51e7(0xf3)]};}export function listLocalServices(_0x55640a={}){return readServiceRegistry(_0x55640a)['services'];}export function getLocalServiceEntry(_0x8726da,_0x166f0b={}){const _0x1b5129=a41_0x1cbda7;return readServiceRegistry(_0x166f0b)[_0x1b5129(0xbe)][_0x1b5129(0xd8)](_0x547cee=>_0x547cee['serviceCode']===_0x8726da[_0x1b5129(0xab)]());}export function listLocalServiceTrees(_0x4a67a6={}){const _0x237c51=a41_0x1cbda7;return readServiceRegistry(_0x4a67a6)[_0x237c51(0xbe)]['map'](_0x5dd56f=>_0x5dd56f[_0x237c51(0xea)]);}export function inspectServiceRegistry(_0x31ec1e={}){const _0x5a88c8=a41_0x1cbda7,_0x25caa5=getServiceRegistryPath(_0x31ec1e);if(!existsSync(_0x25caa5))return emptyServiceRegistryInspection(_0x25caa5,_0x5a88c8(0xcc),![]);try{const _0x3b2435=readFileSync(_0x25caa5,_0x5a88c8(0xb1));if(!_0x3b2435[_0x5a88c8(0xab)]())return emptyServiceRegistryInspection(_0x25caa5,_0x5a88c8(0xa9),!![]);const _0x494266=JSON[_0x5a88c8(0xd3)](_0x3b2435);if(_0x494266[_0x5a88c8(0xae)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x25caa5,_0x5a88c8(0xc9),!![]),'schemaVersion':_0x494266['schemaVersion'],'message':_0x5a88c8(0xe4)+String(_0x494266[_0x5a88c8(0xae)])};if(!Array[_0x5a88c8(0xef)](_0x494266[_0x5a88c8(0xbe)]))return{...emptyServiceRegistryInspection(_0x25caa5,'invalid',!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x494266['updatedAt'],'message':_0x5a88c8(0xa7)};const _0x222bc4=_0x494266[_0x5a88c8(0xbe)][_0x5a88c8(0xce)](summarizeLocalServiceEntry);return{'registryPath':_0x25caa5,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x494266['updatedAt'],'serviceCount':_0x222bc4['length'],'commandCount':_0x222bc4[_0x5a88c8(0xe6)]((_0x480e76,_0x4306dd)=>_0x480e76+_0x4306dd[_0x5a88c8(0xcd)],0x0),'services':_0x222bc4};}catch(_0x151045){return{...emptyServiceRegistryInspection(_0x25caa5,'invalid',!![]),'message':_0x151045 instanceof Error?_0x151045[_0x5a88c8(0xac)]:String(_0x151045)};}}function a41_0x1406(_0x4263f8,_0x1a87ec){_0x4263f8=_0x4263f8-0xa4;const _0x12e38f=a41_0x12e3();let _0x1406ea=_0x12e38f[_0x4263f8];return _0x1406ea;}export function formatValidationFailure(_0x16cece){const _0x1e8da2=a41_0x1cbda7,_0x5a0a57=_0x16cece[_0x1e8da2(0xc2)][_0x1e8da2(0xce)](_0x37fab7=>_0x37fab7[_0x1e8da2(0xb2)]+':\x20'+_0x37fab7[_0x1e8da2(0xac)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x5a0a57['join']('\x0a');}function extractLoadedServiceManifests(_0x5e4131,_0x20f746){const _0x4fe880=a41_0x1cbda7;if(!isServiceRegistryLike(_0x5e4131)){const _0x211675=_0x5e4131,{manifest:_0x138170,errors:_0xfd52a9}=adaptServiceTreeManifestForLegacyFramework(_0x211675),_0x5c72d7=validateServiceTreeManifest(_0x138170),_0x17ebdc=mergeValidationErrors(_0x5c72d7,_0xfd52a9);return[{'manifest':_0x211675,'report':_0x17ebdc,'normalizedManifest':_0x17ebdc['ok']?normalizeServiceTreeManifest(_0x138170):undefined,'sourceHash':_0x20f746}];}return _0x5e4131[_0x4fe880(0xbe)][_0x4fe880(0xce)]((_0x3c1e27,_0x28ab71)=>{const _0x47048e=_0x4fe880,_0x4b11d9=isObjectRecord(_0x3c1e27)?_0x3c1e27[_0x47048e(0xc0)]:undefined,{manifest:_0xb85f37,errors:_0x2ae206}=adaptServiceTreeManifestForLegacyFramework(_0x4b11d9),_0x20c237=validateServiceTreeManifest(_0xb85f37),_0x5573bc=mergeValidationErrors(_0x20c237,_0x2ae206),_0x43adde=isObjectRecord(_0x3c1e27)&&typeof _0x3c1e27[_0x47048e(0xc5)]===_0x47048e(0xc1)?_0x3c1e27[_0x47048e(0xc5)]:undefined;return{'manifest':_0x4b11d9,'report':_0x5573bc,'normalizedManifest':_0x5573bc['ok']?normalizeServiceTreeManifest(_0xb85f37):undefined,'sourceHash':sha256(JSON['stringify'](_0x4b11d9,null,0x2)+'\x0a'),'registryIndex':_0x28ab71,'registryServiceCode':_0x43adde};});}function mergeValidationErrors(_0x11934a,_0xf2b0ec){const _0x13d948=a41_0x1cbda7,_0x2a26e3=_0x11934a[_0x13d948(0xc2)]['map'](_0x118c54=>_0x118c54[_0x13d948(0xac)]===_0x13d948(0xa4)?{..._0x118c54,'message':_0x13d948(0xdd)}:_0x118c54),_0x1a05c3=[..._0xf2b0ec,..._0x2a26e3];return{'ok':_0x1a05c3[_0x13d948(0xf3)]===0x0,'errors':_0x1a05c3,'warnings':_0x11934a[_0x13d948(0xe1)]};}function aggregateValidationReports(_0x267be8){const _0x2eabc3=a41_0x1cbda7,_0x5c6093=_0x267be8['flatMap'](_0x165c99=>_0x165c99[_0x2eabc3(0xf6)]===undefined?_0x165c99[_0x2eabc3(0xf0)][_0x2eabc3(0xc2)]:_0x165c99[_0x2eabc3(0xf0)][_0x2eabc3(0xc2)][_0x2eabc3(0xce)](_0x21ee52=>({..._0x21ee52,'path':prefixRegistryIssuePath(_0x165c99[_0x2eabc3(0xf6)],_0x21ee52[_0x2eabc3(0xb2)])}))),_0x1ed213=_0x267be8['flatMap'](_0x48708a=>_0x48708a[_0x2eabc3(0xf6)]===undefined?_0x48708a[_0x2eabc3(0xf0)][_0x2eabc3(0xe1)]:_0x48708a[_0x2eabc3(0xf0)][_0x2eabc3(0xe1)][_0x2eabc3(0xce)](_0x516bb1=>({..._0x516bb1,'path':prefixRegistryIssuePath(_0x48708a[_0x2eabc3(0xf6)],_0x516bb1[_0x2eabc3(0xb2)])})));return{'ok':_0x5c6093[_0x2eabc3(0xf3)]===0x0,'errors':_0x5c6093,'warnings':_0x1ed213};}function a41_0x12e3(){const _0x560842=['serviceCode','importedAt','push','82172zpkslr','invalid','command','digest','missing','commandCount','map','update','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','cliPath','CliError','parse','source','ENOENT','slice','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','find','6537870UrSOYn','service','version','description','bff\x20target\x20requires\x20functionName.','Invalid\x20service\x20registry\x20JSON:\x20','object','filePath','warnings','4TEOuei','5566482IJWTjW','Unsupported\x20schemaVersion:\x20','2996232JWwsSV','reduce','homeDir','sourceHash','service.json','normalizedManifest','findIndex','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','55326oRVesH','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','isArray','report','validation','].manifest','length','Cannot\x20write\x20service\x20registry:\x20','target','registryIndex','code','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','].manifest.','updatedAt','services\x20must\x20be\x20an\x20array','toISOString','empty','name','trim','message','4395377wAohyJ','schemaVersion','Local\x20service\x20not\x20found:\x20','file','utf8','path','Remove\x20or\x20migrate\x20','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','hex','$.services[','manifests','sort','6FPEvSQ','8qeToGS','sha256','2324040ZzjDEt','startsWith','services','.tmp','manifest','string','errors','homeDirName','stringify'];a41_0x12e3=function(){return _0x560842;};return a41_0x12e3();}function prefixRegistryIssuePath(_0x139fec,_0x105c88){const _0x31406a=a41_0x1cbda7;if(_0x105c88==='$')return _0x31406a(0xb6)+_0x139fec+'].manifest';if(_0x105c88[_0x31406a(0xbd)]('$.'))return _0x31406a(0xb6)+_0x139fec+_0x31406a(0xf2)+_0x105c88[_0x31406a(0xd6)](0x1);if(_0x105c88[_0x31406a(0xbd)]('$['))return _0x31406a(0xb6)+_0x139fec+_0x31406a(0xf2)+_0x105c88[_0x31406a(0xd6)](0x1);return'$.services['+_0x139fec+_0x31406a(0xa5)+_0x105c88;}function isServiceRegistryLike(_0x2b7b66){const _0x167425=a41_0x1cbda7;return isObjectRecord(_0x2b7b66)&&_0x2b7b66[_0x167425(0xae)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x167425(0xef)](_0x2b7b66['services']);}function isObjectRecord(_0x5d13f5){const _0x5d739f=a41_0x1cbda7;return Boolean(_0x5d13f5)&&typeof _0x5d13f5===_0x5d739f(0xdf)&&!Array[_0x5d739f(0xef)](_0x5d13f5);}function emptyServiceRegistryInspection(_0x38a5a7,_0xbe1c9d,_0x4ab979){return{'registryPath':_0x38a5a7,'exists':_0x4ab979,'status':_0xbe1c9d,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x451d0d){const _0x2c982e=a41_0x1cbda7,_0x1a1f7f=_0x451d0d[_0x2c982e(0xea)],_0x54ee2e=_0x1a1f7f['commands'][_0x2c982e(0xce)](_0x4b7cfd=>({'path':_0x4b7cfd[_0x2c982e(0xd1)],'description':_0x4b7cfd[_0x2c982e(0xdc)],'risk':_0x4b7cfd['risk'],'targetKind':_0x4b7cfd[_0x2c982e(0xf5)]['kind'],'targetCommand':_0x4b7cfd[_0x2c982e(0xf5)][_0x2c982e(0xca)]}));return{'serviceCode':_0x451d0d[_0x2c982e(0xc5)],'name':_0x1a1f7f[_0x2c982e(0xda)][_0x2c982e(0xaa)],'description':_0x1a1f7f[_0x2c982e(0xda)][_0x2c982e(0xdc)],'version':_0x451d0d[_0x2c982e(0xdb)],'importedAt':_0x451d0d[_0x2c982e(0xc6)],'source':_0x451d0d[_0x2c982e(0xd4)],'commandCount':_0x54ee2e['length'],'commands':_0x54ee2e};}function sha256(_0x8fe486){const _0x484d3d=a41_0x1cbda7;return createHash(_0x484d3d(0xbb))[_0x484d3d(0xcf)](_0x8fe486)[_0x484d3d(0xcb)](_0x484d3d(0xb5));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a42_0x27a08c=a42_0x4bad;(function(_0x3a9b64,_0x37c212){const _0xa573c0=a42_0x4bad,_0x2f40ba=_0x3a9b64();while(!![]){try{const _0x40120b=-parseInt(_0xa573c0(0x121))/0x1*(-parseInt(_0xa573c0(0x104))/0x2)+-parseInt(_0xa573c0(0x11f))/0x3+-parseInt(_0xa573c0(0x10d))/0x4*(parseInt(_0xa573c0(0x102))/0x5)+-parseInt(_0xa573c0(0x10c))/0x6*(-parseInt(_0xa573c0(0x108))/0x7)+parseInt(_0xa573c0(0x11a))/0x8+parseInt(_0xa573c0(0x111))/0x9*(parseInt(_0xa573c0(0x11e))/0xa)+-parseInt(_0xa573c0(0x116))/0xb;if(_0x40120b===_0x37c212)break;else _0x2f40ba['push'](_0x2f40ba['shift']());}catch(_0x8cb57){_0x2f40ba['push'](_0x2f40ba['shift']());}}}(a42_0x1436,0x38efb));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':a42_0x27a08c(0x10a),'description':a42_0x27a08c(0x118),'risk':a42_0x27a08c(0x105),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x22876f){const _0x148167=a42_0x27a08c,_0x12d556=buildSkillCreatePlan(_0x22876f[_0x148167(0x11d)](_0x148167(0x101)),_0x22876f[_0x148167(0x11d)](_0x148167(0x103)),_0x22876f['str']('target'));return{'method':_0x148167(0x117),'url':_0x12d556[_0x148167(0x120)],'body':{'skillName':_0x12d556[_0x148167(0x10e)][_0x148167(0x114)],'type':_0x12d556['rendered'][_0x148167(0x103)],'selfContained':!![],'files':_0x12d556[_0x148167(0x10e)][_0x148167(0x106)][_0x148167(0x100)](_0x3de220=>_0x3de220[_0x148167(0x107)])},'description':'Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.'};},async 'execute'(_0x63ed04){const _0xe9bf22=a42_0x27a08c,_0x257ea2=buildSkillCreatePlan(_0x63ed04[_0xe9bf22(0x11d)]('name'),_0x63ed04[_0xe9bf22(0x11d)]('type'),_0x63ed04[_0xe9bf22(0x11d)](_0xe9bf22(0x10b)));return writeSkillDraft(_0x257ea2,_0x63ed04[_0xe9bf22(0x112)](_0xe9bf22(0x119))),{'ok':!![],'data':{'skillName':_0x257ea2['rendered'][_0xe9bf22(0x114)],'type':_0x257ea2[_0xe9bf22(0x10e)][_0xe9bf22(0x103)],'dir':_0x257ea2[_0xe9bf22(0x120)],'files':_0x257ea2[_0xe9bf22(0x10e)]['files']['map'](_0x486117=>_0x486117[_0xe9bf22(0x107)])},'message':'Created\x20local\x20Skill\x20draft\x20'+_0x257ea2[_0xe9bf22(0x10e)]['skillName']};}};function buildSkillCreatePlan(_0x232908,_0xc365b0,_0xe0ae77){const _0x59e261=renderSkillTemplate({'skillName':_0x232908,'type':_0xc365b0}),_0x40f4a3=resolve(normalizeSkillTarget(_0xe0ae77));return{'rendered':_0x59e261,'targetRoot':_0x40f4a3,'skillDir':resolve(_0x40f4a3,_0x59e261['skillName'])};}function a42_0x4bad(_0x4ac6ca,_0x5cbc40){_0x4ac6ca=_0x4ac6ca-0xff;const _0x1436c4=a42_0x1436();let _0x4badc4=_0x1436c4[_0x4ac6ca];return _0x4badc4;}function normalizeSkillTarget(_0x14e840){const _0x616f15=a42_0x27a08c;return(_0x14e840||DEFAULT_SKILL_TARGET)[_0x616f15(0xff)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x48abd9,_0x422f65){const _0x138a86=a42_0x27a08c;if(existsSync(_0x48abd9[_0x138a86(0x120)])){const _0x1f3a36=lstatSync(_0x48abd9[_0x138a86(0x120)]);if(!_0x1f3a36[_0x138a86(0x11c)]()||_0x1f3a36[_0x138a86(0x110)]())throw CliErrors['validation'](_0x138a86(0x11b)+_0x48abd9['skillDir']);if(!_0x422f65)throw CliErrors[_0x138a86(0x10f)](_0x138a86(0x113)+_0x48abd9[_0x138a86(0x120)],_0x138a86(0x109));}for(const _0x23cddf of _0x48abd9[_0x138a86(0x10e)][_0x138a86(0x106)]){const _0x33c948=resolve(_0x48abd9[_0x138a86(0x120)],_0x23cddf[_0x138a86(0x107)]),_0x5ca02c=dirname(_0x33c948);mkdirSync(_0x5ca02c,{'recursive':!![]});if(existsSync(_0x33c948)&&lstatSync(_0x33c948)[_0x138a86(0x110)]())throw CliErrors[_0x138a86(0x10f)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x33c948);writeFileSync(_0x33c948,_0x23cddf[_0x138a86(0x115)],'utf8');}}function a42_0x1436(){const _0x32a040=['8hZQMyy','write','files','path','14RHPyLq','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','create','target','1067478WTZGMM','8CDYhje','rendered','validation','isSymbolicLink','574848EeVBXb','bool','Skill\x20directory\x20already\x20exists:\x20','skillName','content','8820823qyVZLT','WRITE','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','force','3142000RpxFeq','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','isDirectory','str','50pgZnIY','1015980jSQWTd','skillDir','85927CpWkUz','trim','map','name','94700ItujLQ','type'];a42_0x1436=function(){return _0x32a040;};return a42_0x1436();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a43_0x59fb(_0x5290e8,_0x415df3){_0x5290e8=_0x5290e8-0x79;const _0x26062a=a43_0x2606();let _0x59fba5=_0x26062a[_0x5290e8];return _0x59fba5;}const a43_0x5d2041=a43_0x59fb;(function(_0x5a9e83,_0x1e7601){const _0x34ef0c=a43_0x59fb,_0x3ffce4=_0x5a9e83();while(!![]){try{const _0x3821ec=-parseInt(_0x34ef0c(0x98))/0x1*(-parseInt(_0x34ef0c(0x80))/0x2)+-parseInt(_0x34ef0c(0x81))/0x3+-parseInt(_0x34ef0c(0x90))/0x4+-parseInt(_0x34ef0c(0x8e))/0x5+parseInt(_0x34ef0c(0x8b))/0x6*(parseInt(_0x34ef0c(0x94))/0x7)+parseInt(_0x34ef0c(0x9b))/0x8*(parseInt(_0x34ef0c(0x87))/0x9)+-parseInt(_0x34ef0c(0x99))/0xa*(-parseInt(_0x34ef0c(0x88))/0xb);if(_0x3821ec===_0x1e7601)break;else _0x3ffce4['push'](_0x3ffce4['shift']());}catch(_0x31739f){_0x3ffce4['push'](_0x3ffce4['shift']());}}}(a43_0x2606,0x71d14));function a43_0x2606(){const _0x2bfc45=['346389DHMuoD','skill','removed','action','push','personal','279OCEfJI','317174PLavSO','unchanged','authRequired','55398KNLbAf','all','filter','947340FsFxzB','accessKey','3115348kiHBJC','envName','skillCode','str','287LGkqyn','force','reduce','bool','3OWORel','150DhjuyU','created','108656YYWknz','\x20company\x20Skill(s).','map','company','length','../../../skills/runtime-skill-sync.js','scope','install','Installed\x20','appCode','production','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','trim','includes','flatMap','skipped','211906CYcLcz'];a43_0x2606=function(){return _0x2bfc45;};return a43_0x2606();}import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':a43_0x5d2041(0x82),'command':a43_0x5d2041(0xa2),'description':'Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','risk':'write','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x1332b5){return syncRuntimeSkills(_0x1332b5);}};async function syncRuntimeSkills(_0x285656){const _0x4fe8fa=a43_0x5d2041,{downloadRuntimeSkillPackage:_0xb37802,listRuntimeSkills:_0x55e6dd}=await import('../../../core/api-client.js'),{linkEffectiveRuntimeSkills:_0x2597ad,materializeRuntimeSkill:_0x72c739,pruneStaleRuntimeSkillCache:_0x19660c,pruneStaleRuntimeSkillLinks:_0x4f1ad1}=await import(_0x4fe8fa(0xa0)),_0x2629c8=_0x285656[_0x4fe8fa(0x93)]('code'),_0x342c39=normalizeSyncScopes(_0x285656[_0x4fe8fa(0x93)](_0x4fe8fa(0xa1))),_0x24837d=_0x285656[_0x4fe8fa(0x91)]??_0x4fe8fa(0x7a),_0xfdae1e=_0x285656[_0x4fe8fa(0x8f)],_0x433106=_0x285656[_0x4fe8fa(0x97)](_0x4fe8fa(0x95));if(!_0xfdae1e)throw CliErrors[_0x4fe8fa(0x8a)](_0x4fe8fa(0x7b));const _0xe59cc9=await Promise[_0x4fe8fa(0x8c)](_0x342c39[_0x4fe8fa(0x9d)](_0x2e56b9=>_0x55e6dd({'appCode':_0x285656[_0x4fe8fa(0x79)],'scope':_0x2e56b9,'code':_0x2629c8['trim']()||undefined}))),_0x3d7a41=_0x342c39[_0x4fe8fa(0x7d)](_0x4fe8fa(0x86))?_0xe59cc9[_0x4fe8fa(0x7e)]((_0x23170b,_0x2c23b7)=>_0x342c39[_0x2c23b7]===_0x4fe8fa(0x86)?_0x23170b[_0x4fe8fa(0x86)]:[]):[],_0x18dd47=_0x342c39['includes'](_0x4fe8fa(0x9e))?_0xe59cc9[_0x4fe8fa(0x7e)]((_0x316d6c,_0xc0b290)=>_0x342c39[_0xc0b290]===_0x4fe8fa(0x9e)?_0x316d6c[_0x4fe8fa(0x9e)]:[]):[],_0x2de538=new Set([..._0x3d7a41[_0x4fe8fa(0x9d)](_0x2a977e=>_0x2a977e[_0x4fe8fa(0x92)]?.[_0x4fe8fa(0x7c)]())['filter'](_0x16832d=>Boolean(_0x16832d)),..._0x18dd47[_0x4fe8fa(0x9d)](_0x2fbfaf=>_0x2fbfaf[_0x4fe8fa(0x92)]?.['trim']())[_0x4fe8fa(0x8d)](_0x2f0192=>Boolean(_0x2f0192))]),_0x363c46=_0x2629c8[_0x4fe8fa(0x7c)]()?[_0x2629c8[_0x4fe8fa(0x7c)]()]:undefined,_0x48ee67=_0x342c39[_0x4fe8fa(0x9f)]===0x2&&_0x342c39[_0x4fe8fa(0x7d)](_0x4fe8fa(0x86))&&_0x342c39['includes'](_0x4fe8fa(0x9e)),_0x2ba2f7=_0x48ee67?_0x4f1ad1(_0x285656[_0x4fe8fa(0x79)],_0x2de538,{},_0x363c46):[],_0x2a2aae=_0x19660c({'env':_0x24837d,'accessKey':_0xfdae1e,'appCode':_0x285656[_0x4fe8fa(0x79)],'activeSkillCodes':_0x2de538,'pruneSkillCodes':_0x363c46,'scopes':_0x342c39}),_0x136059=[];for(const _0x18d044 of _0x3d7a41){_0x136059[_0x4fe8fa(0x85)](_0x72c739(_0x18d044,_0x4fe8fa(0x86),{'env':_0x24837d,'accessKey':_0xfdae1e,'appCode':_0x285656[_0x4fe8fa(0x79)],'force':_0x433106,'packageBytes':await downloadSkillPackage(_0x18d044,_0x4fe8fa(0x86),_0x285656[_0x4fe8fa(0x79)],_0xb37802)}));}for(const _0x98e833 of _0x18dd47){_0x136059[_0x4fe8fa(0x85)](_0x72c739(_0x98e833,_0x4fe8fa(0x9e),{'env':_0x24837d,'accessKey':_0xfdae1e,'appCode':_0x285656[_0x4fe8fa(0x79)],'force':_0x433106,'packageBytes':await downloadSkillPackage(_0x98e833,_0x4fe8fa(0x9e),_0x285656[_0x4fe8fa(0x79)],_0xb37802)}));}const _0x335f96=_0x2597ad(_0x136059,_0x285656['appCode']),_0x23c783=countLinkActions(_0x335f96);return{'ok':!![],'data':{'appCode':_0x285656[_0x4fe8fa(0x79)],'personal':_0x3d7a41['length'],'company':_0x18dd47['length'],'materialized':_0x136059[_0x4fe8fa(0x9f)],'links':{'total':_0x335f96[_0x4fe8fa(0x9f)],'created':_0x23c783[_0x4fe8fa(0x9a)]??0x0,'updated':_0x23c783['updated']??0x0,'unchanged':_0x23c783[_0x4fe8fa(0x89)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x2ba2f7[_0x4fe8fa(0x8d)](_0x340337=>_0x340337[_0x4fe8fa(0x84)]==='removed')[_0x4fe8fa(0x9f)],'cacheDirs':_0x2a2aae['filter'](_0x4bfb14=>_0x4bfb14['action']===_0x4fe8fa(0x83))[_0x4fe8fa(0x9f)],'skipped':[..._0x2ba2f7,..._0x2a2aae]['filter'](_0x1fd72c=>_0x1fd72c[_0x4fe8fa(0x84)]===_0x4fe8fa(0x7f))[_0x4fe8fa(0x9f)]},'skills':{'personal':_0x3d7a41[_0x4fe8fa(0x9d)](summarizeRuntimeSkill),'company':_0x18dd47[_0x4fe8fa(0x9d)](summarizeRuntimeSkill)}},'message':_0x4fe8fa(0xa3)+_0x3d7a41[_0x4fe8fa(0x9f)]+'\x20personal\x20and\x20'+_0x18dd47[_0x4fe8fa(0x9f)]+_0x4fe8fa(0x9c)};}async function downloadSkillPackage(_0x1bb6cc,_0x672408,_0xc6c311,_0x49b194){const _0x43179d=a43_0x5d2041,_0xf0aa05=_0x1bb6cc['version']?.[_0x43179d(0x7c)]();return _0xf0aa05?_0x49b194(_0x672408,_0x1bb6cc[_0x43179d(0x92)],_0xc6c311,_0xf0aa05):_0x49b194(_0x672408,_0x1bb6cc[_0x43179d(0x92)],_0xc6c311);}function countLinkActions(_0x3cdaca){const _0x217820=a43_0x5d2041;return _0x3cdaca[_0x217820(0x96)]((_0x27cb56,_0x1b28a4)=>{const _0xdfc434=_0x217820;return _0x27cb56[_0x1b28a4[_0xdfc434(0x84)]]=(_0x27cb56[_0x1b28a4['action']]??0x0)+0x1,_0x27cb56;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x3ed39d=a44_0x1ece;function a44_0x2f5b(){const _0x2ce251=['469rqaEIw','local','1910keepns','trim','list','\x20local\x20Skill(s).','remote','read','accessKey','647957HzowjW','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','../../../skills/runtime-skill-sync.js','246069bQCsyQ','Listed\x20','scope','appCode','length','envName','production','1441167FvlBtu','company','2564304lzNyRC','authRequired','map','6420UVsSUP','1024792YaBkak','builtin','../../../core/api-client.js','640oQLfrR','filter','code','str','personal','bool','82840bmHQvT'];a44_0x2f5b=function(){return _0x2ce251;};return a44_0x2f5b();}(function(_0x3bbd25,_0x107f3a){const _0x52a248=a44_0x1ece,_0x130342=_0x3bbd25();while(!![]){try{const _0x5342a9=parseInt(_0x52a248(0xf0))/0x1+parseInt(_0x52a248(0xdd))/0x2+parseInt(_0x52a248(0xd7))/0x3+-parseInt(_0x52a248(0xd9))/0x4+-parseInt(_0x52a248(0xe9))/0x5*(-parseInt(_0x52a248(0xdc))/0x6)+parseInt(_0x52a248(0xe7))/0x7*(parseInt(_0x52a248(0xe6))/0x8)+parseInt(_0x52a248(0xf3))/0x9*(-parseInt(_0x52a248(0xe0))/0xa);if(_0x5342a9===_0x107f3a)break;else _0x130342['push'](_0x130342['shift']());}catch(_0x4f35bc){_0x130342['push'](_0x130342['shift']());}}}(a44_0x2f5b,0x5606f));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';function a44_0x1ece(_0x51733f,_0x4ed6be){_0x51733f=_0x51733f-0xd2;const _0x2f5b0f=a44_0x2f5b();let _0x1ece37=_0x2f5b0f[_0x51733f];return _0x1ece37;}import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':'skill','command':a44_0x3ed39d(0xeb),'description':a44_0x3ed39d(0xf1),'risk':a44_0x3ed39d(0xee),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x19dd5d){const _0x436d70=a44_0x3ed39d,_0x236891=_0x19dd5d['str'](_0x436d70(0xe2)),_0x207b68=normalizeListScope(_0x19dd5d[_0x436d70(0xe3)]('scope'));if(_0x19dd5d[_0x436d70(0xe5)](_0x436d70(0xe8))){const _0x56d2fa=_0x19dd5d[_0x436d70(0xef)];if(!_0x56d2fa)throw CliErrors[_0x436d70(0xda)]();const {listLocalRuntimeSkills:_0x24ba09}=await import(_0x436d70(0xf2)),_0x2c4c3f=_0x24ba09({'env':_0x19dd5d[_0x436d70(0xd5)]??_0x436d70(0xd6),'accessKey':_0x56d2fa,'appCode':_0x19dd5d[_0x436d70(0xd3)],'scopes':listScopeToRuntimeScopes(_0x207b68),'code':_0x236891[_0x436d70(0xea)]()||undefined}),_0x672534=groupLocalRuntimeSkills(_0x2c4c3f);return{'ok':!![],'data':{'appCode':_0x19dd5d[_0x436d70(0xd3)],'source':_0x436d70(0xe8),'scope':_0x207b68,'total':_0x2c4c3f[_0x436d70(0xd4)],'personal':_0x672534[_0x436d70(0xe4)]['length'],'company':_0x672534[_0x436d70(0xd8)][_0x436d70(0xd4)],'items':_0x2c4c3f['map'](summarizeLocalRuntimeSkill),'skills':{'personal':_0x672534['personal'][_0x436d70(0xdb)](summarizeLocalRuntimeSkill),'company':_0x672534[_0x436d70(0xd8)][_0x436d70(0xdb)](summarizeLocalRuntimeSkill)}},'message':_0x436d70(0xf4)+_0x2c4c3f[_0x436d70(0xd4)]+_0x436d70(0xec)};}const {listRuntimeSkills:_0x4324eb}=await import(_0x436d70(0xdf)),_0x18438d=await _0x4324eb({'appCode':_0x19dd5d[_0x436d70(0xd3)],'scope':listScopeToRemoteScope(_0x207b68),'code':_0x236891['trim']()||undefined}),_0x537581=shouldListScope(_0x207b68,_0x436d70(0xe4))?_0x18438d[_0x436d70(0xe4)]??[]:[],_0x499419=shouldListScope(_0x207b68,'company')?_0x18438d[_0x436d70(0xd8)]??[]:[],_0x23782e=[..._0x537581,..._0x499419];return{'ok':!![],'data':{'appCode':_0x19dd5d['appCode'],'source':_0x436d70(0xed),'scope':_0x207b68,'total':_0x23782e[_0x436d70(0xd4)],'personal':_0x537581['length'],'company':_0x499419[_0x436d70(0xd4)],'items':_0x23782e[_0x436d70(0xdb)](summarizeRuntimeSkill),'skills':{'personal':_0x537581['map'](summarizeRuntimeSkill),'company':_0x499419[_0x436d70(0xdb)](summarizeRuntimeSkill)}},'message':_0x436d70(0xf4)+_0x23782e[_0x436d70(0xd4)]+'\x20remote\x20Skill(s).'};}};function groupLocalRuntimeSkills(_0x20add5){const _0x5c2036=a44_0x3ed39d;return{'personal':_0x20add5['filter'](_0x4865f0=>_0x4865f0['scope']===_0x5c2036(0xe4)),'company':_0x20add5[_0x5c2036(0xe1)](_0x18d033=>_0x18d033[_0x5c2036(0xd2)]===_0x5c2036(0xd8)),'builtin':_0x20add5['filter'](_0x58d414=>_0x58d414[_0x5c2036(0xd2)]===_0x5c2036(0xde))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x195d3e=a45_0x607b;(function(_0x21ea08,_0x1c07d6){const _0x5a750c=a45_0x607b,_0x24c188=_0x21ea08();while(!![]){try{const _0xce5b8b=-parseInt(_0x5a750c(0x164))/0x1+-parseInt(_0x5a750c(0x160))/0x2*(-parseInt(_0x5a750c(0x165))/0x3)+-parseInt(_0x5a750c(0x167))/0x4+-parseInt(_0x5a750c(0x163))/0x5+parseInt(_0x5a750c(0x166))/0x6+parseInt(_0x5a750c(0x15e))/0x7*(parseInt(_0x5a750c(0x161))/0x8)+parseInt(_0x5a750c(0x15f))/0x9;if(_0xce5b8b===_0x1c07d6)break;else _0x24c188['push'](_0x24c188['shift']());}catch(_0x37479a){_0x24c188['push'](_0x24c188['shift']());}}}(a45_0x52c3,0xb5cac));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a45_0x607b(_0x3a7d9b,_0x405b63){_0x3a7d9b=_0x3a7d9b-0x15d;const _0x52c358=a45_0x52c3();let _0x607b52=_0x52c358[_0x3a7d9b];return _0x607b52;}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':'skill','command':a45_0x195d3e(0x162),'description':a45_0x195d3e(0x15d),'risk':'write','flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};function a45_0x52c3(){const _0x4537b5=['217742OWXluy','13961250nOeEIC','286AULIzX','128QpPhug','push','4977705EybkrR','212336dbImBx','16221PukxHM','1535160QdUyBx','4502040LBYOvp','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review'];a45_0x52c3=function(){return _0x4537b5;};return a45_0x52c3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x54128f=a46_0x5663;(function(_0x15a9ce,_0x3e05ad){const _0x5cb567=a46_0x5663,_0x205741=_0x15a9ce();while(!![]){try{const _0x4c279e=-parseInt(_0x5cb567(0xab))/0x1+parseInt(_0x5cb567(0xa9))/0x2*(parseInt(_0x5cb567(0xa8))/0x3)+parseInt(_0x5cb567(0xb2))/0x4+-parseInt(_0x5cb567(0xaf))/0x5*(-parseInt(_0x5cb567(0xb5))/0x6)+parseInt(_0x5cb567(0xb4))/0x7+-parseInt(_0x5cb567(0xa5))/0x8+parseInt(_0x5cb567(0xa6))/0x9*(-parseInt(_0x5cb567(0xb3))/0xa);if(_0x4c279e===_0x3e05ad)break;else _0x205741['push'](_0x205741['shift']());}catch(_0x16bf04){_0x205741['push'](_0x205741['shift']());}}}(a46_0x18e2,0x5ba50));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':'skill','command':'validate','description':a46_0x54128f(0xa7),'risk':a46_0x54128f(0xb6),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x5318b0){const _0x556255=a46_0x54128f,_0xed3aac=_0x5318b0[_0x556255(0xb0)](_0x556255(0xb1)),_0x374417=validateSkillDirectory(_0x5318b0[_0x556255(0xad)](_0x556255(0xae)),{'strict':_0xed3aac});return throwIfSkillValidationFailed(_0x374417,_0xed3aac),{'ok':!![],'data':{'dir':_0x374417[_0x556255(0xae)],'type':_0x374417['type'],'errors':_0x374417[_0x556255(0xac)],'warnings':_0x374417['warnings']},'message':_0x556255(0xaa)};}};function a46_0x5663(_0x57002d,_0x31b708){_0x57002d=_0x57002d-0xa5;const _0x18e26f=a46_0x18e2();let _0x56631c=_0x18e26f[_0x57002d];return _0x56631c;}function a46_0x18e2(){const _0x19b8c6=['4077900BOBYnI','read','190360sAXMuU','81MrYlFv','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','1191scCNNM','2642HDJnEO','Skill\x20validation\x20passed.','233757ImEqEm','errors','str','dir','5moouCD','bool','strict','1237820weXIbW','1311620izcZFS','2098908YgwLFB'];a46_0x18e2=function(){return _0x19b8c6;};return a46_0x18e2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x1cf3c7=a47_0xdf0e;(function(_0x3f78cf,_0x579ad9){const _0x2ad345=a47_0xdf0e,_0x5c2d8e=_0x3f78cf();while(!![]){try{const _0x57d7ad=parseInt(_0x2ad345(0x1e8))/0x1+parseInt(_0x2ad345(0x1ca))/0x2+-parseInt(_0x2ad345(0x1e6))/0x3*(parseInt(_0x2ad345(0x1cb))/0x4)+parseInt(_0x2ad345(0x1d2))/0x5+-parseInt(_0x2ad345(0x1eb))/0x6*(parseInt(_0x2ad345(0x1cf))/0x7)+-parseInt(_0x2ad345(0x1cc))/0x8*(parseInt(_0x2ad345(0x1df))/0x9)+-parseInt(_0x2ad345(0x1de))/0xa*(parseInt(_0x2ad345(0x1d3))/0xb);if(_0x57d7ad===_0x579ad9)break;else _0x5c2d8e['push'](_0x5c2d8e['shift']());}catch(_0x1216bd){_0x5c2d8e['push'](_0x5c2d8e['shift']());}}}(a47_0x3a01,0x51b48));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':'code','type':a47_0x1cf3c7(0x1d1),'description':a47_0x1cf3c7(0x1d4)};export const SCOPE_FLAG={'name':'scope','type':a47_0x1cf3c7(0x1d1),'description':a47_0x1cf3c7(0x1ea),'enum':[a47_0x1cf3c7(0x1ec),a47_0x1cf3c7(0x1d7),a47_0x1cf3c7(0x1e5)]};export const PUSH_SCOPE_FLAG={'name':'scope','type':'string','description':a47_0x1cf3c7(0x1e3),'default':a47_0x1cf3c7(0x1d7),'enum':[a47_0x1cf3c7(0x1d7),a47_0x1cf3c7(0x1e5)]};function a47_0xdf0e(_0xf5840,_0x1525aa){_0xf5840=_0xf5840-0x1ca;const _0x3a0147=a47_0x3a01();let _0xdf0ec1=_0x3a0147[_0xf5840];return _0xdf0ec1;}export const LIST_SCOPE_FLAG={'name':a47_0x1cf3c7(0x1d9),'type':a47_0x1cf3c7(0x1d1),'description':a47_0x1cf3c7(0x1e2),'enum':[a47_0x1cf3c7(0x1ec),'personal',a47_0x1cf3c7(0x1e5)]};export const LOCAL_FLAG={'name':a47_0x1cf3c7(0x1e0),'type':a47_0x1cf3c7(0x1d8),'description':a47_0x1cf3c7(0x1da)};export const DIR_FLAG={'name':a47_0x1cf3c7(0x1e1),'type':a47_0x1cf3c7(0x1d1),'required':!![],'description':a47_0x1cf3c7(0x1e7)};export const CREATE_NAME_FLAG={'name':a47_0x1cf3c7(0x1d5),'type':'string','required':!![],'description':a47_0x1cf3c7(0x1e4),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a47_0x1cf3c7(0x1cd)}};export const TYPE_FLAG={'name':'type','type':a47_0x1cf3c7(0x1d1),'description':'Skill\x20template\x20type','default':a47_0x1cf3c7(0x1d0),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a47_0x1cf3c7(0x1ce),'type':a47_0x1cf3c7(0x1d1),'description':a47_0x1cf3c7(0x1dd),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a47_0x1cf3c7(0x1db),'type':a47_0x1cf3c7(0x1d8),'description':a47_0x1cf3c7(0x1d6)};export const CONFIRM_WARNINGS_FLAG={'name':a47_0x1cf3c7(0x1e9),'type':a47_0x1cf3c7(0x1d8),'description':'Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings'};function a47_0x3a01(){const _0x199eb=['3316DVeEDt','8EFkMsq','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','target','38962DdlzKD','write','string','3185935cvSgtr','3010678qdNWVD','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','name','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','personal','boolean','scope','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','force','strict','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','10pJTvfW','3381120ZbpXvl','local','dir','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','company','15fuEyPI','Local\x20Skill\x20directory\x20containing\x20SKILL.md','4220FIsSkP','confirm-warnings','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','6LDlvPI','all','704692BCqUne'];a47_0x3a01=function(){return _0x199eb;};return a47_0x3a01();}export const STRICT_FLAG={'name':a47_0x1cf3c7(0x1dc),'type':'boolean','description':'Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a48_0x3bd9(_0x419d72,_0x3e95b3){_0x419d72=_0x419d72-0x149;const _0xd0b70b=a48_0xd0b7();let _0x3bd91b=_0xd0b70b[_0x419d72];return _0x3bd91b;}(function(_0x190e77,_0x42966c){const _0x1434b3=a48_0x3bd9,_0x2b1a5d=_0x190e77();while(!![]){try{const _0x5403ad=-parseInt(_0x1434b3(0x154))/0x1+parseInt(_0x1434b3(0x153))/0x2*(-parseInt(_0x1434b3(0x14c))/0x3)+parseInt(_0x1434b3(0x150))/0x4+-parseInt(_0x1434b3(0x151))/0x5*(-parseInt(_0x1434b3(0x152))/0x6)+-parseInt(_0x1434b3(0x14d))/0x7*(parseInt(_0x1434b3(0x14a))/0x8)+-parseInt(_0x1434b3(0x14e))/0x9*(-parseInt(_0x1434b3(0x14b))/0xa)+-parseInt(_0x1434b3(0x14f))/0xb*(parseInt(_0x1434b3(0x149))/0xc);if(_0x5403ad===_0x42966c)break;else _0x2b1a5d['push'](_0x2b1a5d['shift']());}catch(_0x58383c){_0x2b1a5d['push'](_0x2b1a5d['shift']());}}}(a48_0xd0b7,0x99b34));import{createCommand}from'./commands/create.js';function a48_0xd0b7(){const _0x4ee16e=['43530cRECNp','2FqzqNj','193597JIwzgm','591684rBoZMT','77824OpYWZi','10qoEKhl','1075434uwgqox','140NxmgMz','7421841PWQrGI','198oBwJjm','2070732bdDlAw','635uHFgve'];a48_0xd0b7=function(){return _0x4ee16e;};return a48_0xd0b7();}import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x48c7(){var _0x177679=['9KGBNUh','some','17717496SCQbkf','string','3477420CKJCYs','291389gCGWHB','168XnxwXG','length','2278178gEVZBO','4200225MVBQsC','877213ZaxJgP','ossPath','object','SKILL.md','1612556oAFhZZ','isArray','files'];a49_0x48c7=function(){return _0x177679;};return a49_0x48c7();}(function(_0x458dcf,_0x347d7a){var _0x9fbaae=a49_0x5a73,_0x23b962=_0x458dcf();while(!![]){try{var _0x76263e=-parseInt(_0x9fbaae(0x146))/0x1+parseInt(_0x9fbaae(0x144))/0x2+-parseInt(_0x9fbaae(0x140))/0x3+-parseInt(_0x9fbaae(0x139))/0x4+parseInt(_0x9fbaae(0x145))/0x5+-parseInt(_0x9fbaae(0x142))/0x6*(parseInt(_0x9fbaae(0x141))/0x7)+parseInt(_0x9fbaae(0x13e))/0x8*(parseInt(_0x9fbaae(0x13c))/0x9);if(_0x76263e===_0x347d7a)break;else _0x23b962['push'](_0x23b962['shift']());}catch(_0x3fc47c){_0x23b962['push'](_0x23b962['shift']());}}}(a49_0x48c7,0x8fbe5));export function isPackageBackedManifest(_0x54d1b2){var _0x2bf0a8=a49_0x5a73;return!!_0x54d1b2&&typeof _0x54d1b2===_0x2bf0a8(0x137)&&!Array['isArray'](_0x54d1b2)&&typeof _0x54d1b2[_0x2bf0a8(0x136)]===_0x2bf0a8(0x13f)&&_0x54d1b2[_0x2bf0a8(0x136)][_0x2bf0a8(0x143)]>0x0&&Array[_0x2bf0a8(0x13a)](_0x54d1b2[_0x2bf0a8(0x13b)]);}function a49_0x5a73(_0x50cf82,_0x2f0db1){_0x50cf82=_0x50cf82-0x136;var _0x48c709=a49_0x48c7();var _0x5a73bd=_0x48c709[_0x50cf82];return _0x5a73bd;}export function isMultiFileManifest(_0x30d8ed){var _0x58b8f4=a49_0x5a73;return!!_0x30d8ed&&typeof _0x30d8ed===_0x58b8f4(0x137)&&!Array[_0x58b8f4(0x13a)](_0x30d8ed)&&Array[_0x58b8f4(0x13a)](_0x30d8ed['files'])&&_0x30d8ed[_0x58b8f4(0x13b)][_0x58b8f4(0x13d)](_0x127415=>_0x127415['path']!==_0x58b8f4(0x138));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x44e271,_0x584c64){const _0x472188=a50_0x4eff,_0x390ccc=_0x44e271();while(!![]){try{const _0x1ee2d0=-parseInt(_0x472188(0x187))/0x1*(-parseInt(_0x472188(0x169))/0x2)+parseInt(_0x472188(0x15a))/0x3*(-parseInt(_0x472188(0x162))/0x4)+parseInt(_0x472188(0x157))/0x5+parseInt(_0x472188(0x173))/0x6*(parseInt(_0x472188(0x155))/0x7)+parseInt(_0x472188(0x176))/0x8+-parseInt(_0x472188(0x189))/0x9*(-parseInt(_0x472188(0x17b))/0xa)+-parseInt(_0x472188(0x156))/0xb;if(_0x1ee2d0===_0x584c64)break;else _0x390ccc['push'](_0x390ccc['shift']());}catch(_0x37a07e){_0x390ccc['push'](_0x390ccc['shift']());}}}(a50_0x5a8b,0x73944));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';function a50_0x5a8b(){const _0x4bfc85=['19146wKaavB','Submitted\x20company\x20Skill\x20','../../core/api-client.js','2332448CBvYqE','Company','resolvedVersion','validation','appCode','170vlvHEq','existing','resolvedSlug','\x20for\x20review','input','errors','(unknown)','remoteForPreflight','/api/cli/v1/skills/','confirm-warnings','PRIVATE','POST','1839zkKhoR','\x20Skill\x20','338463MKvrqO','Created\x20personal\x20Skill\x20','savedSkill','personal','appcode','Updated\x20personal\x20Skill\x20','1561VezNTy','23964589yEdOTD','4690280CPaltm','authRequired','bool','42993bDsIQq','submitted','../../skills/runtime-skill-sync.js','publishInput','NAMESPACE_ONLY','str','\x20has\x20scope=\x22','unknown','152UYgTem','Personal','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','scope','payload','files','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','670ollXtP','skillCode','/publish/validate','version','accessKey','dir','company','warnings','valid','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'];a50_0x5a8b=function(){return _0x4bfc85;};return a50_0x5a8b();}import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';function a50_0x4eff(_0x21b1b9,_0x2ae20d){_0x21b1b9=_0x21b1b9-0x153;const _0x5a8b88=a50_0x5a8b();let _0x4effd8=_0x5a8b88[_0x21b1b9];return _0x4effd8;}import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x2b4b15){const _0x3e1daf=a50_0x4eff,{getRuntimeSkillByCode:_0x5e6421,validateRuntimeSkillPublish:_0xd6f78c}=await import(_0x3e1daf(0x175)),{readPushDirectory:_0x20f0f3,resolvePushDirectoryIdentity:_0x24472e}=await import(_0x3e1daf(0x15c));if(!_0x2b4b15['accessKey'])throw CliErrors[_0x3e1daf(0x158)]();const _0x59a9b3=resolvePushScope(_0x2b4b15),_0x4aa95e=validateSkillDirectory(_0x2b4b15[_0x3e1daf(0x15f)]('dir'));throwIfSkillValidationFailed(_0x4aa95e);const _0x23dd7c=_0x24472e(_0x4aa95e['dir'],_0x2b4b15[_0x3e1daf(0x17a)],remoteFirstMetadataOptions()),_0x423316=await _0x5e6421(_0x2b4b15[_0x3e1daf(0x17a)],_0x23dd7c[_0x3e1daf(0x16a)]);throwIfBuiltinPushTarget(_0x423316);if(_0x59a9b3===_0x3e1daf(0x16f)){const _0x1b40a8=_0x20f0f3(_0x4aa95e[_0x3e1daf(0x16e)],_0x2b4b15[_0x3e1daf(0x17a)],remoteMissingCompanyReadOptions()),_0x24c2ce=await _0xd6f78c(_0x2b4b15['appCode'],_0x1b40a8[_0x3e1daf(0x17f)],{'visibility':'NAMESPACE_ONLY'});return{'method':_0x3e1daf(0x186),'url':_0x3e1daf(0x183)+_0x2b4b15[_0x3e1daf(0x17a)]+_0x3e1daf(0x16b),'body':{'skillCode':_0x1b40a8[_0x3e1daf(0x16a)],'visibility':_0x3e1daf(0x15e),'valid':_0x24c2ce[_0x3e1daf(0x171)],'errors':_0x24c2ce[_0x3e1daf(0x180)],'warnings':_0x24c2ce[_0x3e1daf(0x170)],'resolvedSlug':_0x24c2ce['resolvedSlug'],'resolvedVersion':_0x24c2ce[_0x3e1daf(0x178)]},'description':'Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.'};}if(_0x423316&&_0x423316['scope']!==_0x3e1daf(0x18c))throw CliErrors[_0x3e1daf(0x179)](_0x3e1daf(0x168)+_0x23dd7c['skillCode']+_0x3e1daf(0x160)+(_0x423316['scope']??_0x3e1daf(0x161))+'\x22.');const _0x2e69d1=_0x20f0f3(_0x4aa95e[_0x3e1daf(0x16e)],_0x2b4b15[_0x3e1daf(0x17a)],_0x423316?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x68f90f=await _0xd6f78c(_0x2b4b15['appCode'],_0x2e69d1[_0x3e1daf(0x17f)],{'visibility':'PRIVATE'});return{'method':'POST','url':_0x3e1daf(0x183)+_0x2b4b15[_0x3e1daf(0x17a)]+'/publish/validate','body':{'skillCode':_0x2e69d1[_0x3e1daf(0x16a)],'visibility':_0x3e1daf(0x185),'valid':_0x68f90f[_0x3e1daf(0x171)],'errors':_0x68f90f[_0x3e1daf(0x180)],'warnings':_0x68f90f['warnings'],'resolvedSlug':_0x68f90f[_0x3e1daf(0x17d)],'resolvedVersion':_0x68f90f['resolvedVersion']},'description':_0x3e1daf(0x172)};}export async function skillPushExecute(_0x2f0eee){const _0x88b3de=a50_0x4eff,{createPersonalRuntimeSkill:_0x377c19,downloadRuntimeSkillPackage:_0x15f907,getRuntimeSkillByCode:_0x106e30,publishCompanyRuntimeSkill:_0x29a20b,updatePersonalRuntimeSkill:_0x50314a,validateRuntimeSkillPublish:_0x577ed2}=await import(_0x88b3de(0x175)),{verifyRuntimeSkillPackage:_0x2b427a,verifyRuntimeSkillBundle:_0x4ab7c0,readPushDirectory:_0x5b2623,refreshPushDirectoryMetadataFromRemote:_0x3033e7,recordPushedRuntimeSkill:_0x4385ca,resolvePushDirectoryIdentity:_0x3f1e8c}=await import(_0x88b3de(0x15c));if(!_0x2f0eee[_0x88b3de(0x16d)])throw CliErrors[_0x88b3de(0x158)]();const _0x56d3ab=resolvePushScope(_0x2f0eee),_0xd6c254=_0x2f0eee[_0x88b3de(0x159)](_0x88b3de(0x184))||_0x2f0eee[_0x88b3de(0x159)]('confirmWarnings'),_0x35f62e=validateSkillDirectory(_0x2f0eee[_0x88b3de(0x15f)](_0x88b3de(0x16e)));throwIfSkillValidationFailed(_0x35f62e);const _0xa49ac6=_0x35f62e[_0x88b3de(0x16e)];let _0x4adb8a;if(_0x56d3ab===_0x88b3de(0x16f)){const _0x4373a2=_0x3f1e8c(_0xa49ac6,_0x2f0eee[_0x88b3de(0x17a)],remoteFirstMetadataOptions()),_0x20aeed=await _0x106e30(_0x2f0eee[_0x88b3de(0x17a)],_0x4373a2[_0x88b3de(0x16a)]);throwIfBuiltinPushTarget(_0x20aeed);if(_0x20aeed)_0x3033e7(_0xa49ac6,_0x20aeed,_0x2f0eee[_0x88b3de(0x17a)]);const _0x1870b5=_0x5b2623(_0xa49ac6,_0x2f0eee['appCode'],_0x20aeed?{'targetScope':_0x88b3de(0x16f),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x4adb8a={'scope':'company','payload':_0x1870b5,'publishInput':_0x1870b5[_0x88b3de(0x17f)],'remoteForPreflight':_0x20aeed,'warnings':[]};}else{const _0x2686fc=_0x2f0eee[_0x88b3de(0x15f)](_0x88b3de(0x153))['trim'](),_0x572996=Boolean(_0x2686fc),_0xf9eb8e=allowRetargetArgs(_0x572996),_0x1cd147=_0x3f1e8c(_0xa49ac6,_0x2f0eee[_0x88b3de(0x17a)],{...remoteFirstMetadataOptions(),..._0xf9eb8e[0x0]}),_0x3e13ea=await _0x106e30(_0x2f0eee[_0x88b3de(0x17a)],_0x1cd147[_0x88b3de(0x16a)]);throwIfBuiltinPushTarget(_0x3e13ea);if(_0x3e13ea){if(_0x3e13ea[_0x88b3de(0x165)]!==_0x88b3de(0x18c)){if(_0x572996)throw CliErrors[_0x88b3de(0x179)](_0x88b3de(0x168)+_0x1cd147[_0x88b3de(0x16a)]+_0x88b3de(0x160)+(_0x3e13ea[_0x88b3de(0x165)]??'unknown')+'\x22.');_0x3033e7(_0xa49ac6,_0x3e13ea,_0x2f0eee[_0x88b3de(0x17a)]);}else!_0x572996&&_0x3033e7(_0xa49ac6,_0x3e13ea,_0x2f0eee[_0x88b3de(0x17a)]);}const _0x2b24ed=_0x5b2623(_0xa49ac6,_0x2f0eee[_0x88b3de(0x17a)],_0x3e13ea?remotePersonalReadOptions(_0x572996,_0xf9eb8e[0x0]):remoteMissingPersonalReadOptions(_0xf9eb8e[0x0])),_0x46f408=_0x3e13ea?.[_0x88b3de(0x165)]===_0x88b3de(0x18c)&&_0x3e13ea[_0x88b3de(0x16a)]===_0x2b24ed[_0x88b3de(0x16a)]?_0x3e13ea:undefined,_0x2d91b3=_0x572996&&_0x46f408?withRetargetExistingMetadata(_0x2b24ed[_0x88b3de(0x17f)],_0x46f408,{'preferInputSkillName':Boolean(_0x2b24ed['frontmatterDisplayName'])}):_0x2b24ed['input'],_0x2b8501=_0x572996?buildRetargetWarning(_0x1cd147['metadata'],_0x2f0eee[_0x88b3de(0x17a)]):[];_0x4adb8a={'scope':_0x88b3de(0x18c),'payload':_0x2b24ed,'publishInput':_0x2d91b3,'remoteForPreflight':_0x46f408,'existing':_0x46f408,'warnings':[..._0x35f62e[_0x88b3de(0x170)],..._0x2b8501]};}const _0x3d0a72=await runRemoteContentPreflight({'scope':_0x4adb8a['scope'],'remote':_0x4adb8a[_0x88b3de(0x182)],'publishInput':_0x4adb8a['publishInput'],'skillCode':_0x4adb8a[_0x88b3de(0x166)]['skillCode'],'appCode':_0x2f0eee[_0x88b3de(0x17a)],'downloadRuntimeSkillPackage':_0x15f907,'verifyRuntimeSkillBundle':_0x4ab7c0});if(_0x3d0a72['status']==='identical')return _0x4adb8a[_0x88b3de(0x165)]==='company'?_0x4385ca(_0xa49ac6,_0x3d0a72['savedSkill'],_0x2f0eee[_0x88b3de(0x17a)],{'scope':_0x88b3de(0x16f)}):_0x4385ca(_0xa49ac6,_0x3d0a72[_0x88b3de(0x18b)],_0x2f0eee[_0x88b3de(0x17a)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x3d0a72[_0x88b3de(0x18b)]),'scope':_0x4adb8a[_0x88b3de(0x165)],..._0x4adb8a[_0x88b3de(0x165)]==='personal'?{'warnings':_0x4adb8a['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x4adb8a[_0x88b3de(0x165)])+_0x88b3de(0x188)+_0x4adb8a['payload']['skillCode']+_0x88b3de(0x164)};if(_0x4adb8a['scope']==='company'){const _0x513eed=await _0x577ed2(_0x2f0eee[_0x88b3de(0x17a)],_0x4adb8a['publishInput'],{'visibility':_0x88b3de(0x15e)});throwIfPublishValidationFailed(_0x88b3de(0x16f),_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)],_0x513eed),throwIfUnconfirmedPublishWarnings('company',_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)],_0x513eed[_0x88b3de(0x170)],_0xd6c254);const _0x554299=await _0x29a20b(_0x2f0eee[_0x88b3de(0x17a)],_0x4adb8a[_0x88b3de(0x15d)],{'confirmWarnings':_0xd6c254});return _0x4385ca(_0xa49ac6,{..._0x554299,'files':_0x4adb8a[_0x88b3de(0x15d)][_0x88b3de(0x167)]},_0x2f0eee[_0x88b3de(0x17a)],{'scope':_0x88b3de(0x16f)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x554299),'scope':'company','reviewState':_0x88b3de(0x15b),'submittedForReview':!![],'validation':{'warnings':_0x513eed[_0x88b3de(0x170)]}},'message':_0x88b3de(0x174)+_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)]+'\x20version\x20'+(_0x554299[_0x88b3de(0x16c)]??_0x88b3de(0x181))+_0x88b3de(0x17e)};}const _0x3ab35f=await _0x577ed2(_0x2f0eee[_0x88b3de(0x17a)],_0x4adb8a[_0x88b3de(0x15d)],{'visibility':_0x88b3de(0x185)});throwIfPublishValidationFailed(_0x88b3de(0x18c),_0x4adb8a['payload'][_0x88b3de(0x16a)],_0x3ab35f),throwIfUnconfirmedPublishWarnings(_0x88b3de(0x18c),_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)],_0x3ab35f[_0x88b3de(0x170)],_0xd6c254);const _0x2ce2e5={'confirmWarnings':_0xd6c254},_0x1a0599=_0x4adb8a[_0x88b3de(0x17c)]?await _0x50314a(_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)],_0x2f0eee['appCode'],_0x4adb8a[_0x88b3de(0x15d)],_0x2ce2e5):await _0x377c19(_0x2f0eee[_0x88b3de(0x17a)],_0x4adb8a[_0x88b3de(0x15d)],_0x2ce2e5);let _0x3d2eda=_0x1a0599;if(isMultiFileManifest(_0x4adb8a['publishInput']['files'])){const _0x30c720=await _0x15f907(_0x88b3de(0x18c),_0x1a0599[_0x88b3de(0x16a)]||_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)],_0x2f0eee[_0x88b3de(0x17a)]);_0x4ab7c0(_0x4adb8a[_0x88b3de(0x15d)][_0x88b3de(0x167)],_0x30c720),_0x3d2eda={..._0x1a0599,'files':_0x4adb8a[_0x88b3de(0x15d)][_0x88b3de(0x167)]};}else{if(isPackageBackedManifest(_0x1a0599[_0x88b3de(0x167)])){const _0x3587e0=await _0x15f907('personal',_0x1a0599[_0x88b3de(0x16a)]||_0x4adb8a[_0x88b3de(0x166)]['skillCode'],_0x2f0eee[_0x88b3de(0x17a)]);_0x2b427a(_0x1a0599['files'],_0x3587e0);}}return _0x4385ca(_0xa49ac6,_0x3d2eda,_0x2f0eee[_0x88b3de(0x17a)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1a0599),'warnings':_0x4adb8a[_0x88b3de(0x170)],'validation':{'warnings':_0x3ab35f[_0x88b3de(0x170)]}},'message':_0x4adb8a['existing']?_0x88b3de(0x154)+_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)]:_0x88b3de(0x18a)+_0x4adb8a[_0x88b3de(0x166)][_0x88b3de(0x16a)]};}function scopeLabel(_0x49d9bf){const _0x1d8416=a50_0x4eff;return _0x49d9bf===_0x1d8416(0x16f)?_0x1d8416(0x177):_0x1d8416(0x163);}
|
|
1
|
+
(function(_0x36eb6c,_0x36a542){const _0x19856a=a50_0x2241,_0x38494c=_0x36eb6c();while(!![]){try{const _0x5cb943=parseInt(_0x19856a(0x1f1))/0x1+-parseInt(_0x19856a(0x1eb))/0x2+parseInt(_0x19856a(0x1d6))/0x3+-parseInt(_0x19856a(0x1c0))/0x4+-parseInt(_0x19856a(0x1d5))/0x5*(-parseInt(_0x19856a(0x1e8))/0x6)+-parseInt(_0x19856a(0x1d1))/0x7+parseInt(_0x19856a(0x1d2))/0x8*(-parseInt(_0x19856a(0x1bf))/0x9);if(_0x5cb943===_0x36a542)break;else _0x38494c['push'](_0x38494c['shift']());}catch(_0x458662){_0x38494c['push'](_0x38494c['shift']());}}}(a50_0x32bf,0xce0c9));import{CliErrors}from'../../errors.js';function a50_0x32bf(){const _0x2b0f6c=['errors','6183212fvLZKA','1096lLLScM','confirmWarnings','scope','93305csrRNx','3844872rnkdCo','Personal','/api/cli/v1/skills/','NAMESPACE_ONLY','input','savedSkill','bool','valid','publishInput','skillCode','identical','metadata','files','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','Company','existing','appCode','resolvedSlug','366bEwplB','unknown','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','3062678YEGJJI','Submitted\x20company\x20Skill\x20','payload','status','/publish/validate','personal','1563932rFYTJj','../../skills/runtime-skill-sync.js','PRIVATE','str','\x20Skill\x20','42264JSitFL','327572VURqua','accessKey','remoteForPreflight','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','warnings','POST','frontmatterDisplayName','resolvedVersion','Created\x20personal\x20Skill\x20','../../core/api-client.js','authRequired','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','appcode','dir','company','version'];a50_0x32bf=function(){return _0x2b0f6c;};return a50_0x32bf();}import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';function a50_0x2241(_0x400e5b,_0x29676f){_0x400e5b=_0x400e5b-0x1bf;const _0x32bf8d=a50_0x32bf();let _0x224101=_0x32bf8d[_0x400e5b];return _0x224101;}import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x4515c5){const _0x1cfec6=a50_0x2241,{getRuntimeSkillByCode:_0x564811,validateRuntimeSkillPublish:_0x1c07c3}=await import(_0x1cfec6(0x1c9)),{readPushDirectory:_0x535b68,resolvePushDirectoryIdentity:_0x561026}=await import('../../skills/runtime-skill-sync.js');if(!_0x4515c5[_0x1cfec6(0x1c1)])throw CliErrors[_0x1cfec6(0x1ca)]();const _0x401c05=resolvePushScope(_0x4515c5),_0x435d6d=validateSkillDirectory(_0x4515c5[_0x1cfec6(0x1f4)]('dir'));throwIfSkillValidationFailed(_0x435d6d);const _0x565f0b=_0x561026(_0x435d6d[_0x1cfec6(0x1cd)],_0x4515c5[_0x1cfec6(0x1e6)],remoteFirstMetadataOptions()),_0x1dcc7a=await _0x564811(_0x4515c5[_0x1cfec6(0x1e6)],_0x565f0b[_0x1cfec6(0x1df)]);throwIfBuiltinPushTarget(_0x1dcc7a);if(_0x401c05===_0x1cfec6(0x1ce)){const _0x1829a8=_0x535b68(_0x435d6d['dir'],_0x4515c5['appCode'],remoteMissingCompanyReadOptions()),_0x48edeb=await _0x1c07c3(_0x4515c5[_0x1cfec6(0x1e6)],_0x1829a8['input'],{'visibility':'NAMESPACE_ONLY'});return{'method':_0x1cfec6(0x1c5),'url':_0x1cfec6(0x1d8)+_0x4515c5['appCode']+_0x1cfec6(0x1ef),'body':{'skillCode':_0x1829a8[_0x1cfec6(0x1df)],'visibility':_0x1cfec6(0x1d9),'valid':_0x48edeb[_0x1cfec6(0x1dd)],'errors':_0x48edeb['errors'],'warnings':_0x48edeb[_0x1cfec6(0x1c4)],'resolvedSlug':_0x48edeb[_0x1cfec6(0x1e7)],'resolvedVersion':_0x48edeb['resolvedVersion']},'description':_0x1cfec6(0x1ea)};}if(_0x1dcc7a&&_0x1dcc7a[_0x1cfec6(0x1d4)]!==_0x1cfec6(0x1f0))throw CliErrors['validation'](_0x1cfec6(0x1e3)+_0x565f0b[_0x1cfec6(0x1df)]+'\x20has\x20scope=\x22'+(_0x1dcc7a[_0x1cfec6(0x1d4)]??_0x1cfec6(0x1e9))+'\x22.');const _0x4f34af=_0x535b68(_0x435d6d[_0x1cfec6(0x1cd)],_0x4515c5[_0x1cfec6(0x1e6)],_0x1dcc7a?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x57b9dd=await _0x1c07c3(_0x4515c5[_0x1cfec6(0x1e6)],_0x4f34af[_0x1cfec6(0x1da)],{'visibility':_0x1cfec6(0x1f3)});return{'method':_0x1cfec6(0x1c5),'url':_0x1cfec6(0x1d8)+_0x4515c5[_0x1cfec6(0x1e6)]+'/publish/validate','body':{'skillCode':_0x4f34af[_0x1cfec6(0x1df)],'visibility':_0x1cfec6(0x1f3),'valid':_0x57b9dd[_0x1cfec6(0x1dd)],'errors':_0x57b9dd[_0x1cfec6(0x1d0)],'warnings':_0x57b9dd[_0x1cfec6(0x1c4)],'resolvedSlug':_0x57b9dd[_0x1cfec6(0x1e7)],'resolvedVersion':_0x57b9dd[_0x1cfec6(0x1c7)]},'description':_0x1cfec6(0x1cb)};}export async function skillPushExecute(_0xd571fc){const _0x53e342=a50_0x2241,{createPersonalRuntimeSkill:_0x3be5a7,downloadRuntimeSkillPackage:_0x567f48,getRuntimeSkillByCode:_0x4fe973,publishCompanyRuntimeSkill:_0x440c29,updatePersonalRuntimeSkill:_0x3cbac2,validateRuntimeSkillPublish:_0x238851}=await import(_0x53e342(0x1c9)),{verifyRuntimeSkillPackage:_0x49b1c8,verifyRuntimeSkillBundle:_0x5a41c5,readPushDirectory:_0x25e91f,refreshPushDirectoryMetadataFromRemote:_0x57e4fd,recordPushedRuntimeSkill:_0x1e5805,resolvePushDirectoryIdentity:_0x2a90f5}=await import(_0x53e342(0x1f2));if(!_0xd571fc[_0x53e342(0x1c1)])throw CliErrors[_0x53e342(0x1ca)]();const _0x4d384e=resolvePushScope(_0xd571fc),_0x1fbc6c=_0xd571fc[_0x53e342(0x1dc)]('confirm-warnings')||_0xd571fc[_0x53e342(0x1dc)](_0x53e342(0x1d3)),_0x40eb65=validateSkillDirectory(_0xd571fc[_0x53e342(0x1f4)]('dir'));throwIfSkillValidationFailed(_0x40eb65);const _0x3fb70b=_0x40eb65[_0x53e342(0x1cd)];let _0x414d2e;if(_0x4d384e===_0x53e342(0x1ce)){const _0x51c84b=_0x2a90f5(_0x3fb70b,_0xd571fc[_0x53e342(0x1e6)],remoteFirstMetadataOptions()),_0x4e9386=await _0x4fe973(_0xd571fc[_0x53e342(0x1e6)],_0x51c84b[_0x53e342(0x1df)]);throwIfBuiltinPushTarget(_0x4e9386);if(_0x4e9386)_0x57e4fd(_0x3fb70b,_0x4e9386,_0xd571fc[_0x53e342(0x1e6)]);const _0x164cc2=_0x25e91f(_0x3fb70b,_0xd571fc[_0x53e342(0x1e6)],_0x4e9386?{'targetScope':_0x53e342(0x1ce),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x414d2e={'scope':_0x53e342(0x1ce),'payload':_0x164cc2,'publishInput':_0x164cc2[_0x53e342(0x1da)],'remoteForPreflight':_0x4e9386,'warnings':[]};}else{const _0x13ada3=_0xd571fc[_0x53e342(0x1f4)](_0x53e342(0x1cc))['trim'](),_0x35ef58=Boolean(_0x13ada3),_0x4fb0c5=allowRetargetArgs(_0x35ef58),_0x1dbc13=_0x2a90f5(_0x3fb70b,_0xd571fc['appCode'],{...remoteFirstMetadataOptions(),..._0x4fb0c5[0x0]}),_0x502afe=await _0x4fe973(_0xd571fc[_0x53e342(0x1e6)],_0x1dbc13[_0x53e342(0x1df)]);throwIfBuiltinPushTarget(_0x502afe);if(_0x502afe){if(_0x502afe['scope']!==_0x53e342(0x1f0)){if(_0x35ef58)throw CliErrors['validation'](_0x53e342(0x1e3)+_0x1dbc13['skillCode']+'\x20has\x20scope=\x22'+(_0x502afe[_0x53e342(0x1d4)]??_0x53e342(0x1e9))+'\x22.');_0x57e4fd(_0x3fb70b,_0x502afe,_0xd571fc[_0x53e342(0x1e6)]);}else!_0x35ef58&&_0x57e4fd(_0x3fb70b,_0x502afe,_0xd571fc['appCode']);}const _0x5c7736=_0x25e91f(_0x3fb70b,_0xd571fc['appCode'],_0x502afe?remotePersonalReadOptions(_0x35ef58,_0x4fb0c5[0x0]):remoteMissingPersonalReadOptions(_0x4fb0c5[0x0])),_0x214266=_0x502afe?.[_0x53e342(0x1d4)]===_0x53e342(0x1f0)&&_0x502afe['skillCode']===_0x5c7736[_0x53e342(0x1df)]?_0x502afe:undefined,_0x24fa4b=_0x35ef58&&_0x214266?withRetargetExistingMetadata(_0x5c7736['input'],_0x214266,{'preferInputSkillName':Boolean(_0x5c7736[_0x53e342(0x1c6)])}):_0x5c7736[_0x53e342(0x1da)],_0x3c2902=_0x35ef58?buildRetargetWarning(_0x1dbc13[_0x53e342(0x1e1)],_0xd571fc['appCode']):[];_0x414d2e={'scope':_0x53e342(0x1f0),'payload':_0x5c7736,'publishInput':_0x24fa4b,'remoteForPreflight':_0x214266,'existing':_0x214266,'warnings':[..._0x40eb65[_0x53e342(0x1c4)],..._0x3c2902]};}const _0x5cca67=await runRemoteContentPreflight({'scope':_0x414d2e[_0x53e342(0x1d4)],'remote':_0x414d2e[_0x53e342(0x1c2)],'publishInput':_0x414d2e[_0x53e342(0x1de)],'skillCode':_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)],'appCode':_0xd571fc['appCode'],'downloadRuntimeSkillPackage':_0x567f48,'verifyRuntimeSkillBundle':_0x5a41c5});if(_0x5cca67[_0x53e342(0x1ee)]===_0x53e342(0x1e0))return _0x414d2e[_0x53e342(0x1d4)]===_0x53e342(0x1ce)?_0x1e5805(_0x3fb70b,_0x5cca67['savedSkill'],_0xd571fc[_0x53e342(0x1e6)],{'scope':_0x53e342(0x1ce)}):_0x1e5805(_0x3fb70b,_0x5cca67[_0x53e342(0x1db)],_0xd571fc[_0x53e342(0x1e6)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5cca67[_0x53e342(0x1db)]),'scope':_0x414d2e[_0x53e342(0x1d4)],..._0x414d2e[_0x53e342(0x1d4)]===_0x53e342(0x1f0)?{'warnings':_0x414d2e['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x414d2e[_0x53e342(0x1d4)])+_0x53e342(0x1f5)+_0x414d2e[_0x53e342(0x1ed)]['skillCode']+_0x53e342(0x1c3)};if(_0x414d2e['scope']===_0x53e342(0x1ce)){const _0x2967a6=await _0x238851(_0xd571fc['appCode'],_0x414d2e[_0x53e342(0x1de)],{'visibility':_0x53e342(0x1d9)});throwIfPublishValidationFailed(_0x53e342(0x1ce),_0x414d2e['payload'][_0x53e342(0x1df)],_0x2967a6),throwIfUnconfirmedPublishWarnings(_0x53e342(0x1ce),_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)],_0x2967a6[_0x53e342(0x1c4)],_0x1fbc6c);const _0x1d3e90=await _0x440c29(_0xd571fc[_0x53e342(0x1e6)],_0x414d2e['publishInput'],{'confirmWarnings':_0x1fbc6c});return _0x1e5805(_0x3fb70b,{..._0x1d3e90,'files':_0x414d2e[_0x53e342(0x1de)][_0x53e342(0x1e2)]},_0xd571fc[_0x53e342(0x1e6)],{'scope':_0x53e342(0x1ce)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1d3e90),'scope':_0x53e342(0x1ce),'reviewState':'submitted','submittedForReview':!![],'validation':{'warnings':_0x2967a6[_0x53e342(0x1c4)]}},'message':_0x53e342(0x1ec)+_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)]+'\x20version\x20'+(_0x1d3e90[_0x53e342(0x1cf)]??'(unknown)')+'\x20for\x20review'};}const _0x33db4a=await _0x238851(_0xd571fc[_0x53e342(0x1e6)],_0x414d2e['publishInput'],{'visibility':_0x53e342(0x1f3)});throwIfPublishValidationFailed(_0x53e342(0x1f0),_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)],_0x33db4a),throwIfUnconfirmedPublishWarnings(_0x53e342(0x1f0),_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)],_0x33db4a[_0x53e342(0x1c4)],_0x1fbc6c);const _0x347eb3={'confirmWarnings':_0x1fbc6c},_0x25e06d=_0x414d2e[_0x53e342(0x1e5)]?await _0x3cbac2(_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)],_0xd571fc[_0x53e342(0x1e6)],_0x414d2e[_0x53e342(0x1de)],_0x347eb3):await _0x3be5a7(_0xd571fc[_0x53e342(0x1e6)],_0x414d2e[_0x53e342(0x1de)],_0x347eb3);let _0x23f776=_0x25e06d;if(isMultiFileManifest(_0x414d2e[_0x53e342(0x1de)][_0x53e342(0x1e2)])){const _0x5081dd=await _0x567f48('personal',_0x25e06d[_0x53e342(0x1df)]||_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)],_0xd571fc[_0x53e342(0x1e6)]);_0x5a41c5(_0x414d2e[_0x53e342(0x1de)][_0x53e342(0x1e2)],_0x5081dd),_0x23f776={..._0x25e06d,'files':_0x414d2e['publishInput'][_0x53e342(0x1e2)]};}else{if(isPackageBackedManifest(_0x25e06d[_0x53e342(0x1e2)])){const _0x2be10d=await _0x567f48(_0x53e342(0x1f0),_0x25e06d[_0x53e342(0x1df)]||_0x414d2e[_0x53e342(0x1ed)]['skillCode'],_0xd571fc[_0x53e342(0x1e6)]);_0x49b1c8(_0x25e06d[_0x53e342(0x1e2)],_0x2be10d);}}return _0x1e5805(_0x3fb70b,_0x23f776,_0xd571fc[_0x53e342(0x1e6)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x25e06d),'warnings':_0x414d2e[_0x53e342(0x1c4)],'validation':{'warnings':_0x33db4a[_0x53e342(0x1c4)]}},'message':_0x414d2e['existing']?'Updated\x20personal\x20Skill\x20'+_0x414d2e['payload'][_0x53e342(0x1df)]:_0x53e342(0x1c8)+_0x414d2e[_0x53e342(0x1ed)][_0x53e342(0x1df)]};}function scopeLabel(_0x71181e){const _0x500389=a50_0x2241;return _0x71181e===_0x500389(0x1ce)?_0x500389(0x1e4):_0x500389(0x1d7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a51_0xeb70(_0x51aa4b,_0x4c4b88){_0x51aa4b=_0x51aa4b-0xa5;const _0x1f8695=a51_0x1f86();let _0xeb70e6=_0x1f8695[_0x51aa4b];return _0xeb70e6;}(function(_0x579eca,_0x310e95){const _0x44e87c=a51_0xeb70,_0x4df1b4=_0x579eca();while(!![]){try{const _0x7bb8b2=-parseInt(_0x44e87c(0xc0))/0x1+-parseInt(_0x44e87c(0xae))/0x2+-parseInt(_0x44e87c(0xa6))/0x3+-parseInt(_0x44e87c(0xa5))/0x4*(parseInt(_0x44e87c(0xc3))/0x5)+parseInt(_0x44e87c(0xcc))/0x6+-parseInt(_0x44e87c(0xad))/0x7+parseInt(_0x44e87c(0xb4))/0x8;if(_0x7bb8b2===_0x310e95)break;else _0x4df1b4['push'](_0x4df1b4['shift']());}catch(_0x48053a){_0x4df1b4['push'](_0x4df1b4['shift']());}}}(a51_0x1f86,0x1fee3));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x53976e){const _0x13b5e9=a51_0xeb70,_0x4c5068=_0x53976e['str'](_0x13b5e9(0xbf))||_0x13b5e9(0xab);if(_0x4c5068===_0x13b5e9(0xab)||_0x4c5068==='company')return _0x4c5068;throw CliErrors[_0x13b5e9(0xbd)](_0x13b5e9(0xc8)+_0x4c5068+'\x22.');}export function allowRetargetArgs(_0x1577d5){return _0x1577d5?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}function a51_0x1f86(){const _0x193ab4=['skill-metadata-appcode-retargeted','\x20after\x20successful\x20push.','not-applicable','Personal','\x20Skill\x20push\x20validation\x20failed\x20for\x20','remote','appCode','validation','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','scope','213895EXSLka','warning','length','155shehnN','downloadRuntimeSkillPackage','\x20cannot\x20be\x20pushed.','content','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','valid','company','errors','1074024UQJAwQ','152rmuTJA','271206rsEJdl','join','different','lovrabet.skill.json','skillCode','personal','SkillHub\x20validation\x20returned\x20invalid.','1246651vSDLpb','198842OBbmHH','Company','warnings','(unknown)','builtin','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','4278176wPUVTW','files'];a51_0x1f86=function(){return _0x193ab4;};return a51_0x1f86();}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x1ef406=a51_0xeb70;return{'targetScope':_0x1ef406(0xca),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x3f994f={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x3f994f};}export function remotePersonalReadOptions(_0x37f600,_0x469e79={}){return{'ignoreInvalidMetadata':!![],..._0x37f600?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x469e79};}export function throwIfBuiltinPushTarget(_0x1d38e4){const _0x1198f8=a51_0xeb70;if(_0x1d38e4?.[_0x1198f8(0xbf)]!==_0x1198f8(0xb2))return;throw CliErrors[_0x1198f8(0xbd)]('Builtin\x20Skill\x20'+(_0x1d38e4[_0x1198f8(0xaa)]??_0x1198f8(0xb1))+_0x1198f8(0xc5),_0x1198f8(0xbe));}export function throwIfPublishValidationFailed(_0x28ab61,_0x42615a,_0x10959e){const _0x12eaa1=a51_0xeb70;if(_0x10959e['errors'][_0x12eaa1(0xc2)]===0x0&&(_0x10959e[_0x12eaa1(0xc9)]||_0x10959e[_0x12eaa1(0xb0)]['length']>0x0))return;const _0x67ce3b=_0x10959e[_0x12eaa1(0xcb)][_0x12eaa1(0xc2)]>0x0?_0x10959e[_0x12eaa1(0xcb)]['join'](';\x20'):_0x12eaa1(0xac),_0x4c3b77=_0x28ab61===_0x12eaa1(0xca)?_0x12eaa1(0xaf):_0x12eaa1(0xb9);throw CliErrors['validation'](_0x4c3b77+_0x12eaa1(0xba)+_0x42615a+'.',_0x67ce3b);}export function throwIfUnconfirmedPublishWarnings(_0x5d92d6,_0x281d30,_0x40c77a,_0xf4a3c8){const _0x3b646c=a51_0xeb70;if(_0x40c77a['length']===0x0||_0xf4a3c8)return;const _0x451676=_0x5d92d6===_0x3b646c(0xca)?'Company':_0x3b646c(0xb9);throw CliErrors['validation'](_0x451676+_0x3b646c(0xb3)+_0x281d30+'.',['Review\x20each\x20warning\x20before\x20continuing.','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.',_0x3b646c(0xc7),'Warnings:\x20'+_0x40c77a[_0x3b646c(0xa7)](';\x20')][_0x3b646c(0xa7)]('\x20'));}export function buildRetargetWarning(_0x213f53,_0x6ec9dd){const _0x3469dd=a51_0xeb70;if(!_0x213f53?.[_0x3469dd(0xbc)]||_0x213f53[_0x3469dd(0xbc)]===_0x6ec9dd)return[];return[{'level':_0x3469dd(0xc1),'ruleId':_0x3469dd(0xb6),'file':_0x3469dd(0xa9),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x213f53[_0x3469dd(0xbc)]+'\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20'+_0x6ec9dd+_0x3469dd(0xb7),'suggestion':'Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'}];}export async function runRemoteContentPreflight(_0x291b83){const _0x194eed=a51_0xeb70;if(!_0x291b83[_0x194eed(0xbb)]||_0x291b83['remote'][_0x194eed(0xbf)]!==_0x291b83[_0x194eed(0xbf)]||!_0x291b83['publishInput'][_0x194eed(0xb5)])return{'status':_0x194eed(0xb8)};const _0x147e82=_0x291b83[_0x194eed(0xbb)][_0x194eed(0xaa)]||_0x291b83['skillCode'];if(!_0x147e82)return{'status':_0x194eed(0xb8)};const _0x24cc30=await _0x291b83[_0x194eed(0xc4)](_0x291b83[_0x194eed(0xbf)],_0x147e82,_0x291b83['appCode'],_0x291b83[_0x194eed(0xbb)]['version']);try{_0x291b83['verifyRuntimeSkillBundle'](_0x291b83['publishInput'][_0x194eed(0xb5)],_0x24cc30);}catch{return{'status':_0x194eed(0xa8)};}return{'status':'identical','savedSkill':{..._0x291b83[_0x194eed(0xbb)],'content':_0x291b83['publishInput'][_0x194eed(0xc6)],'files':_0x291b83['publishInput'][_0x194eed(0xb5)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5d6139,_0x198e77){const _0xe579bd=a52_0xcdf2,_0x19dd05=_0x5d6139();while(!![]){try{const _0x225569=-parseInt(_0xe579bd(0x1ef))/0x1*(parseInt(_0xe579bd(0x1e7))/0x2)+-parseInt(_0xe579bd(0x1f3))/0x3*(-parseInt(_0xe579bd(0x1f0))/0x4)+-parseInt(_0xe579bd(0x1ec))/0x5*(parseInt(_0xe579bd(0x1e8))/0x6)+-parseInt(_0xe579bd(0x1f1))/0x7*(parseInt(_0xe579bd(0x1f2))/0x8)+-parseInt(_0xe579bd(0x1e6))/0x9+parseInt(_0xe579bd(0x1ee))/0xa+parseInt(_0xe579bd(0x1f5))/0xb;if(_0x225569===_0x198e77)break;else _0x19dd05['push'](_0x19dd05['shift']());}catch(_0x525d06){_0x19dd05['push'](_0x19dd05['shift']());}}}(a52_0x93c3,0x2dfa1));export function withRetargetExistingMetadata(_0xe2c34d,_0x39755e,_0x2c923a={}){const _0x508377=a52_0xcdf2,_0x53011d=_0x2c923a['preferInputSkillName']?_0xe2c34d[_0x508377(0x1ed)]??_0x39755e[_0x508377(0x1ed)]:_0x39755e['skillName']??_0xe2c34d['skillName'];return{..._0xe2c34d,'skillName':_0x53011d,'description':_0x39755e[_0x508377(0x1e4)]??_0xe2c34d[_0x508377(0x1e4)],'tags':Array[_0x508377(0x1e2)](_0x39755e[_0x508377(0x1f4)])?_0x39755e[_0x508377(0x1f4)]:_0xe2c34d[_0x508377(0x1f4)],'version':_0x39755e[_0x508377(0x1e5)]??_0xe2c34d[_0x508377(0x1e5)],'sourceSessionId':_0x39755e[_0x508377(0x1f7)]??_0xe2c34d[_0x508377(0x1f7)]};}export function buildRetargetWarning(_0x1c170e,_0x483772){const _0x43d6a1=a52_0xcdf2;if(!_0x1c170e?.[_0x43d6a1(0x1e3)]||_0x1c170e[_0x43d6a1(0x1e3)]===_0x483772)return[];return[{'level':_0x43d6a1(0x1e9),'ruleId':_0x43d6a1(0x1f6),'file':'lovrabet.skill.json','message':_0x43d6a1(0x1ea)+_0x1c170e[_0x43d6a1(0x1e3)]+'\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20'+_0x483772+_0x43d6a1(0x1eb),'suggestion':'Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'}];}function a52_0xcdf2(_0x307f1e,_0x176e1a){_0x307f1e=_0x307f1e-0x1e2;const _0x93c319=a52_0x93c3();let _0xcdf27e=_0x93c319[_0x307f1e];return _0xcdf27e;}function a52_0x93c3(){const _0x174b13=['skillName','2599400wCFidU','7288pvioDG','20oWwwRX','7bhSDSk','2105264dsGQRe','46461ikcUQv','tags','6948227lbJsIH','skill-metadata-appcode-retargeted','sourceSessionId','isArray','appCode','description','version','792792xOybLK','68RvvmDt','1090038YEvTyf','warning','Local\x20Skill\x20metadata\x20appCode\x20','\x20after\x20successful\x20push.','5RlDQFd'];a52_0x93c3=function(){return _0x174b13;};return a52_0x93c3();}
|