@lovrabet/lovrabet-cli 2.1.16 → 2.1.17
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(_0x46ce0f,_0x572b99){const _0xcf765e=a39_0x46aa,_0x59139f=_0x46ce0f();while(!![]){try{const _0x5d3821=-parseInt(_0xcf765e(0xb5))/0x1*(-parseInt(_0xcf765e(0xab))/0x2)+parseInt(_0xcf765e(0xc1))/0x3*(parseInt(_0xcf765e(0xb4))/0x4)+-parseInt(_0xcf765e(0xa9))/0x5*(-parseInt(_0xcf765e(0xb3))/0x6)+-parseInt(_0xcf765e(0xbe))/0x7*(parseInt(_0xcf765e(0xaa))/0x8)+parseInt(_0xcf765e(0xcc))/0x9+-parseInt(_0xcf765e(0xb8))/0xa*(parseInt(_0xcf765e(0xc4))/0xb)+parseInt(_0xcf765e(0xc6))/0xc;if(_0x5d3821===_0x572b99)break;else _0x59139f['push'](_0x59139f['shift']());}catch(_0x3fec65){_0x59139f['push'](_0x59139f['shift']());}}}(a39_0x66f7,0xe10c6));export function adaptServiceTreeManifestForLegacyFramework(_0x4c2786){const _0x2a3022=a39_0x46aa,_0x579e62=cloneJsonValue(_0x4c2786),_0x234801=[];if(!isObjectRecord(_0x579e62))return{'manifest':_0x579e62,'errors':_0x234801};return Array['isArray'](_0x579e62[_0x2a3022(0xcd)])&&_0x579e62['commands'][_0x2a3022(0xc0)]((_0x152903,_0x4d0ab8)=>{const _0x52011c=_0x2a3022;if(!isObjectRecord(_0x152903))return;adaptBffTarget(_0x152903[_0x52011c(0xca)],'$.commands['+_0x4d0ab8+_0x52011c(0xc2),_0x234801);}),adaptResources(_0x579e62[_0x2a3022(0xc8)],_0x2a3022(0xbb),_0x234801),{'manifest':_0x579e62,'errors':_0x234801};}export function toPublicServiceTreeTarget(_0x1f54d3){const _0x5aab61=a39_0x46aa,{scriptName:_0x1b3df4,..._0x35efb9}=_0x1f54d3;return typeof _0x1b3df4===_0x5aab61(0xc5)&&_0x1b3df4[_0x5aab61(0xcb)]()&&(_0x35efb9[_0x5aab61(0xc7)]=_0x1b3df4),_0x35efb9;}export function toPublicNormalizedServiceTree(_0x3707b4){const _0x6be4e9=a39_0x46aa;return{..._0x3707b4,'commands':_0x3707b4[_0x6be4e9(0xcd)]['map'](_0x474da6=>({..._0x474da6,'target':toPublicServiceTreeTarget(_0x474da6['target'])}))};}function adaptResources(_0x2148f0,_0x4f44e9,_0x1bf36e){const _0x1d022b=a39_0x46aa;if(!isObjectRecord(_0x2148f0))return;for(const [_0x375935,_0x56e2bd]of Object[_0x1d022b(0xad)](_0x2148f0)){if(!isObjectRecord(_0x56e2bd))continue;const _0x4c5b18=_0x4f44e9+'.'+_0x375935;if(isObjectRecord(_0x56e2bd['actions']))for(const [_0x2b2e90,_0x5d5c27]of Object['entries'](_0x56e2bd[_0x1d022b(0xc9)])){if(!isObjectRecord(_0x5d5c27))continue;const _0x288222=_0x4c5b18+_0x1d022b(0xbf)+_0x2b2e90,_0x187a1c=isObjectRecord(_0x5d5c27[_0x1d022b(0xca)])&&_0x5d5c27[_0x1d022b(0xca)][_0x1d022b(0xb0)]===_0x1d022b(0xb2);adaptBffTarget(_0x5d5c27['target'],_0x288222+'.target',_0x1bf36e),(_0x187a1c||isBffAction(_0x5d5c27))&&adaptFunctionNameField(_0x5d5c27,_0x288222,_0x1bf36e);}adaptResources(_0x56e2bd[_0x1d022b(0xc8)],_0x4c5b18+'.resources',_0x1bf36e);}}function adaptBffTarget(_0x165924,_0x4bee60,_0x585da5){const _0x2c30ab=a39_0x46aa;if(!isObjectRecord(_0x165924)||_0x165924['kind']!==_0x2c30ab(0xb2))return;adaptFunctionNameField(_0x165924,_0x4bee60,_0x585da5);}function adaptFunctionNameField(_0x1399e5,_0x1241f6,_0x5f3f1a){const _0x59cb96=a39_0x46aa;Object[_0x59cb96(0xbc)][_0x59cb96(0xc3)]['call'](_0x1399e5,_0x59cb96(0xb6))&&_0x5f3f1a['push']({'level':_0x59cb96(0xaf),'path':_0x1241f6+'.scriptName','message':'Use\x20functionName;\x20scriptName\x20is\x20not\x20part\x20of\x20the\x20runtime\x20Service\x20Tree\x20contract.'});if(Object[_0x59cb96(0xbc)]['hasOwnProperty'][_0x59cb96(0xb9)](_0x1399e5,_0x59cb96(0xc7))){if(typeof _0x1399e5[_0x59cb96(0xc7)]!==_0x59cb96(0xc5)||!_0x1399e5[_0x59cb96(0xc7)][_0x59cb96(0xcb)]()){_0x5f3f1a[_0x59cb96(0xb7)]({'level':_0x59cb96(0xaf),'path':_0x1241f6+_0x59cb96(0xba),'message':_0x59cb96(0xb1)}),delete _0x1399e5[_0x59cb96(0xc7)];return;}_0x1399e5['scriptName']=_0x1399e5['functionName'],delete _0x1399e5['functionName'];}}function a39_0x46aa(_0x1f228a,_0x18cd58){_0x1f228a=_0x1f228a-0xa9;const _0x66f72e=a39_0x66f7();let _0x46aa03=_0x66f72e[_0x1f228a];return _0x46aa03;}function isBffAction(_0x5bd89c){const _0x959b6b=a39_0x46aa;return _0x5bd89c[_0x959b6b(0xb0)]==='bff'||_0x5bd89c[_0x959b6b(0xac)]===_0x959b6b(0xce)||_0x5bd89c[_0x959b6b(0xca)]===_0x959b6b(0xce);}function cloneJsonValue(_0x5221ab){const _0x33ea56=a39_0x46aa;if(Array[_0x33ea56(0xcf)](_0x5221ab))return _0x5221ab[_0x33ea56(0xbd)](_0x249f23=>cloneJsonValue(_0x249f23));if(isObjectRecord(_0x5221ab))return Object[_0x33ea56(0xae)](Object['entries'](_0x5221ab)[_0x33ea56(0xbd)](([_0x143d64,_0x817f0f])=>[_0x143d64,cloneJsonValue(_0x817f0f)]));return _0x5221ab;}function a39_0x66f7(){const _0x5b9d4e=['push','1821610lUNYXL','call','.functionName','$.resources','prototype','map','1806VAsEcD','.actions.','forEach','21492PXsDCU','].target','hasOwnProperty','88rygQVy','string','8282784chHWHg','functionName','resources','actions','target','trim','1877139YwsoQZ','commands','bff.exec','isArray','284830ocdDBb','45624PfanCa','97178usqfqD','action','entries','fromEntries','error','kind','functionName\x20must\x20be\x20a\x20non-empty\x20string.','bff','30qWhova','648KutHDT','31GQsJfW','scriptName'];a39_0x66f7=function(){return _0x5b9d4e;};return a39_0x66f7();}function isObjectRecord(_0x4367cd){const _0x562b80=a39_0x46aa;return Boolean(_0x4367cd)&&typeof _0x4367cd==='object'&&!Array[_0x562b80(0xcf)](_0x4367cd);}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
const a40_0x257e54=a40_0x22ea;(function(_0x5c82d6,_0x1234c9){const _0x5da70d=a40_0x22ea,_0x7540ea=_0x5c82d6();while(!![]){try{const _0x11dc69=parseInt(_0x5da70d(0x187))/0x1*(-parseInt(_0x5da70d(0x1b3))/0x2)+parseInt(_0x5da70d(0x1cb))/0x3*(parseInt(_0x5da70d(0x1a4))/0x4)+parseInt(_0x5da70d(0x1bd))/0x5*(-parseInt(_0x5da70d(0x197))/0x6)+parseInt(_0x5da70d(0x1a5))/0x7+parseInt(_0x5da70d(0x19a))/0x8+-parseInt(_0x5da70d(0x1b1))/0x9*(parseInt(_0x5da70d(0x1bf))/0xa)+parseInt(_0x5da70d(0x1cd))/0xb*(parseInt(_0x5da70d(0x190))/0xc);if(_0x11dc69===_0x1234c9)break;else _0x7540ea['push'](_0x7540ea['shift']());}catch(_0x53b196){_0x7540ea['push'](_0x7540ea['shift']());}}}(a40_0xa7b4,0xc9e2d));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';function a40_0x22ea(_0x2e52d2,_0x26c549){_0x2e52d2=_0x2e52d2-0x187;const _0xa7b481=a40_0xa7b4();let _0x22ea88=_0xa7b481[_0x2e52d2];return _0x22ea88;}function a40_0xa7b4(){const _0x2f1d0f=['required','remove','Service\x20Tree\x20manifest\x20file\x20path','entries','WRITE','report','map','length','2628NNGSDD','2021362KLlUFj','warnings','hash','name','Import\x20a\x20Service\x20Tree\x20manifest\x20into\x20the\x20local\x20runtime\x20registry','errors','str','Imported\x20','commands','target','registryServiceCode','registryPath','27lWmbqM','list','148388OoTCxN','Export\x20a\x20local\x20Service\x20Tree\x20manifest\x20to\x20a\x20JSON\x20file','manifests','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','entry','serviceCount','Local\x20service\x20not\x20found:\x20','service','replaced','Imported','5ptQgcF','file','5224250dAGUUo','flags','normalizedManifest','validate','type','reduce','\x20service(s),\x20updated\x20','source','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','kind','serviceCode','lower\x20kebab-case\x20service\x20code','7482NzOodb','read','1474opDrZS','filePath','Service\x20manifest\x20validation\x20passed.','description','20dZvBav','\x20service(s).','write','export','version','detail','registryIndex','Exported\x20service\x20','Updated','92160wvoirL','string','imported','updated','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','manifest','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','627528HKGcMA','risk','cliName','8209792UeJwgs','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest'];a40_0xa7b4=function(){return _0x2f1d0f;};return a40_0xa7b4();}const FILE_FLAG={'name':'file','type':a40_0x257e54(0x191),'required':!![],'description':a40_0x257e54(0x19e)},SERVICE_FLAG={'name':a40_0x257e54(0x1ba),'type':'string','required':!![],'description':'Local\x20service\x20code,\x20for\x20example\x20crm','pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a40_0x257e54(0x1ca)}};function summarizeService(_0x477dfd){const _0x18e128=a40_0x257e54;return{'serviceCode':_0x477dfd['serviceCode'],'name':_0x477dfd[_0x18e128(0x1c1)]['service'][_0x18e128(0x1a8)],'version':_0x477dfd[_0x18e128(0x18b)],'importedAt':_0x477dfd['importedAt'],'source':_0x477dfd[_0x18e128(0x1c6)],'commandCount':_0x477dfd[_0x18e128(0x1c1)]['commands'][_0x18e128(0x1a3)],'commands':_0x477dfd[_0x18e128(0x1c1)][_0x18e128(0x1ad)][_0x18e128(0x1a2)](_0x2b1f96=>({'path':_0x2b1f96['cliPath'],'description':_0x2b1f96[_0x18e128(0x1d0)],'risk':_0x2b1f96[_0x18e128(0x198)],'target':toPublicServiceTreeTarget(_0x2b1f96[_0x18e128(0x1ae)]),'flags':_0x2b1f96[_0x18e128(0x1c0)][_0x18e128(0x1a2)](_0x4d6f96=>({'name':_0x4d6f96[_0x18e128(0x1a8)],'cliName':_0x4d6f96[_0x18e128(0x199)],'type':_0x4d6f96[_0x18e128(0x1c3)],'required':_0x4d6f96[_0x18e128(0x19c)]===!![]}))}))};}function summarizeLoadedManifest(_0x18cde4){const _0x71249d=a40_0x257e54;return{'service':_0x18cde4['normalizedManifest']?.[_0x71249d(0x1ba)],'version':_0x18cde4[_0x71249d(0x1c1)]?.['version'],'commandCount':_0x18cde4[_0x71249d(0x1c1)]?.[_0x71249d(0x1ad)]['length']??0x0,'commands':_0x18cde4['normalizedManifest']?.['commands'][_0x71249d(0x1a2)](_0x5b1f5e=>({'path':_0x5b1f5e['cliPath'],'risk':_0x5b1f5e[_0x71249d(0x198)],'target':toPublicServiceTreeTarget(_0x5b1f5e[_0x71249d(0x1ae)])}))??[],'registryIndex':_0x18cde4[_0x71249d(0x18d)],'registryServiceCode':_0x18cde4[_0x71249d(0x1af)],'errors':_0x18cde4[_0x71249d(0x1a1)]['errors'],'warnings':_0x18cde4['report'][_0x71249d(0x1a6)]};}export const serviceDefinitions=[{'service':'service','command':a40_0x257e54(0x1c2),'description':a40_0x257e54(0x19b),'risk':a40_0x257e54(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x2fe474){const _0xc282bc=a40_0x257e54,_0x4d3fcc=loadServiceManifestFromFile(_0x2fe474[_0xc282bc(0x1ab)](_0xc282bc(0x1be)));if(!_0x4d3fcc['report']['ok'])return{'ok':![],'data':{'file':_0x4d3fcc[_0xc282bc(0x1ce)],'hash':_0x4d3fcc[_0xc282bc(0x1a7)],'kind':_0x4d3fcc[_0xc282bc(0x1c8)],'serviceCount':_0x4d3fcc[_0xc282bc(0x1b5)][_0xc282bc(0x1a3)],'services':_0x4d3fcc[_0xc282bc(0x1b5)][_0xc282bc(0x1a2)](summarizeLoadedManifest),'errors':_0x4d3fcc[_0xc282bc(0x1a1)]['errors'],'warnings':_0x4d3fcc[_0xc282bc(0x1a1)][_0xc282bc(0x1a6)]},'message':formatValidationFailure(_0x4d3fcc[_0xc282bc(0x1a1)])};if(_0x4d3fcc[_0xc282bc(0x1c8)]==='registry'||_0x4d3fcc['manifests'][_0xc282bc(0x1a3)]!==0x1)return{'ok':!![],'data':{'file':_0x4d3fcc[_0xc282bc(0x1ce)],'hash':_0x4d3fcc[_0xc282bc(0x1a7)],'kind':_0x4d3fcc[_0xc282bc(0x1c8)],'serviceCount':_0x4d3fcc['manifests'][_0xc282bc(0x1a3)],'commandCount':_0x4d3fcc['manifests'][_0xc282bc(0x1c4)]((_0x1be7e0,_0x5bb72a)=>_0x1be7e0+(_0x5bb72a['normalizedManifest']?.['commands'][_0xc282bc(0x1a3)]??0x0),0x0),'services':_0x4d3fcc['manifests'][_0xc282bc(0x1a2)](summarizeLoadedManifest),'warnings':_0x4d3fcc[_0xc282bc(0x1a1)][_0xc282bc(0x1a6)]},'message':'Service\x20registry\x20validation\x20passed.'};return{'ok':!![],'data':{'file':_0x4d3fcc[_0xc282bc(0x1ce)],'hash':_0x4d3fcc[_0xc282bc(0x1a7)],'kind':_0x4d3fcc[_0xc282bc(0x1c8)],'service':_0x4d3fcc['normalizedManifest']?.[_0xc282bc(0x1ba)],'version':_0x4d3fcc[_0xc282bc(0x1c1)]?.['version'],'commandCount':_0x4d3fcc[_0xc282bc(0x1c1)]?.[_0xc282bc(0x1ad)][_0xc282bc(0x1a3)]??0x0,'commands':_0x4d3fcc['normalizedManifest']?.[_0xc282bc(0x1ad)]['map'](_0x32f2f7=>({'path':_0x32f2f7['cliPath'],'risk':_0x32f2f7[_0xc282bc(0x198)],'target':toPublicServiceTreeTarget(_0x32f2f7['target'])})),'warnings':_0x4d3fcc[_0xc282bc(0x1a1)][_0xc282bc(0x1a6)]},'message':_0xc282bc(0x1cf)};}},{'service':a40_0x257e54(0x1ba),'command':'import','description':a40_0x257e54(0x1a9),'risk':a40_0x257e54(0x189),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x2dd9e7){const _0x1e51b1=a40_0x257e54,_0x4ef148=loadServiceManifestFromFile(_0x2dd9e7['str'](_0x1e51b1(0x1be)));return{'method':_0x1e51b1(0x1a0),'url':getServiceRegistryPath(),'body':{'file':_0x4ef148[_0x1e51b1(0x1ce)],'hash':_0x4ef148[_0x1e51b1(0x1a7)],'kind':_0x4ef148[_0x1e51b1(0x1c8)],'ok':_0x4ef148['report']['ok'],'service':_0x4ef148[_0x1e51b1(0x1c1)]?.[_0x1e51b1(0x1ba)],'version':_0x4ef148['normalizedManifest']?.['version'],'serviceCount':_0x4ef148[_0x1e51b1(0x1b5)]['length'],'services':_0x4ef148['manifests'][_0x1e51b1(0x1a2)](_0x5e9699=>({'service':_0x5e9699[_0x1e51b1(0x1c1)]?.['service'],'version':_0x5e9699[_0x1e51b1(0x1c1)]?.[_0x1e51b1(0x18b)],'commandCount':_0x5e9699[_0x1e51b1(0x1c1)]?.['commands']['length']??0x0,'errors':_0x5e9699[_0x1e51b1(0x1a1)][_0x1e51b1(0x1aa)]})),'errors':_0x4ef148[_0x1e51b1(0x1a1)][_0x1e51b1(0x1aa)],'commandCount':_0x4ef148[_0x1e51b1(0x1c1)]?.[_0x1e51b1(0x1ad)]['length']??0x0},'description':_0x1e51b1(0x196)};},async 'execute'(_0x6a459){const _0x547695=a40_0x257e54,_0x511557=importServiceManifest(_0x6a459[_0x547695(0x1ab)]('file'));if(_0x511557[_0x547695(0x19f)][_0x547695(0x1a3)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x511557[_0x547695(0x1b0)],'imported':_0x511557[_0x547695(0x192)],'updated':_0x511557[_0x547695(0x193)],'serviceCount':_0x511557[_0x547695(0x1b8)],'services':_0x511557[_0x547695(0x19f)][_0x547695(0x1a2)](summarizeService)},'message':_0x547695(0x1ac)+_0x511557[_0x547695(0x192)]+_0x547695(0x1c5)+_0x511557[_0x547695(0x193)]+_0x547695(0x188)};return{'ok':!![],'data':{'registryPath':_0x511557[_0x547695(0x1b0)],'replaced':_0x511557[_0x547695(0x1bb)],'imported':_0x511557[_0x547695(0x192)],'updated':_0x511557[_0x547695(0x193)],'serviceCount':_0x511557[_0x547695(0x1b8)],'service':summarizeService(_0x511557[_0x547695(0x1b7)])},'message':(_0x511557['replaced']?_0x547695(0x18f):_0x547695(0x1bc))+'\x20service\x20'+_0x511557[_0x547695(0x1b7)][_0x547695(0x1c9)]+'.'};}},{'service':'service','command':a40_0x257e54(0x18a),'description':a40_0x257e54(0x1b4),'risk':a40_0x257e54(0x189),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x387731){const _0x3be064=a40_0x257e54,_0x1a3e0d=getLocalServiceEntry(_0x387731[_0x3be064(0x1ab)](_0x3be064(0x1ba)));return{'method':_0x3be064(0x1a0),'url':_0x387731[_0x3be064(0x1ab)](_0x3be064(0x1be)),'body':{'service':_0x387731[_0x3be064(0x1ab)](_0x3be064(0x1ba)),'found':Boolean(_0x1a3e0d),'version':_0x1a3e0d?.[_0x3be064(0x18b)],'source':_0x1a3e0d?.[_0x3be064(0x1c6)]},'description':'Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x166050){const _0x8d0967=a40_0x257e54,_0x55e951=exportServiceManifest(_0x166050['str'](_0x8d0967(0x1ba)),_0x166050[_0x8d0967(0x1ab)]('file'));return{'ok':!![],'data':{'registryPath':_0x55e951[_0x8d0967(0x1b0)],'file':_0x55e951[_0x8d0967(0x1ce)],'service':summarizeService(_0x55e951[_0x8d0967(0x1b7)])},'message':_0x8d0967(0x18e)+_0x55e951['entry'][_0x8d0967(0x1c9)]+'.'};}},{'service':a40_0x257e54(0x1ba),'command':a40_0x257e54(0x1b2),'description':a40_0x257e54(0x194),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x594ac1=a40_0x257e54,_0xe33d04=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0xe33d04[_0x594ac1(0x1a3)],'services':_0xe33d04[_0x594ac1(0x1a2)](summarizeService)}};}},{'service':'service','command':a40_0x257e54(0x19d),'description':'Remove\x20a\x20local\x20Service\x20Tree\x20manifest\x20from\x20the\x20runtime\x20registry','risk':a40_0x257e54(0x189),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0xd37a4){const _0x5e61e7=a40_0x257e54,_0x2e1e25=getLocalServiceEntry(_0xd37a4[_0x5e61e7(0x1ab)]('service'));return{'method':'WRITE','url':getServiceRegistryPath(),'body':{'service':_0xd37a4[_0x5e61e7(0x1ab)](_0x5e61e7(0x1ba)),'found':Boolean(_0x2e1e25),'version':_0x2e1e25?.[_0x5e61e7(0x18b)],'source':_0x2e1e25?.['source']},'description':_0x5e61e7(0x1c7)};},async 'execute'(_0x246347){const _0x18c6e0=a40_0x257e54,_0x3d4645=removeServiceManifest(_0x246347['str']('service'));return{'ok':!![],'data':{'registryPath':_0x3d4645[_0x18c6e0(0x1b0)],'serviceCount':_0x3d4645[_0x18c6e0(0x1b8)],'service':summarizeService(_0x3d4645['entry'])},'message':'Removed\x20service\x20'+_0x3d4645[_0x18c6e0(0x1b7)][_0x18c6e0(0x1c9)]+'.'};}},{'service':'service','command':a40_0x257e54(0x18c),'description':a40_0x257e54(0x1b6),'risk':a40_0x257e54(0x1cc),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x2983b8){const _0x13f38c=a40_0x257e54,_0x28ceda=getLocalServiceEntry(_0x2983b8[_0x13f38c(0x1ab)](_0x13f38c(0x1ba)));if(!_0x28ceda)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x2983b8[_0x13f38c(0x1ab)]('service')},'message':_0x13f38c(0x1b9)+_0x2983b8[_0x13f38c(0x1ab)](_0x13f38c(0x1ba))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x28ceda),'manifest':_0x28ceda[_0x13f38c(0x195)],'normalizedManifest':toPublicNormalizedServiceTree(_0x28ceda[_0x13f38c(0x1c1)])}};}}];
|
|
@@ -1 +1 @@
|
|
|
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
|
+
(function(_0x2f6a97,_0x2f0396){const _0x2a591c=a41_0x3f56,_0x713f83=_0x2f6a97();while(!![]){try{const _0x55d9e7=parseInt(_0x2a591c(0xf3))/0x1*(parseInt(_0x2a591c(0x127))/0x2)+-parseInt(_0x2a591c(0x135))/0x3+-parseInt(_0x2a591c(0x131))/0x4*(-parseInt(_0x2a591c(0x138))/0x5)+-parseInt(_0x2a591c(0x12b))/0x6+-parseInt(_0x2a591c(0x10a))/0x7*(parseInt(_0x2a591c(0x11d))/0x8)+-parseInt(_0x2a591c(0xf5))/0x9+-parseInt(_0x2a591c(0xfc))/0xa*(-parseInt(_0x2a591c(0x119))/0xb);if(_0x55d9e7===_0x2f0396)break;else _0x713f83['push'](_0x713f83['shift']());}catch(_0x1e88cc){_0x713f83['push'](_0x713f83['shift']());}}}(a41_0x17f8,0x9c0d7));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x39092c={}){const _0x259484=a41_0x3f56;return resolve(_0x39092c[_0x259484(0xfe)]??homedir(),PRODUCT_CONFIG[_0x259484(0x11e)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3af88d={}){const _0x222656=a41_0x3f56,_0x274ebe=getServiceRegistryPath(_0x3af88d);if(!existsSync(_0x274ebe))return emptyServiceRegistry();try{const _0x1ef9da=readFileSync(_0x274ebe,_0x222656(0x10c));if(!_0x1ef9da[_0x222656(0xfd)]())return emptyServiceRegistry();const _0xa4a612=JSON[_0x222656(0x104)](_0x1ef9da);if(_0xa4a612[_0x222656(0x11a)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x222656(0x112)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0xa4a612[_0x222656(0x11a)]),_0x222656(0x144)+_0x274ebe+'.');if(!Array[_0x222656(0x128)](_0xa4a612[_0x222656(0x13d)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xa4a612[_0x222656(0x113)],'services':_0xa4a612[_0x222656(0x13d)]};}catch(_0x2a00b1){if(_0x2a00b1 instanceof Error&&_0x2a00b1[_0x222656(0x134)]===_0x222656(0x132))throw _0x2a00b1;throw CliErrors['validation'](_0x222656(0x100)+_0x274ebe,_0x222656(0x10f));}}export function writeServiceRegistry(_0x43a10b,_0x222812={}){const _0x5bbd25=a41_0x3f56,_0x5a7423=getServiceRegistryPath(_0x222812),_0x57fdaa=dirname(_0x5a7423);!existsSync(_0x57fdaa)&&mkdirSync(_0x57fdaa,{'recursive':!![]});const _0x5c799d=_0x5a7423+'.tmp';try{writeFileSync(_0x5c799d,JSON[_0x5bbd25(0x109)](_0x43a10b,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x5c799d,_0x5a7423);}catch(_0x15a5d5){try{unlinkSync(_0x5c799d);}catch{}if(_0x15a5d5?.[_0x5bbd25(0x125)]===_0x5bbd25(0x10b))throw CliErrors[_0x5bbd25(0x112)](_0x5bbd25(0x130)+_0x5a7423);throw _0x15a5d5;}return _0x5a7423;}export function loadServiceManifestFromFile(_0x2be9dc){const _0x3aa0a8=a41_0x3f56,_0x41646d=resolve(_0x2be9dc);if(!existsSync(_0x41646d))throw CliErrors['validation']('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x2be9dc);let _0x5051e1;const _0x575b3d=readFileSync(_0x41646d,_0x3aa0a8(0x10c));try{_0x5051e1=JSON['parse'](_0x575b3d);}catch{throw CliErrors[_0x3aa0a8(0x112)](_0x3aa0a8(0x13e)+_0x2be9dc,_0x3aa0a8(0xf0));}const _0xe1b3e0=sha256(_0x575b3d),_0x42b33c=extractLoadedServiceManifests(_0x5051e1,_0xe1b3e0),_0x2fd8c2=aggregateValidationReports(_0x42b33c),_0x7c2853=_0x42b33c[0x0];return{'filePath':_0x41646d,'hash':_0xe1b3e0,'kind':isServiceRegistryLike(_0x5051e1)?_0x3aa0a8(0x116):'manifest','manifest':_0x7c2853?.['manifest']??_0x5051e1,'report':_0x2fd8c2,'normalizedManifest':_0x42b33c[_0x3aa0a8(0x118)]===0x1?_0x7c2853?.[_0x3aa0a8(0xf4)]:undefined,'manifests':_0x42b33c};}export function importServiceManifest(_0x32e479,_0x53a9f6={}){const _0x281e44=a41_0x3f56,_0xc9bab5=loadServiceManifestFromFile(_0x32e479);if(!_0xc9bab5[_0x281e44(0x137)]['ok'])throw CliErrors[_0x281e44(0x112)](formatValidationFailure(_0xc9bab5[_0x281e44(0x137)]),_0x281e44(0x121));if(_0xc9bab5[_0x281e44(0xee)][_0x281e44(0x118)]===0x0)throw CliErrors['validation'](_0x281e44(0x103),_0x281e44(0xf9));const _0x2bc6e2=readServiceRegistry(_0x53a9f6),_0x54a92d=(_0x53a9f6['now']??(()=>new Date()))()[_0x281e44(0xef)](),_0x4874af=[];let _0x527602=0x0,_0x4eefc2=0x0;for(const _0x3c9b1a of _0xc9bab5[_0x281e44(0xee)]){if(!_0x3c9b1a[_0x281e44(0xf4)])continue;const _0x3832f4=_0x3c9b1a[_0x281e44(0xf4)][_0x281e44(0xff)][_0x281e44(0x125)],_0x36c91d={'serviceCode':_0x3832f4,'version':_0x3c9b1a['normalizedManifest']['version'],'importedAt':_0x54a92d,'source':{'type':_0x281e44(0x13a),'path':_0xc9bab5[_0x281e44(0xfb)],'hash':_0x3c9b1a[_0x281e44(0x143)]},'manifest':_0x3c9b1a[_0x281e44(0x120)],'normalizedManifest':_0x3c9b1a[_0x281e44(0xf4)]},_0x34ccae=_0x2bc6e2['services'][_0x281e44(0x13b)](_0x22c419=>_0x22c419['serviceCode']===_0x3832f4);_0x34ccae>=0x0?(_0x2bc6e2[_0x281e44(0x13d)][_0x34ccae]=_0x36c91d,_0x4eefc2++):(_0x2bc6e2[_0x281e44(0x13d)]['push'](_0x36c91d),_0x527602++),_0x4874af[_0x281e44(0x11b)](_0x36c91d);}_0x2bc6e2[_0x281e44(0x13d)][_0x281e44(0x139)]((_0x2f94ab,_0xc8ea67)=>_0x2f94ab['serviceCode'][_0x281e44(0x110)](_0xc8ea67[_0x281e44(0x122)])),_0x2bc6e2[_0x281e44(0x113)]=_0x54a92d;const _0x543ae5=writeServiceRegistry(_0x2bc6e2,_0x53a9f6);return{'registryPath':_0x543ae5,'entry':_0x4874af[0x0],'replaced':_0x4874af[_0x281e44(0x118)]===0x1?_0x4eefc2===0x1:_0x4eefc2>0x0,'entries':_0x4874af,'imported':_0x527602,'updated':_0x4eefc2,'serviceCount':_0x2bc6e2[_0x281e44(0x13d)][_0x281e44(0x118)]};}export function exportServiceManifest(_0x2afc5b,_0x177349,_0x5eb2e3={}){const _0x53a700=a41_0x3f56,_0x49c273=getServiceRegistryPath(_0x5eb2e3),_0x33732d=getLocalServiceEntry(_0x2afc5b,_0x5eb2e3);if(!_0x33732d)throw CliErrors[_0x53a700(0x112)]('Local\x20service\x20not\x20found:\x20'+_0x2afc5b,_0x53a700(0x136));const _0x3508af=resolve(_0x177349),_0x453adc=dirname(_0x3508af);return!existsSync(_0x453adc)&&mkdirSync(_0x453adc,{'recursive':!![]}),writeFileSync(_0x3508af,JSON['stringify'](_0x33732d[_0x53a700(0x120)],null,0x2)+'\x0a',{'encoding':_0x53a700(0x10c),'mode':0x180}),{'registryPath':_0x49c273,'filePath':_0x3508af,'entry':_0x33732d};}export function removeServiceManifest(_0x577176,_0x18c50a={}){const _0x2a5540=a41_0x3f56,_0x35de59=readServiceRegistry(_0x18c50a),_0x3853c4=_0x577176[_0x2a5540(0xfd)](),_0x3d270a=_0x35de59['services'][_0x2a5540(0x13b)](_0x5907b7=>_0x5907b7[_0x2a5540(0x122)]===_0x3853c4);if(_0x3d270a<0x0)throw CliErrors[_0x2a5540(0x112)]('Local\x20service\x20not\x20found:\x20'+_0x3853c4,_0x2a5540(0x136));const [_0xec3968]=_0x35de59[_0x2a5540(0x13d)][_0x2a5540(0x11c)](_0x3d270a,0x1),_0x5d5b40=(_0x18c50a[_0x2a5540(0x12d)]??(()=>new Date()))()[_0x2a5540(0xef)]();_0x35de59[_0x2a5540(0x113)]=_0x5d5b40;const _0x1bb00f=writeServiceRegistry(_0x35de59,_0x18c50a);return{'registryPath':_0x1bb00f,'entry':_0xec3968,'serviceCount':_0x35de59['services'][_0x2a5540(0x118)]};}export function listLocalServices(_0x11a918={}){return readServiceRegistry(_0x11a918)['services'];}export function getLocalServiceEntry(_0x277958,_0x57f33f={}){const _0xef0f16=a41_0x3f56;return readServiceRegistry(_0x57f33f)[_0xef0f16(0x13d)][_0xef0f16(0x102)](_0x1ad526=>_0x1ad526['serviceCode']===_0x277958[_0xef0f16(0xfd)]());}export function listLocalServiceTrees(_0x153e2c={}){const _0x54c9ed=a41_0x3f56;return readServiceRegistry(_0x153e2c)['services'][_0x54c9ed(0xf1)](_0x33ec14=>_0x33ec14['normalizedManifest']);}function a41_0x3f56(_0x10cbc5,_0x5a83d6){_0x10cbc5=_0x10cbc5-0xee;const _0x17f891=a41_0x17f8();let _0x3f5675=_0x17f891[_0x10cbc5];return _0x3f5675;}function a41_0x17f8(){const _0x63309b=['].manifest','reduce','Cannot\x20write\x20service\x20registry:\x20','148aSEhKv','CliError','message','name','3082230duHvKl','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','report','73265GxmVue','sort','file','findIndex','$.services[','services','Invalid\x20service\x20manifest\x20JSON:\x20','importedAt','string','path','bff\x20target\x20requires\x20functionName.','sourceHash','Remove\x20or\x20migrate\x20','manifests','toISOString','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','map','missing','64496PSUEKL','normalizedManifest','8777862WACfKn','sha256','warnings','source','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','services\x20must\x20be\x20an\x20array','filePath','110010xxgBLG','trim','homeDir','service','Invalid\x20service\x20registry\x20JSON:\x20','kind','find','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','parse','commands','startsWith','command','digest','stringify','10213gBkPhs','ENOENT','utf8','registryIndex','Unsupported\x20schemaVersion:\x20','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','localeCompare','risk','validation','updatedAt','Service\x20manifest\x20validation\x20failed:\x0a','target','registry','errors','length','2519URythq','schemaVersion','push','splice','5232SbvSAT','homeDirName','join','manifest','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','serviceCode','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','].manifest.','code','description','28pdMtLH','isArray','invalid','hex','2209374poIGzl','slice','now'];a41_0x17f8=function(){return _0x63309b;};return a41_0x17f8();}export function inspectServiceRegistry(_0x1bab46={}){const _0x4a2152=a41_0x3f56,_0x44e817=getServiceRegistryPath(_0x1bab46);if(!existsSync(_0x44e817))return emptyServiceRegistryInspection(_0x44e817,_0x4a2152(0xf2),![]);try{const _0x161261=readFileSync(_0x44e817,_0x4a2152(0x10c));if(!_0x161261[_0x4a2152(0xfd)]())return emptyServiceRegistryInspection(_0x44e817,'empty',!![]);const _0x5e5fe9=JSON[_0x4a2152(0x104)](_0x161261);if(_0x5e5fe9[_0x4a2152(0x11a)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x44e817,'invalid',!![]),'schemaVersion':_0x5e5fe9[_0x4a2152(0x11a)],'message':_0x4a2152(0x10e)+String(_0x5e5fe9[_0x4a2152(0x11a)])};if(!Array[_0x4a2152(0x128)](_0x5e5fe9[_0x4a2152(0x13d)]))return{...emptyServiceRegistryInspection(_0x44e817,_0x4a2152(0x129),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5e5fe9[_0x4a2152(0x113)],'message':_0x4a2152(0xfa)};const _0x50df05=_0x5e5fe9[_0x4a2152(0x13d)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x44e817,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5e5fe9[_0x4a2152(0x113)],'serviceCount':_0x50df05[_0x4a2152(0x118)],'commandCount':_0x50df05[_0x4a2152(0x12f)]((_0x20e052,_0xbb2a8f)=>_0x20e052+_0xbb2a8f['commandCount'],0x0),'services':_0x50df05};}catch(_0xf8ac00){return{...emptyServiceRegistryInspection(_0x44e817,'invalid',!![]),'message':_0xf8ac00 instanceof Error?_0xf8ac00[_0x4a2152(0x133)]:String(_0xf8ac00)};}}export function formatValidationFailure(_0x471b5e){const _0x2921f3=a41_0x3f56,_0x3cde15=_0x471b5e[_0x2921f3(0x117)][_0x2921f3(0xf1)](_0x4802a3=>_0x4802a3[_0x2921f3(0x141)]+':\x20'+_0x4802a3[_0x2921f3(0x133)]);return _0x2921f3(0x114)+_0x3cde15[_0x2921f3(0x11f)]('\x0a');}function extractLoadedServiceManifests(_0x35a91f,_0x5582e1){const _0x41cf62=a41_0x3f56;if(!isServiceRegistryLike(_0x35a91f)){const _0x5165e8=_0x35a91f,{manifest:_0x2f114b,errors:_0x5a9127}=adaptServiceTreeManifestForLegacyFramework(_0x5165e8),_0x94ed0c=validateServiceTreeManifest(_0x2f114b),_0x403e1f=mergeValidationErrors(_0x94ed0c,_0x5a9127);return[{'manifest':_0x5165e8,'report':_0x403e1f,'normalizedManifest':_0x403e1f['ok']?normalizeServiceTreeManifest(_0x2f114b):undefined,'sourceHash':_0x5582e1}];}return _0x35a91f[_0x41cf62(0x13d)][_0x41cf62(0xf1)]((_0x1bf835,_0x4d2d82)=>{const _0x481d5c=_0x41cf62,_0x8e2a8=isObjectRecord(_0x1bf835)?_0x1bf835[_0x481d5c(0x120)]:undefined,{manifest:_0x151012,errors:_0xd1a1d0}=adaptServiceTreeManifestForLegacyFramework(_0x8e2a8),_0x3dc192=validateServiceTreeManifest(_0x151012),_0x538d52=mergeValidationErrors(_0x3dc192,_0xd1a1d0),_0xba6bc3=isObjectRecord(_0x1bf835)&&typeof _0x1bf835[_0x481d5c(0x122)]===_0x481d5c(0x140)?_0x1bf835['serviceCode']:undefined;return{'manifest':_0x8e2a8,'report':_0x538d52,'normalizedManifest':_0x538d52['ok']?normalizeServiceTreeManifest(_0x151012):undefined,'sourceHash':sha256(JSON[_0x481d5c(0x109)](_0x8e2a8,null,0x2)+'\x0a'),'registryIndex':_0x4d2d82,'registryServiceCode':_0xba6bc3};});}function mergeValidationErrors(_0x3661c4,_0x2ff411){const _0x537089=a41_0x3f56,_0x4dd0d5=_0x3661c4[_0x537089(0x117)][_0x537089(0xf1)](_0x4a49f4=>_0x4a49f4['message']===_0x537089(0x123)?{..._0x4a49f4,'message':_0x537089(0x142)}:_0x4a49f4),_0x1e46e3=[..._0x2ff411,..._0x4dd0d5];return{'ok':_0x1e46e3[_0x537089(0x118)]===0x0,'errors':_0x1e46e3,'warnings':_0x3661c4[_0x537089(0xf7)]};}function aggregateValidationReports(_0x169def){const _0x1ab082=a41_0x3f56,_0x5afa23=_0x169def['flatMap'](_0x556214=>_0x556214[_0x1ab082(0x10d)]===undefined?_0x556214[_0x1ab082(0x137)]['errors']:_0x556214[_0x1ab082(0x137)][_0x1ab082(0x117)]['map'](_0x1e4d14=>({..._0x1e4d14,'path':prefixRegistryIssuePath(_0x556214[_0x1ab082(0x10d)],_0x1e4d14[_0x1ab082(0x141)])}))),_0xeaa2e2=_0x169def['flatMap'](_0x5084b3=>_0x5084b3['registryIndex']===undefined?_0x5084b3['report']['warnings']:_0x5084b3[_0x1ab082(0x137)][_0x1ab082(0xf7)][_0x1ab082(0xf1)](_0x149b5e=>({..._0x149b5e,'path':prefixRegistryIssuePath(_0x5084b3['registryIndex'],_0x149b5e[_0x1ab082(0x141)])})));return{'ok':_0x5afa23[_0x1ab082(0x118)]===0x0,'errors':_0x5afa23,'warnings':_0xeaa2e2};}function prefixRegistryIssuePath(_0x506634,_0x2b9f90){const _0x38b439=a41_0x3f56;if(_0x2b9f90==='$')return _0x38b439(0x13c)+_0x506634+_0x38b439(0x12e);if(_0x2b9f90[_0x38b439(0x106)]('$.'))return _0x38b439(0x13c)+_0x506634+_0x38b439(0x12e)+_0x2b9f90[_0x38b439(0x12c)](0x1);if(_0x2b9f90[_0x38b439(0x106)]('$['))return _0x38b439(0x13c)+_0x506634+_0x38b439(0x12e)+_0x2b9f90[_0x38b439(0x12c)](0x1);return _0x38b439(0x13c)+_0x506634+_0x38b439(0x124)+_0x2b9f90;}function isServiceRegistryLike(_0x43eac2){const _0x590d30=a41_0x3f56;return isObjectRecord(_0x43eac2)&&_0x43eac2[_0x590d30(0x11a)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x590d30(0x128)](_0x43eac2[_0x590d30(0x13d)]);}function isObjectRecord(_0x2dc63b){const _0xfd5a6d=a41_0x3f56;return Boolean(_0x2dc63b)&&typeof _0x2dc63b==='object'&&!Array[_0xfd5a6d(0x128)](_0x2dc63b);}function emptyServiceRegistryInspection(_0x13b73f,_0x2f4016,_0x476af1){return{'registryPath':_0x13b73f,'exists':_0x476af1,'status':_0x2f4016,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x24db5d){const _0x270f0a=a41_0x3f56,_0x2077aa=_0x24db5d[_0x270f0a(0xf4)],_0x8a64f3=_0x2077aa[_0x270f0a(0x105)][_0x270f0a(0xf1)](_0x1bbe99=>({'path':_0x1bbe99['cliPath'],'description':_0x1bbe99['description'],'risk':_0x1bbe99[_0x270f0a(0x111)],'targetKind':_0x1bbe99[_0x270f0a(0x115)][_0x270f0a(0x101)],'targetCommand':_0x1bbe99[_0x270f0a(0x115)][_0x270f0a(0x107)]}));return{'serviceCode':_0x24db5d[_0x270f0a(0x122)],'name':_0x2077aa[_0x270f0a(0xff)]['name'],'description':_0x2077aa[_0x270f0a(0xff)][_0x270f0a(0x126)],'version':_0x24db5d['version'],'importedAt':_0x24db5d[_0x270f0a(0x13f)],'source':_0x24db5d[_0x270f0a(0xf8)],'commandCount':_0x8a64f3[_0x270f0a(0x118)],'commands':_0x8a64f3};}function sha256(_0x5830e3){const _0x3ee3a5=a41_0x3f56;return createHash(_0x3ee3a5(0xf6))['update'](_0x5830e3)[_0x3ee3a5(0x108)](_0x3ee3a5(0x12a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a42_0x199a(_0x27a3d8,_0x2a37e0){_0x27a3d8=_0x27a3d8-0x156;const _0x1396ee=a42_0x1396();let _0x199a6c=_0x1396ee[_0x27a3d8];return _0x199a6c;}const a42_0x1fa231=a42_0x199a;(function(_0x901469,_0x50ce4a){const _0x44b051=a42_0x199a,_0x360fca=_0x901469();while(!![]){try{const _0x25224b=parseInt(_0x44b051(0x160))/0x1+-parseInt(_0x44b051(0x172))/0x2+parseInt(_0x44b051(0x163))/0x3+parseInt(_0x44b051(0x15f))/0x4+parseInt(_0x44b051(0x168))/0x5*(-parseInt(_0x44b051(0x175))/0x6)+-parseInt(_0x44b051(0x16d))/0x7*(parseInt(_0x44b051(0x15a))/0x8)+parseInt(_0x44b051(0x15b))/0x9;if(_0x25224b===_0x50ce4a)break;else _0x360fca['push'](_0x360fca['shift']());}catch(_0x2c9eeb){_0x360fca['push'](_0x360fca['shift']());}}}(a42_0x1396,0xb1c5d));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';function a42_0x1396(){const _0x1549b3=['5173250PkOkQY','bool','skillName','Refusing\x20to\x20overwrite\x20symlink:\x20','isSymbolicLink','7PdCvzp','str','Skill\x20directory\x20already\x20exists:\x20','content','skill','261196jOSkSe','path','isDirectory','6CEfNko','Created\x20local\x20Skill\x20draft\x20','validation','utf8','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','create','WRITE','10256504aSpFRH','4364865QIEIix','rendered','target','type','4894056SFJkQv','964638jKSdJa','trim','skillDir','1506993BTgAjs','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','files','force','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft'];a42_0x1396=function(){return _0x1549b3;};return a42_0x1396();}import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':a42_0x1fa231(0x171),'command':a42_0x1fa231(0x158),'description':a42_0x1fa231(0x167),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x13abab){const _0xb4f8af=a42_0x1fa231,_0x557247=buildSkillCreatePlan(_0x13abab['str']('name'),_0x13abab[_0xb4f8af(0x16e)]('type'),_0x13abab[_0xb4f8af(0x16e)](_0xb4f8af(0x15d)));return{'method':_0xb4f8af(0x159),'url':_0x557247[_0xb4f8af(0x162)],'body':{'skillName':_0x557247['rendered'][_0xb4f8af(0x16a)],'type':_0x557247[_0xb4f8af(0x15c)][_0xb4f8af(0x15e)],'selfContained':!![],'files':_0x557247[_0xb4f8af(0x15c)]['files']['map'](_0x3d270a=>_0x3d270a[_0xb4f8af(0x173)])},'description':_0xb4f8af(0x157)};},async 'execute'(_0x5baa74){const _0x4b4bc8=a42_0x1fa231,_0x1edde3=buildSkillCreatePlan(_0x5baa74[_0x4b4bc8(0x16e)]('name'),_0x5baa74[_0x4b4bc8(0x16e)](_0x4b4bc8(0x15e)),_0x5baa74[_0x4b4bc8(0x16e)](_0x4b4bc8(0x15d)));return writeSkillDraft(_0x1edde3,_0x5baa74[_0x4b4bc8(0x169)](_0x4b4bc8(0x166))),{'ok':!![],'data':{'skillName':_0x1edde3[_0x4b4bc8(0x15c)]['skillName'],'type':_0x1edde3[_0x4b4bc8(0x15c)][_0x4b4bc8(0x15e)],'dir':_0x1edde3['skillDir'],'files':_0x1edde3[_0x4b4bc8(0x15c)][_0x4b4bc8(0x165)]['map'](_0x2e5667=>_0x2e5667[_0x4b4bc8(0x173)])},'message':_0x4b4bc8(0x176)+_0x1edde3[_0x4b4bc8(0x15c)]['skillName']};}};function buildSkillCreatePlan(_0x50f14a,_0x89475b,_0x71ae6c){const _0x442b73=renderSkillTemplate({'skillName':_0x50f14a,'type':_0x89475b}),_0x34ac51=resolve(normalizeSkillTarget(_0x71ae6c));return{'rendered':_0x442b73,'targetRoot':_0x34ac51,'skillDir':resolve(_0x34ac51,_0x442b73['skillName'])};}function normalizeSkillTarget(_0x548ae7){const _0x343d86=a42_0x1fa231;return(_0x548ae7||DEFAULT_SKILL_TARGET)[_0x343d86(0x161)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x1818fe,_0x2a8bfb){const _0x1f0467=a42_0x1fa231;if(existsSync(_0x1818fe[_0x1f0467(0x162)])){const _0x4585d2=lstatSync(_0x1818fe[_0x1f0467(0x162)]);if(!_0x4585d2[_0x1f0467(0x174)]()||_0x4585d2[_0x1f0467(0x16c)]())throw CliErrors[_0x1f0467(0x177)](_0x1f0467(0x164)+_0x1818fe[_0x1f0467(0x162)]);if(!_0x2a8bfb)throw CliErrors[_0x1f0467(0x177)](_0x1f0467(0x16f)+_0x1818fe[_0x1f0467(0x162)],'Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.');}for(const _0x5da1f0 of _0x1818fe[_0x1f0467(0x15c)][_0x1f0467(0x165)]){const _0x371253=resolve(_0x1818fe[_0x1f0467(0x162)],_0x5da1f0[_0x1f0467(0x173)]),_0x2c6133=dirname(_0x371253);mkdirSync(_0x2c6133,{'recursive':!![]});if(existsSync(_0x371253)&&lstatSync(_0x371253)[_0x1f0467(0x16c)]())throw CliErrors['validation'](_0x1f0467(0x16b)+_0x371253);writeFileSync(_0x371253,_0x5da1f0[_0x1f0467(0x170)],_0x1f0467(0x156));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a43_0x5afed9=a43_0x1320;(function(_0x1318c6,_0x42318f){const _0x58ef35=a43_0x1320,_0x50d084=_0x1318c6();while(!![]){try{const _0x46b57f=parseInt(_0x58ef35(0x175))/0x1+parseInt(_0x58ef35(0x183))/0x2*(-parseInt(_0x58ef35(0x174))/0x3)+-parseInt(_0x58ef35(0x16f))/0x4+parseInt(_0x58ef35(0x176))/0x5+-parseInt(_0x58ef35(0x173))/0x6+parseInt(_0x58ef35(0x187))/0x7+-parseInt(_0x58ef35(0x179))/0x8*(-parseInt(_0x58ef35(0x164))/0x9);if(_0x46b57f===_0x42318f)break;else _0x50d084['push'](_0x50d084['shift']());}catch(_0x4f5b55){_0x50d084['push'](_0x50d084['shift']());}}}(a43_0x4dd6,0x91fc7));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';function a43_0x4dd6(){const _0x17e4fd=['unchanged','../../../skills/runtime-skill-sync.js','str','Installed\x20','production','authRequired','82358QhzKCI','all','flatMap','filter','5316045LzNtKc','skillCode','../../../core/api-client.js','version','updated','company','333miAXgR','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','envName','length','push','includes','skill','personal','force','\x20personal\x20and\x20','write','2147156PBRXIy','removed','action','trim','586590Uurxta','87yXvMRm','634688fySNVg','746030RYPcoL','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','\x20company\x20Skill(s).','191000fPyCTS','map','appCode','skipped'];a43_0x4dd6=function(){return _0x17e4fd;};return a43_0x4dd6();}function a43_0x1320(_0x3dde68,_0x164831){_0x3dde68=_0x3dde68-0x161;const _0x4dd662=a43_0x4dd6();let _0x1320a6=_0x4dd662[_0x3dde68];return _0x1320a6;}export const installCommand={'service':a43_0x5afed9(0x16a),'command':'install','description':a43_0x5afed9(0x177),'risk':a43_0x5afed9(0x16e),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x2780e5){return syncRuntimeSkills(_0x2780e5);}};async function syncRuntimeSkills(_0x3ddf80){const _0x364b5e=a43_0x5afed9,{downloadRuntimeSkillPackage:_0x21867c,listRuntimeSkills:_0x11133a}=await import(_0x364b5e(0x189)),{linkEffectiveRuntimeSkills:_0x526647,materializeRuntimeSkill:_0x27a777,pruneStaleRuntimeSkillCache:_0x1366f7,pruneStaleRuntimeSkillLinks:_0x44bc52}=await import(_0x364b5e(0x17e)),_0x283ab8=_0x3ddf80[_0x364b5e(0x17f)]('code'),_0x5be2c4=normalizeSyncScopes(_0x3ddf80['str']('scope')),_0x2c6ded=_0x3ddf80[_0x364b5e(0x166)]??_0x364b5e(0x181),_0x1f806c=_0x3ddf80['accessKey'],_0x20712e=_0x3ddf80['bool'](_0x364b5e(0x16c));if(!_0x1f806c)throw CliErrors[_0x364b5e(0x182)](_0x364b5e(0x165));const _0x21a55a=await Promise[_0x364b5e(0x184)](_0x5be2c4[_0x364b5e(0x17a)](_0x258212=>_0x11133a({'appCode':_0x3ddf80['appCode'],'scope':_0x258212,'code':_0x283ab8[_0x364b5e(0x172)]()||undefined}))),_0x485acc=_0x5be2c4['includes'](_0x364b5e(0x16b))?_0x21a55a[_0x364b5e(0x185)]((_0x2bca4b,_0x20d35c)=>_0x5be2c4[_0x20d35c]===_0x364b5e(0x16b)?_0x2bca4b[_0x364b5e(0x16b)]:[]):[],_0x5c4a1e=_0x5be2c4['includes'](_0x364b5e(0x163))?_0x21a55a['flatMap']((_0x26a48f,_0x51bf3b)=>_0x5be2c4[_0x51bf3b]===_0x364b5e(0x163)?_0x26a48f[_0x364b5e(0x163)]:[]):[],_0x27992f=new Set([..._0x485acc['map'](_0x543ab2=>_0x543ab2[_0x364b5e(0x188)]?.[_0x364b5e(0x172)]())[_0x364b5e(0x186)](_0x16dbe8=>Boolean(_0x16dbe8)),..._0x5c4a1e[_0x364b5e(0x17a)](_0x3644c3=>_0x3644c3[_0x364b5e(0x188)]?.['trim']())[_0x364b5e(0x186)](_0x2a8825=>Boolean(_0x2a8825))]),_0x3ae934=_0x283ab8[_0x364b5e(0x172)]()?[_0x283ab8[_0x364b5e(0x172)]()]:undefined,_0x54e880=_0x5be2c4[_0x364b5e(0x167)]===0x2&&_0x5be2c4[_0x364b5e(0x169)](_0x364b5e(0x16b))&&_0x5be2c4['includes'](_0x364b5e(0x163)),_0x9b8609=_0x54e880?_0x44bc52(_0x3ddf80[_0x364b5e(0x17b)],_0x27992f,{},_0x3ae934):[],_0x5289a3=_0x1366f7({'env':_0x2c6ded,'accessKey':_0x1f806c,'appCode':_0x3ddf80[_0x364b5e(0x17b)],'activeSkillCodes':_0x27992f,'pruneSkillCodes':_0x3ae934,'scopes':_0x5be2c4}),_0x54e65d=[];for(const _0x5e6c90 of _0x485acc){_0x54e65d[_0x364b5e(0x168)](_0x27a777(_0x5e6c90,_0x364b5e(0x16b),{'env':_0x2c6ded,'accessKey':_0x1f806c,'appCode':_0x3ddf80[_0x364b5e(0x17b)],'force':_0x20712e,'packageBytes':await downloadSkillPackage(_0x5e6c90,_0x364b5e(0x16b),_0x3ddf80[_0x364b5e(0x17b)],_0x21867c)}));}for(const _0x9e9741 of _0x5c4a1e){_0x54e65d[_0x364b5e(0x168)](_0x27a777(_0x9e9741,_0x364b5e(0x163),{'env':_0x2c6ded,'accessKey':_0x1f806c,'appCode':_0x3ddf80['appCode'],'force':_0x20712e,'packageBytes':await downloadSkillPackage(_0x9e9741,_0x364b5e(0x163),_0x3ddf80[_0x364b5e(0x17b)],_0x21867c)}));}const _0x5534da=_0x526647(_0x54e65d,_0x3ddf80[_0x364b5e(0x17b)]),_0x3c3ddb=countLinkActions(_0x5534da);return{'ok':!![],'data':{'appCode':_0x3ddf80['appCode'],'personal':_0x485acc['length'],'company':_0x5c4a1e[_0x364b5e(0x167)],'materialized':_0x54e65d['length'],'links':{'total':_0x5534da[_0x364b5e(0x167)],'created':_0x3c3ddb['created']??0x0,'updated':_0x3c3ddb[_0x364b5e(0x162)]??0x0,'unchanged':_0x3c3ddb[_0x364b5e(0x17d)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x9b8609[_0x364b5e(0x186)](_0x38e0c3=>_0x38e0c3[_0x364b5e(0x171)]===_0x364b5e(0x170))['length'],'cacheDirs':_0x5289a3[_0x364b5e(0x186)](_0x2f0a6f=>_0x2f0a6f[_0x364b5e(0x171)]===_0x364b5e(0x170))[_0x364b5e(0x167)],'skipped':[..._0x9b8609,..._0x5289a3]['filter'](_0x3b3b9c=>_0x3b3b9c[_0x364b5e(0x171)]===_0x364b5e(0x17c))[_0x364b5e(0x167)]},'skills':{'personal':_0x485acc['map'](summarizeRuntimeSkill),'company':_0x5c4a1e[_0x364b5e(0x17a)](summarizeRuntimeSkill)}},'message':_0x364b5e(0x180)+_0x485acc['length']+_0x364b5e(0x16d)+_0x5c4a1e[_0x364b5e(0x167)]+_0x364b5e(0x178)};}async function downloadSkillPackage(_0x5daa86,_0x108e79,_0x29ebed,_0x5c0e92){const _0xf013d3=a43_0x5afed9,_0x2c7cf7=_0x5daa86[_0xf013d3(0x161)]?.[_0xf013d3(0x172)]();return _0x2c7cf7?_0x5c0e92(_0x108e79,_0x5daa86[_0xf013d3(0x188)],_0x29ebed,_0x2c7cf7):_0x5c0e92(_0x108e79,_0x5daa86['skillCode'],_0x29ebed);}function countLinkActions(_0x310163){return _0x310163['reduce']((_0x570e14,_0x2aaaba)=>{const _0x354f2d=a43_0x1320;return _0x570e14[_0x2aaaba[_0x354f2d(0x171)]]=(_0x570e14[_0x2aaaba['action']]??0x0)+0x1,_0x570e14;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a44_0x144a5c=a44_0x2a8f;function a44_0x2a8f(_0x52a8d1,_0x4ea618){_0x52a8d1=_0x52a8d1-0xa5;const _0x2b95eb=a44_0x2b95();let _0x2a8f00=_0x2b95eb[_0x52a8d1];return _0x2a8f00;}(function(_0x4c06c3,_0x5adf2e){const _0x5fcfb8=a44_0x2a8f,_0x417f70=_0x4c06c3();while(!![]){try{const _0x1af0f4=-parseInt(_0x5fcfb8(0xad))/0x1*(parseInt(_0x5fcfb8(0xa5))/0x2)+parseInt(_0x5fcfb8(0xbc))/0x3+parseInt(_0x5fcfb8(0xb8))/0x4+-parseInt(_0x5fcfb8(0xc5))/0x5+-parseInt(_0x5fcfb8(0xc1))/0x6*(parseInt(_0x5fcfb8(0xbd))/0x7)+-parseInt(_0x5fcfb8(0xbb))/0x8*(parseInt(_0x5fcfb8(0xa9))/0x9)+-parseInt(_0x5fcfb8(0xb3))/0xa*(-parseInt(_0x5fcfb8(0xc0))/0xb);if(_0x1af0f4===_0x5adf2e)break;else _0x417f70['push'](_0x417f70['shift']());}catch(_0x4d2ec8){_0x417f70['push'](_0x417f70['shift']());}}}(a44_0x2b95,0x95790));import{CliErrors}from'../../../errors.js';function a44_0x2b95(){const _0x122f7b=['filter','90BnqWxp','map','production','\x20local\x20Skill(s).','../../../skills/runtime-skill-sync.js','3990868BwWzeL','bool','../../../core/api-client.js','344ZSSRqn','1790787QFemyZ','14liDVAs','remote','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','1450515AmUlFG','329334XzHOTt','authRequired','appCode','code','4987860PgBKIH','2YlPlct','scope','trim','list','184986POhZJv','str','Listed\x20','personal','178019rgECph','company','length','builtin','envName'];a44_0x2b95=function(){return _0x122f7b;};return a44_0x2b95();}import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':'skill','command':a44_0x144a5c(0xa8),'description':a44_0x144a5c(0xbf),'risk':'read','flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x2b0700){const _0x5d43a7=a44_0x144a5c,_0x442c95=_0x2b0700[_0x5d43a7(0xaa)](_0x5d43a7(0xc4)),_0x489624=normalizeListScope(_0x2b0700['str'](_0x5d43a7(0xa6)));if(_0x2b0700[_0x5d43a7(0xb9)]('local')){const _0x5bfc36=_0x2b0700['accessKey'];if(!_0x5bfc36)throw CliErrors[_0x5d43a7(0xc2)]();const {listLocalRuntimeSkills:_0x456926}=await import(_0x5d43a7(0xb7)),_0xdbe52a=_0x456926({'env':_0x2b0700[_0x5d43a7(0xb1)]??_0x5d43a7(0xb5),'accessKey':_0x5bfc36,'appCode':_0x2b0700[_0x5d43a7(0xc3)],'scopes':listScopeToRuntimeScopes(_0x489624),'code':_0x442c95[_0x5d43a7(0xa7)]()||undefined}),_0xc25661=groupLocalRuntimeSkills(_0xdbe52a);return{'ok':!![],'data':{'appCode':_0x2b0700['appCode'],'source':'local','scope':_0x489624,'total':_0xdbe52a[_0x5d43a7(0xaf)],'personal':_0xc25661[_0x5d43a7(0xac)][_0x5d43a7(0xaf)],'company':_0xc25661[_0x5d43a7(0xae)][_0x5d43a7(0xaf)],'items':_0xdbe52a[_0x5d43a7(0xb4)](summarizeLocalRuntimeSkill),'skills':{'personal':_0xc25661[_0x5d43a7(0xac)]['map'](summarizeLocalRuntimeSkill),'company':_0xc25661[_0x5d43a7(0xae)][_0x5d43a7(0xb4)](summarizeLocalRuntimeSkill)}},'message':_0x5d43a7(0xab)+_0xdbe52a[_0x5d43a7(0xaf)]+_0x5d43a7(0xb6)};}const {listRuntimeSkills:_0x33c62e}=await import(_0x5d43a7(0xba)),_0x64f14b=await _0x33c62e({'appCode':_0x2b0700[_0x5d43a7(0xc3)],'scope':listScopeToRemoteScope(_0x489624),'code':_0x442c95['trim']()||undefined}),_0x32b8b3=shouldListScope(_0x489624,'personal')?_0x64f14b[_0x5d43a7(0xac)]??[]:[],_0x1d6c70=shouldListScope(_0x489624,_0x5d43a7(0xae))?_0x64f14b[_0x5d43a7(0xae)]??[]:[],_0x3376f7=[..._0x32b8b3,..._0x1d6c70];return{'ok':!![],'data':{'appCode':_0x2b0700[_0x5d43a7(0xc3)],'source':_0x5d43a7(0xbe),'scope':_0x489624,'total':_0x3376f7[_0x5d43a7(0xaf)],'personal':_0x32b8b3[_0x5d43a7(0xaf)],'company':_0x1d6c70[_0x5d43a7(0xaf)],'items':_0x3376f7[_0x5d43a7(0xb4)](summarizeRuntimeSkill),'skills':{'personal':_0x32b8b3[_0x5d43a7(0xb4)](summarizeRuntimeSkill),'company':_0x1d6c70[_0x5d43a7(0xb4)](summarizeRuntimeSkill)}},'message':_0x5d43a7(0xab)+_0x3376f7[_0x5d43a7(0xaf)]+'\x20remote\x20Skill(s).'};}};function groupLocalRuntimeSkills(_0x3eb6b4){const _0x23b5c6=a44_0x144a5c;return{'personal':_0x3eb6b4['filter'](_0x2040db=>_0x2040db[_0x23b5c6(0xa6)]===_0x23b5c6(0xac)),'company':_0x3eb6b4[_0x23b5c6(0xb2)](_0x24656b=>_0x24656b[_0x23b5c6(0xa6)]===_0x23b5c6(0xae)),'builtin':_0x3eb6b4[_0x23b5c6(0xb2)](_0x424013=>_0x424013['scope']===_0x23b5c6(0xb0))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a45_0x5d35(){const _0x1bbeac=['716XqZrsz','9hVLmJe','718732tAuJaz','12249cwbBRI','push','skill','2049988vcZbuP','30585BASFXR','2221163nHEhCb','20526900QwBBBx','888wfEtqG','write','3455768dotMQC','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review'];a45_0x5d35=function(){return _0x1bbeac;};return a45_0x5d35();}function a45_0x44ea(_0x489b83,_0x1c7fde){_0x489b83=_0x489b83-0x132;const _0x5d35c5=a45_0x5d35();let _0x44ea0d=_0x5d35c5[_0x489b83];return _0x44ea0d;}const a45_0x1a152d=a45_0x44ea;(function(_0x23ef31,_0x25e8f5){const _0x2688ec=a45_0x44ea,_0x50635e=_0x23ef31();while(!![]){try{const _0x558cb5=parseInt(_0x2688ec(0x13d))/0x1+-parseInt(_0x2688ec(0x133))/0x2+parseInt(_0x2688ec(0x13e))/0x3*(-parseInt(_0x2688ec(0x13b))/0x4)+parseInt(_0x2688ec(0x134))/0x5*(-parseInt(_0x2688ec(0x137))/0x6)+parseInt(_0x2688ec(0x135))/0x7+parseInt(_0x2688ec(0x139))/0x8*(parseInt(_0x2688ec(0x13c))/0x9)+parseInt(_0x2688ec(0x136))/0xa;if(_0x558cb5===_0x25e8f5)break;else _0x50635e['push'](_0x50635e['shift']());}catch(_0x489f5f){_0x50635e['push'](_0x50635e['shift']());}}}(a45_0x5d35,0xd1d8f));import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a45_0x1a152d(0x132),'command':a45_0x1a152d(0x13f),'description':a45_0x1a152d(0x13a),'risk':a45_0x1a152d(0x138),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a46_0x5c6c(){const _0xb3d9ea=['80pdBeWn','19327440UIOsul','2333688sFLCfb','str','33216EALcsr','1266620WnKhCS','dir','validate','skill','15yWaLcd','type','bool','553324FFsCzI','Skill\x20validation\x20passed.','4087251VVEclM','6sYQZwH','strict','903384zBJuCg','warnings','395iILVLl'];a46_0x5c6c=function(){return _0xb3d9ea;};return a46_0x5c6c();}const a46_0x2bddd8=a46_0x2541;(function(_0x2d67d4,_0x510dab){const _0x49d616=a46_0x2541,_0x462892=_0x2d67d4();while(!![]){try{const _0x37f61e=-parseInt(_0x49d616(0x1a3))/0x1+parseInt(_0x49d616(0x1aa))/0x2*(parseInt(_0x49d616(0x1a7))/0x3)+parseInt(_0x49d616(0x1a2))/0x4*(parseInt(_0x49d616(0x1b1))/0x5)+-parseInt(_0x49d616(0x1ad))/0x6*(-parseInt(_0x49d616(0x1ac))/0x7)+parseInt(_0x49d616(0x1b4))/0x8+-parseInt(_0x49d616(0x1af))/0x9*(-parseInt(_0x49d616(0x1b2))/0xa)+-parseInt(_0x49d616(0x1b3))/0xb;if(_0x37f61e===_0x510dab)break;else _0x462892['push'](_0x462892['shift']());}catch(_0x1e2241){_0x462892['push'](_0x462892['shift']());}}}(a46_0x5c6c,0xa9806));function a46_0x2541(_0x3dd6f5,_0x4fa35e){_0x3dd6f5=_0x3dd6f5-0x1a1;const _0x5c6c69=a46_0x5c6c();let _0x254139=_0x5c6c69[_0x3dd6f5];return _0x254139;}import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a46_0x2bddd8(0x1a6),'command':a46_0x2bddd8(0x1a5),'description':'Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x4e667e){const _0x42a65b=a46_0x2bddd8,_0x14b3bf=_0x4e667e[_0x42a65b(0x1a9)](_0x42a65b(0x1ae)),_0x248f78=validateSkillDirectory(_0x4e667e[_0x42a65b(0x1a1)](_0x42a65b(0x1a4)),{'strict':_0x14b3bf});return throwIfSkillValidationFailed(_0x248f78,_0x14b3bf),{'ok':!![],'data':{'dir':_0x248f78[_0x42a65b(0x1a4)],'type':_0x248f78[_0x42a65b(0x1a8)],'errors':_0x248f78['errors'],'warnings':_0x248f78[_0x42a65b(0x1b0)]},'message':_0x42a65b(0x1ab)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x4d4ad2=a47_0x526b;(function(_0x4de22a,_0x5d1c48){const _0x163fca=a47_0x526b,_0x36ca83=_0x4de22a();while(!![]){try{const _0x4d3057=parseInt(_0x163fca(0x156))/0x1*(parseInt(_0x163fca(0x152))/0x2)+parseInt(_0x163fca(0x15c))/0x3*(parseInt(_0x163fca(0x157))/0x4)+parseInt(_0x163fca(0x14f))/0x5+-parseInt(_0x163fca(0x169))/0x6+-parseInt(_0x163fca(0x15a))/0x7*(-parseInt(_0x163fca(0x167))/0x8)+-parseInt(_0x163fca(0x154))/0x9+parseInt(_0x163fca(0x15b))/0xa*(-parseInt(_0x163fca(0x15e))/0xb);if(_0x4d3057===_0x5d1c48)break;else _0x36ca83['push'](_0x36ca83['shift']());}catch(_0x13f642){_0x36ca83['push'](_0x36ca83['shift']());}}}(a47_0x21ec,0x9de3a));function a47_0x21ec(){const _0x1a301b=['confirm-warnings','357isgJkE','109370TAVfEz','2184762HjrrMe','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','1342yFsSGj','strict','company','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','195288MoYdjT','boolean','4628934mhjoNX','string','force','scope','write','code','4542005WKzmov','all','personal','944842iGPcGC','target','9665469RcKtAu','Skill\x20template\x20type','2zIfSiP','4UqgXMt','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens'];a47_0x21ec=function(){return _0x1a301b;};return a47_0x21ec();}import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a47_0x4d4ad2(0x14e),'type':'string','description':a47_0x4d4ad2(0x161)};export const SCOPE_FLAG={'name':'scope','type':a47_0x4d4ad2(0x16a),'description':a47_0x4d4ad2(0x163),'enum':[a47_0x4d4ad2(0x150),a47_0x4d4ad2(0x151),'company']};export const PUSH_SCOPE_FLAG={'name':a47_0x4d4ad2(0x14c),'type':a47_0x4d4ad2(0x16a),'description':a47_0x4d4ad2(0x162),'default':a47_0x4d4ad2(0x151),'enum':[a47_0x4d4ad2(0x151),a47_0x4d4ad2(0x160)]};export const LIST_SCOPE_FLAG={'name':a47_0x4d4ad2(0x14c),'type':a47_0x4d4ad2(0x16a),'description':'Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','enum':[a47_0x4d4ad2(0x150),a47_0x4d4ad2(0x151),a47_0x4d4ad2(0x160)]};export const LOCAL_FLAG={'name':'local','type':'boolean','description':a47_0x4d4ad2(0x15d)};export const DIR_FLAG={'name':'dir','type':a47_0x4d4ad2(0x16a),'required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};function a47_0x526b(_0x500b8e,_0xf9972){_0x500b8e=_0x500b8e-0x14b;const _0x21ec1f=a47_0x21ec();let _0x526b3a=_0x21ec1f[_0x500b8e];return _0x526b3a;}export const CREATE_NAME_FLAG={'name':'name','type':a47_0x4d4ad2(0x16a),'required':!![],'description':a47_0x4d4ad2(0x166),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a47_0x4d4ad2(0x158)}};export const TYPE_FLAG={'name':'type','type':a47_0x4d4ad2(0x16a),'description':a47_0x4d4ad2(0x155),'default':a47_0x4d4ad2(0x14d),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a47_0x4d4ad2(0x153),'type':a47_0x4d4ad2(0x16a),'description':'Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a47_0x4d4ad2(0x14b),'type':'boolean','description':'Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists'};export const CONFIRM_WARNINGS_FLAG={'name':a47_0x4d4ad2(0x159),'type':a47_0x4d4ad2(0x168),'description':a47_0x4d4ad2(0x165)};export const STRICT_FLAG={'name':a47_0x4d4ad2(0x15f),'type':'boolean','description':a47_0x4d4ad2(0x164)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3a07e3,_0x3418f8){const _0x13eb85=a48_0x9809,_0x46f2c1=_0x3a07e3();while(!![]){try{const _0x54cb06=-parseInt(_0x13eb85(0x8a))/0x1+-parseInt(_0x13eb85(0x89))/0x2*(-parseInt(_0x13eb85(0x8b))/0x3)+parseInt(_0x13eb85(0x86))/0x4+parseInt(_0x13eb85(0x88))/0x5*(-parseInt(_0x13eb85(0x87))/0x6)+parseInt(_0x13eb85(0x8e))/0x7+-parseInt(_0x13eb85(0x8d))/0x8*(parseInt(_0x13eb85(0x8c))/0x9)+parseInt(_0x13eb85(0x8f))/0xa;if(_0x54cb06===_0x3418f8)break;else _0x46f2c1['push'](_0x46f2c1['shift']());}catch(_0x309e54){_0x46f2c1['push'](_0x46f2c1['shift']());}}}(a48_0x54f5,0xe3ea5));function a48_0x9809(_0x18881f,_0x6c36bb){_0x18881f=_0x18881f-0x86;const _0x54f52a=a48_0x54f5();let _0x9809f5=_0x54f52a[_0x18881f];return _0x9809f5;}function a48_0x54f5(){const _0x531a78=['689382Sqrkaf','5baowuE','143346hiyJuK','1755723BVoHNJ','57SBiBFh','701847jbxmOT','184rKVGMs','5687276eBkhHr','16420220piGNje','3125972SOuIEQ'];a48_0x54f5=function(){return _0x531a78;};return a48_0x54f5();}import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a49_0x46f0(_0x3769a2,_0x6f8933){_0x3769a2=_0x3769a2-0x11d;var _0x4e76fd=a49_0x4e76();var _0x46f039=_0x4e76fd[_0x3769a2];return _0x46f039;}(function(_0x2d3b08,_0xed5ce){var _0x1c730b=a49_0x46f0,_0x1d5909=_0x2d3b08();while(!![]){try{var _0x4756ef=-parseInt(_0x1c730b(0x126))/0x1*(-parseInt(_0x1c730b(0x12e))/0x2)+-parseInt(_0x1c730b(0x130))/0x3+-parseInt(_0x1c730b(0x12f))/0x4*(-parseInt(_0x1c730b(0x11f))/0x5)+-parseInt(_0x1c730b(0x127))/0x6*(parseInt(_0x1c730b(0x120))/0x7)+parseInt(_0x1c730b(0x12b))/0x8*(parseInt(_0x1c730b(0x129))/0x9)+parseInt(_0x1c730b(0x12a))/0xa+-parseInt(_0x1c730b(0x11e))/0xb*(parseInt(_0x1c730b(0x125))/0xc);if(_0x4756ef===_0xed5ce)break;else _0x1d5909['push'](_0x1d5909['shift']());}catch(_0x1536a5){_0x1d5909['push'](_0x1d5909['shift']());}}}(a49_0x4e76,0x9b4e9));export function isPackageBackedManifest(_0x28a53f){var _0x1e0920=a49_0x46f0;return!!_0x28a53f&&typeof _0x28a53f==='object'&&!Array[_0x1e0920(0x121)](_0x28a53f)&&typeof _0x28a53f[_0x1e0920(0x122)]===_0x1e0920(0x131)&&_0x28a53f[_0x1e0920(0x122)][_0x1e0920(0x12d)]>0x0&&Array[_0x1e0920(0x121)](_0x28a53f[_0x1e0920(0x11d)]);}export function isMultiFileManifest(_0x2093cd){var _0x3314da=a49_0x46f0;return!!_0x2093cd&&typeof _0x2093cd===_0x3314da(0x12c)&&!Array[_0x3314da(0x121)](_0x2093cd)&&Array[_0x3314da(0x121)](_0x2093cd['files'])&&_0x2093cd[_0x3314da(0x11d)][_0x3314da(0x128)](_0x35f09f=>_0x35f09f[_0x3314da(0x124)]!==_0x3314da(0x123));}function a49_0x4e76(){var _0x5c8462=['8446360UrcJfq','4378888OnhcfL','object','length','80ajIcht','543052pnmYTG','693510RGZzeD','string','files','11YdKSFE','5PpMXXe','5676958owrMrG','isArray','ossPath','SKILL.md','path','11106948bTAsNA','26903JVrqob','6ZxQbjd','some','9MvkMKZ'];a49_0x4e76=function(){return _0x5c8462;};return a49_0x4e76();}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
(function(_0x18739f,_0xf80199){const _0x4ee05c=a50_0x3fc8,_0x29921d=_0x18739f();while(!![]){try{const _0x6b9eeb=parseInt(_0x4ee05c(0x1b6))/0x1*(-parseInt(_0x4ee05c(0x1a3))/0x2)+-parseInt(_0x4ee05c(0x18e))/0x3*(parseInt(_0x4ee05c(0x19e))/0x4)+-parseInt(_0x4ee05c(0x183))/0x5+-parseInt(_0x4ee05c(0x190))/0x6*(-parseInt(_0x4ee05c(0x186))/0x7)+-parseInt(_0x4ee05c(0x180))/0x8+parseInt(_0x4ee05c(0x19a))/0x9*(parseInt(_0x4ee05c(0x191))/0xa)+parseInt(_0x4ee05c(0x1a0))/0xb*(parseInt(_0x4ee05c(0x1a6))/0xc);if(_0x6b9eeb===_0xf80199)break;else _0x29921d['push'](_0x29921d['shift']());}catch(_0x36acce){_0x29921d['push'](_0x29921d['shift']());}}}(a50_0x4606,0x71258));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';function a50_0x3fc8(_0x28dc6b,_0x1a980c){_0x28dc6b=_0x28dc6b-0x180;const _0x46068b=a50_0x4606();let _0x3fc880=_0x46068b[_0x28dc6b];return _0x3fc880;}import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x38ce1e){const _0x3ee0e0=a50_0x3fc8,{getRuntimeSkillByCode:_0x142a5d,validateRuntimeSkillPublish:_0x9a4a0f}=await import(_0x3ee0e0(0x19c)),{readPushDirectory:_0x2548f6,resolvePushDirectoryIdentity:_0x1d4516}=await import(_0x3ee0e0(0x1a9));if(!_0x38ce1e['accessKey'])throw CliErrors[_0x3ee0e0(0x18f)]();const _0x217c53=resolvePushScope(_0x38ce1e),_0x1c65e=validateSkillDirectory(_0x38ce1e['str']('dir'));throwIfSkillValidationFailed(_0x1c65e);const _0x303581=_0x1d4516(_0x1c65e[_0x3ee0e0(0x1ad)],_0x38ce1e[_0x3ee0e0(0x192)],remoteFirstMetadataOptions()),_0x55ee3e=await _0x142a5d(_0x38ce1e[_0x3ee0e0(0x192)],_0x303581[_0x3ee0e0(0x184)]);throwIfBuiltinPushTarget(_0x55ee3e);if(_0x217c53===_0x3ee0e0(0x1a2)){const _0x4e1af0=_0x2548f6(_0x1c65e[_0x3ee0e0(0x1ad)],_0x38ce1e[_0x3ee0e0(0x192)],remoteMissingCompanyReadOptions()),_0x39f03b=await _0x9a4a0f(_0x38ce1e['appCode'],_0x4e1af0[_0x3ee0e0(0x1ab)],{'visibility':_0x3ee0e0(0x1bd)});return{'method':'POST','url':_0x3ee0e0(0x1b4)+_0x38ce1e['appCode']+_0x3ee0e0(0x185),'body':{'skillCode':_0x4e1af0[_0x3ee0e0(0x184)],'visibility':'NAMESPACE_ONLY','valid':_0x39f03b['valid'],'errors':_0x39f03b[_0x3ee0e0(0x19d)],'warnings':_0x39f03b[_0x3ee0e0(0x198)],'resolvedSlug':_0x39f03b['resolvedSlug'],'resolvedVersion':_0x39f03b[_0x3ee0e0(0x1aa)]},'description':_0x3ee0e0(0x1ae)};}if(_0x55ee3e&&_0x55ee3e[_0x3ee0e0(0x1b8)]!==_0x3ee0e0(0x18d))throw CliErrors[_0x3ee0e0(0x181)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x303581['skillCode']+_0x3ee0e0(0x1b7)+(_0x55ee3e[_0x3ee0e0(0x1b8)]??_0x3ee0e0(0x18a))+'\x22.');const _0x22c2f1=_0x2548f6(_0x1c65e['dir'],_0x38ce1e[_0x3ee0e0(0x192)],_0x55ee3e?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x4676b4=await _0x9a4a0f(_0x38ce1e[_0x3ee0e0(0x192)],_0x22c2f1[_0x3ee0e0(0x1ab)],{'visibility':_0x3ee0e0(0x1a8)});return{'method':_0x3ee0e0(0x1af),'url':_0x3ee0e0(0x1b4)+_0x38ce1e['appCode']+'/publish/validate','body':{'skillCode':_0x22c2f1[_0x3ee0e0(0x184)],'visibility':_0x3ee0e0(0x1a8),'valid':_0x4676b4[_0x3ee0e0(0x1ba)],'errors':_0x4676b4[_0x3ee0e0(0x19d)],'warnings':_0x4676b4['warnings'],'resolvedSlug':_0x4676b4[_0x3ee0e0(0x18c)],'resolvedVersion':_0x4676b4[_0x3ee0e0(0x1aa)]},'description':'Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'};}function a50_0x4606(){const _0x5b0f88=['input','confirmWarnings','dir','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','POST','Personal','existing','bool','savedSkill','/api/cli/v1/skills/','Updated\x20personal\x20Skill\x20','968MAJLze','\x20has\x20scope=\x22','scope','confirm-warnings','valid','appcode','remoteForPreflight','NAMESPACE_ONLY','str','1141192rfigsj','validation','publishInput','2354335qKgpAN','skillCode','/publish/validate','280mxIpYy','\x20for\x20review','files','version','unknown','\x20Skill\x20','resolvedSlug','personal','27129BiizVd','authRequired','54066OREXBa','708060QhfLTr','appCode','Submitted\x20company\x20Skill\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','identical','accessKey','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','warnings','frontmatterDisplayName','45IYGetQ','(unknown)','../../core/api-client.js','errors','236zIemeM','Created\x20personal\x20Skill\x20','4345bSqbWi','payload','company','686KTogge','metadata','\x20version\x20','37308vfWwoX','trim','PRIVATE','../../skills/runtime-skill-sync.js','resolvedVersion'];a50_0x4606=function(){return _0x5b0f88;};return a50_0x4606();}export async function skillPushExecute(_0xec8101){const _0x2fd13c=a50_0x3fc8,{createPersonalRuntimeSkill:_0x3f632d,downloadRuntimeSkillPackage:_0x5be923,getRuntimeSkillByCode:_0x3c7b63,publishCompanyRuntimeSkill:_0x368ba6,updatePersonalRuntimeSkill:_0x456bed,validateRuntimeSkillPublish:_0x2fc328}=await import(_0x2fd13c(0x19c)),{verifyRuntimeSkillPackage:_0x27162c,verifyRuntimeSkillBundle:_0x51bb8b,readPushDirectory:_0x3b560a,refreshPushDirectoryMetadataFromRemote:_0x3ec925,recordPushedRuntimeSkill:_0x25e6d0,resolvePushDirectoryIdentity:_0x32882a}=await import(_0x2fd13c(0x1a9));if(!_0xec8101[_0x2fd13c(0x196)])throw CliErrors[_0x2fd13c(0x18f)]();const _0x24513f=resolvePushScope(_0xec8101),_0x5589d9=_0xec8101[_0x2fd13c(0x1b2)](_0x2fd13c(0x1b9))||_0xec8101[_0x2fd13c(0x1b2)](_0x2fd13c(0x1ac)),_0x2fc098=validateSkillDirectory(_0xec8101['str'](_0x2fd13c(0x1ad)));throwIfSkillValidationFailed(_0x2fc098);const _0x4ec139=_0x2fc098[_0x2fd13c(0x1ad)];let _0x32647a;if(_0x24513f==='company'){const _0x59ed1a=_0x32882a(_0x4ec139,_0xec8101[_0x2fd13c(0x192)],remoteFirstMetadataOptions()),_0x1c97b7=await _0x3c7b63(_0xec8101[_0x2fd13c(0x192)],_0x59ed1a['skillCode']);throwIfBuiltinPushTarget(_0x1c97b7);if(_0x1c97b7)_0x3ec925(_0x4ec139,_0x1c97b7,_0xec8101[_0x2fd13c(0x192)]);const _0x3306fe=_0x3b560a(_0x4ec139,_0xec8101[_0x2fd13c(0x192)],_0x1c97b7?{'targetScope':_0x2fd13c(0x1a2),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x32647a={'scope':_0x2fd13c(0x1a2),'payload':_0x3306fe,'publishInput':_0x3306fe[_0x2fd13c(0x1ab)],'remoteForPreflight':_0x1c97b7,'warnings':[]};}else{const _0x5872af=_0xec8101[_0x2fd13c(0x1be)](_0x2fd13c(0x1bb))[_0x2fd13c(0x1a7)](),_0x92f5c2=Boolean(_0x5872af),_0xf77371=allowRetargetArgs(_0x92f5c2),_0xd04fbc=_0x32882a(_0x4ec139,_0xec8101[_0x2fd13c(0x192)],{...remoteFirstMetadataOptions(),..._0xf77371[0x0]}),_0x945a76=await _0x3c7b63(_0xec8101['appCode'],_0xd04fbc[_0x2fd13c(0x184)]);throwIfBuiltinPushTarget(_0x945a76);if(_0x945a76){if(_0x945a76[_0x2fd13c(0x1b8)]!==_0x2fd13c(0x18d)){if(_0x92f5c2)throw CliErrors[_0x2fd13c(0x181)](_0x2fd13c(0x194)+_0xd04fbc[_0x2fd13c(0x184)]+_0x2fd13c(0x1b7)+(_0x945a76[_0x2fd13c(0x1b8)]??_0x2fd13c(0x18a))+'\x22.');_0x3ec925(_0x4ec139,_0x945a76,_0xec8101[_0x2fd13c(0x192)]);}else!_0x92f5c2&&_0x3ec925(_0x4ec139,_0x945a76,_0xec8101['appCode']);}const _0xab64ab=_0x3b560a(_0x4ec139,_0xec8101['appCode'],_0x945a76?remotePersonalReadOptions(_0x92f5c2,_0xf77371[0x0]):remoteMissingPersonalReadOptions(_0xf77371[0x0])),_0x49a23e=_0x945a76?.[_0x2fd13c(0x1b8)]==='personal'&&_0x945a76[_0x2fd13c(0x184)]===_0xab64ab[_0x2fd13c(0x184)]?_0x945a76:undefined,_0x548843=_0x92f5c2&&_0x49a23e?withRetargetExistingMetadata(_0xab64ab[_0x2fd13c(0x1ab)],_0x49a23e,{'preferInputSkillName':Boolean(_0xab64ab[_0x2fd13c(0x199)])}):_0xab64ab[_0x2fd13c(0x1ab)],_0x109352=_0x92f5c2?buildRetargetWarning(_0xd04fbc[_0x2fd13c(0x1a4)],_0xec8101[_0x2fd13c(0x192)]):[];_0x32647a={'scope':_0x2fd13c(0x18d),'payload':_0xab64ab,'publishInput':_0x548843,'remoteForPreflight':_0x49a23e,'existing':_0x49a23e,'warnings':[..._0x2fc098['warnings'],..._0x109352]};}const _0x25753d=await runRemoteContentPreflight({'scope':_0x32647a[_0x2fd13c(0x1b8)],'remote':_0x32647a[_0x2fd13c(0x1bc)],'publishInput':_0x32647a['publishInput'],'skillCode':_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],'appCode':_0xec8101[_0x2fd13c(0x192)],'downloadRuntimeSkillPackage':_0x5be923,'verifyRuntimeSkillBundle':_0x51bb8b});if(_0x25753d['status']===_0x2fd13c(0x195))return _0x32647a[_0x2fd13c(0x1b8)]===_0x2fd13c(0x1a2)?_0x25e6d0(_0x4ec139,_0x25753d[_0x2fd13c(0x1b3)],_0xec8101[_0x2fd13c(0x192)],{'scope':_0x2fd13c(0x1a2)}):_0x25e6d0(_0x4ec139,_0x25753d['savedSkill'],_0xec8101[_0x2fd13c(0x192)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x25753d[_0x2fd13c(0x1b3)]),'scope':_0x32647a[_0x2fd13c(0x1b8)],..._0x32647a[_0x2fd13c(0x1b8)]===_0x2fd13c(0x18d)?{'warnings':_0x32647a[_0x2fd13c(0x198)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x32647a[_0x2fd13c(0x1b8)])+_0x2fd13c(0x18b)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]+_0x2fd13c(0x197)};if(_0x32647a[_0x2fd13c(0x1b8)]===_0x2fd13c(0x1a2)){const _0x4facbd=await _0x2fc328(_0xec8101[_0x2fd13c(0x192)],_0x32647a[_0x2fd13c(0x182)],{'visibility':_0x2fd13c(0x1bd)});throwIfPublishValidationFailed(_0x2fd13c(0x1a2),_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0x4facbd),throwIfUnconfirmedPublishWarnings(_0x2fd13c(0x1a2),_0x32647a['payload'][_0x2fd13c(0x184)],_0x4facbd[_0x2fd13c(0x198)],_0x5589d9);const _0x521c96=await _0x368ba6(_0xec8101['appCode'],_0x32647a[_0x2fd13c(0x182)],{'confirmWarnings':_0x5589d9});return _0x25e6d0(_0x4ec139,{..._0x521c96,'files':_0x32647a[_0x2fd13c(0x182)][_0x2fd13c(0x188)]},_0xec8101[_0x2fd13c(0x192)],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x521c96),'scope':_0x2fd13c(0x1a2),'reviewState':'submitted','submittedForReview':!![],'validation':{'warnings':_0x4facbd[_0x2fd13c(0x198)]}},'message':_0x2fd13c(0x193)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]+_0x2fd13c(0x1a5)+(_0x521c96[_0x2fd13c(0x189)]??_0x2fd13c(0x19b))+_0x2fd13c(0x187)};}const _0x3d6482=await _0x2fc328(_0xec8101[_0x2fd13c(0x192)],_0x32647a['publishInput'],{'visibility':_0x2fd13c(0x1a8)});throwIfPublishValidationFailed(_0x2fd13c(0x18d),_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0x3d6482),throwIfUnconfirmedPublishWarnings(_0x2fd13c(0x18d),_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0x3d6482[_0x2fd13c(0x198)],_0x5589d9);const _0x222ba4={'confirmWarnings':_0x5589d9},_0x5db171=_0x32647a[_0x2fd13c(0x1b1)]?await _0x456bed(_0x32647a['payload']['skillCode'],_0xec8101['appCode'],_0x32647a['publishInput'],_0x222ba4):await _0x3f632d(_0xec8101[_0x2fd13c(0x192)],_0x32647a['publishInput'],_0x222ba4);let _0x477e76=_0x5db171;if(isMultiFileManifest(_0x32647a['publishInput'][_0x2fd13c(0x188)])){const _0x12049a=await _0x5be923(_0x2fd13c(0x18d),_0x5db171[_0x2fd13c(0x184)]||_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)],_0xec8101['appCode']);_0x51bb8b(_0x32647a[_0x2fd13c(0x182)][_0x2fd13c(0x188)],_0x12049a),_0x477e76={..._0x5db171,'files':_0x32647a[_0x2fd13c(0x182)][_0x2fd13c(0x188)]};}else{if(isPackageBackedManifest(_0x5db171[_0x2fd13c(0x188)])){const _0x4a26b9=await _0x5be923('personal',_0x5db171[_0x2fd13c(0x184)]||_0x32647a['payload'][_0x2fd13c(0x184)],_0xec8101['appCode']);_0x27162c(_0x5db171[_0x2fd13c(0x188)],_0x4a26b9);}}return _0x25e6d0(_0x4ec139,_0x477e76,_0xec8101[_0x2fd13c(0x192)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5db171),'warnings':_0x32647a[_0x2fd13c(0x198)],'validation':{'warnings':_0x3d6482[_0x2fd13c(0x198)]}},'message':_0x32647a[_0x2fd13c(0x1b1)]?_0x2fd13c(0x1b5)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]:_0x2fd13c(0x19f)+_0x32647a[_0x2fd13c(0x1a1)][_0x2fd13c(0x184)]};}function scopeLabel(_0x53afb2){const _0x41adb5=a50_0x3fc8;return _0x53afb2===_0x41adb5(0x1a2)?'Company':_0x41adb5(0x1b0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x412fa3,_0x514133){const _0x2ab593=a51_0x4347,_0x1a9009=_0x412fa3();while(!![]){try{const _0x19555b=parseInt(_0x2ab593(0x14e))/0x1*(-parseInt(_0x2ab593(0x157))/0x2)+-parseInt(_0x2ab593(0x159))/0x3+parseInt(_0x2ab593(0x13f))/0x4*(parseInt(_0x2ab593(0x16c))/0x5)+-parseInt(_0x2ab593(0x15c))/0x6*(-parseInt(_0x2ab593(0x14b))/0x7)+parseInt(_0x2ab593(0x161))/0x8*(parseInt(_0x2ab593(0x158))/0x9)+parseInt(_0x2ab593(0x149))/0xa+-parseInt(_0x2ab593(0x14a))/0xb;if(_0x19555b===_0x514133)break;else _0x1a9009['push'](_0x1a9009['shift']());}catch(_0x367b0f){_0x1a9009['push'](_0x1a9009['shift']());}}}(a51_0xd2f6,0x9b043));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x4a8887){const _0x36030d=a51_0x4347,_0x426dc5=_0x4a8887[_0x36030d(0x16a)]('scope')||'personal';if(_0x426dc5===_0x36030d(0x14d)||_0x426dc5===_0x36030d(0x15a))return _0x426dc5;throw CliErrors['validation'](_0x36030d(0x160)+_0x426dc5+'\x22.');}export function allowRetargetArgs(_0x188fc6){return _0x188fc6?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}function a51_0x4347(_0x20e4c0,_0x1f745c){_0x20e4c0=_0x20e4c0-0x13c;const _0xd2f601=a51_0xd2f6();let _0x434772=_0xd2f601[_0x20e4c0];return _0x434772;}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x4edd42=a51_0x4347;return{'targetScope':_0x4edd42(0x15a),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x450d0b={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x450d0b};}export function remotePersonalReadOptions(_0x5747b5,_0x348730={}){return{'ignoreInvalidMetadata':!![],..._0x5747b5?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x348730};}export function throwIfBuiltinPushTarget(_0x5cd959){const _0x4402e1=a51_0x4347;if(_0x5cd959?.[_0x4402e1(0x153)]!==_0x4402e1(0x168))return;throw CliErrors[_0x4402e1(0x166)](_0x4402e1(0x169)+(_0x5cd959[_0x4402e1(0x15e)]??_0x4402e1(0x16b))+_0x4402e1(0x145),_0x4402e1(0x155));}export function throwIfPublishValidationFailed(_0x38ffbc,_0x3e80e5,_0x2c8471){const _0x5a9b88=a51_0x4347;if(_0x2c8471[_0x5a9b88(0x14f)]['length']===0x0&&(_0x2c8471[_0x5a9b88(0x142)]||_0x2c8471[_0x5a9b88(0x154)]['length']>0x0))return;const _0x35aa2c=_0x2c8471[_0x5a9b88(0x14f)][_0x5a9b88(0x167)]>0x0?_0x2c8471[_0x5a9b88(0x14f)][_0x5a9b88(0x15d)](';\x20'):_0x5a9b88(0x148),_0x26319f=_0x38ffbc===_0x5a9b88(0x15a)?_0x5a9b88(0x140):'Personal';throw CliErrors[_0x5a9b88(0x166)](_0x26319f+'\x20Skill\x20push\x20validation\x20failed\x20for\x20'+_0x3e80e5+'.',_0x35aa2c);}export function throwIfUnconfirmedPublishWarnings(_0x534083,_0x82bc6d,_0x4318fb,_0x4af2dd){const _0x3659ce=a51_0x4347;if(_0x4318fb['length']===0x0||_0x4af2dd)return;const _0x3e4853=_0x534083===_0x3659ce(0x15a)?'Company':'Personal';throw CliErrors[_0x3659ce(0x166)](_0x3e4853+_0x3659ce(0x164)+_0x82bc6d+'.',[_0x3659ce(0x163),_0x3659ce(0x152),_0x3659ce(0x15b),_0x3659ce(0x14c)+_0x4318fb[_0x3659ce(0x15d)](';\x20')][_0x3659ce(0x15d)]('\x20'));}function a51_0xd2f6(){const _0x4c05b1=['company','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','2562252UPRClY','join','skillCode','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','848VcPDsL','not-applicable','Review\x20each\x20warning\x20before\x20continuing.','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','downloadRuntimeSkillPackage','validation','length','builtin','Builtin\x20Skill\x20','str','(unknown)','81560kPlqoh','files','\x20after\x20successful\x20push.','Local\x20Skill\x20metadata\x20appCode\x20','28tDHteb','Company','publishInput','valid','remote','appCode','\x20cannot\x20be\x20pushed.','warning','identical','SkillHub\x20validation\x20returned\x20invalid.','10812210XBqFiq','6509360wHShXe','7mtLhgh','Warnings:\x20','personal','38990jJTQkY','errors','different','content','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','scope','warnings','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','22YwUbBM','87039BDlpGA','2975928ePNeny'];a51_0xd2f6=function(){return _0x4c05b1;};return a51_0xd2f6();}export function buildRetargetWarning(_0x43c8e6,_0x359b0f){const _0xe07d24=a51_0x4347;if(!_0x43c8e6?.[_0xe07d24(0x144)]||_0x43c8e6[_0xe07d24(0x144)]===_0x359b0f)return[];return[{'level':_0xe07d24(0x146),'ruleId':'skill-metadata-appcode-retargeted','file':'lovrabet.skill.json','message':_0xe07d24(0x13e)+_0x43c8e6['appCode']+_0xe07d24(0x15f)+_0x359b0f+_0xe07d24(0x13d),'suggestion':_0xe07d24(0x156)}];}export async function runRemoteContentPreflight(_0x469d9f){const _0x2962db=a51_0x4347;if(!_0x469d9f[_0x2962db(0x143)]||_0x469d9f[_0x2962db(0x143)][_0x2962db(0x153)]!==_0x469d9f['scope']||!_0x469d9f[_0x2962db(0x141)][_0x2962db(0x13c)])return{'status':_0x2962db(0x162)};const _0x1077be=_0x469d9f[_0x2962db(0x143)][_0x2962db(0x15e)]||_0x469d9f[_0x2962db(0x15e)];if(!_0x1077be)return{'status':_0x2962db(0x162)};const _0x3f7ab7=await _0x469d9f[_0x2962db(0x165)](_0x469d9f[_0x2962db(0x153)],_0x1077be,_0x469d9f[_0x2962db(0x144)],_0x469d9f[_0x2962db(0x143)]['version']);try{_0x469d9f['verifyRuntimeSkillBundle'](_0x469d9f[_0x2962db(0x141)][_0x2962db(0x13c)],_0x3f7ab7);}catch{return{'status':_0x2962db(0x150)};}return{'status':_0x2962db(0x147),'savedSkill':{..._0x469d9f[_0x2962db(0x143)],'content':_0x469d9f[_0x2962db(0x141)][_0x2962db(0x151)],'files':_0x469d9f['publishInput'][_0x2962db(0x13c)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4a2405,_0x5a382b){const _0xe8cba=a52_0x38d5,_0x4e825a=_0x4a2405();while(!![]){try{const _0x514897=parseInt(_0xe8cba(0x97))/0x1*(parseInt(_0xe8cba(0x9b))/0x2)+-parseInt(_0xe8cba(0x8e))/0x3*(-parseInt(_0xe8cba(0x98))/0x4)+parseInt(_0xe8cba(0x96))/0x5*(-parseInt(_0xe8cba(0x99))/0x6)+-parseInt(_0xe8cba(0x9e))/0x7*(-parseInt(_0xe8cba(0x9f))/0x8)+parseInt(_0xe8cba(0x92))/0x9+parseInt(_0xe8cba(0xa1))/0xa+-parseInt(_0xe8cba(0x9d))/0xb*(parseInt(_0xe8cba(0xa3))/0xc);if(_0x514897===_0x5a382b)break;else _0x4e825a['push'](_0x4e825a['shift']());}catch(_0x457973){_0x4e825a['push'](_0x4e825a['shift']());}}}(a52_0x1b97,0xc161c));export function withRetargetExistingMetadata(_0x4af638,_0x4e3083,_0x508cdc={}){const _0x3f7b41=a52_0x38d5,_0x1ed76b=_0x508cdc[_0x3f7b41(0xa4)]?_0x4af638[_0x3f7b41(0x93)]??_0x4e3083['skillName']:_0x4e3083[_0x3f7b41(0x93)]??_0x4af638[_0x3f7b41(0x93)];return{..._0x4af638,'skillName':_0x1ed76b,'description':_0x4e3083[_0x3f7b41(0x9a)]??_0x4af638[_0x3f7b41(0x9a)],'tags':Array[_0x3f7b41(0x8d)](_0x4e3083[_0x3f7b41(0xa0)])?_0x4e3083['tags']:_0x4af638['tags'],'version':_0x4e3083[_0x3f7b41(0x94)]??_0x4af638[_0x3f7b41(0x94)],'sourceSessionId':_0x4e3083[_0x3f7b41(0x8f)]??_0x4af638[_0x3f7b41(0x8f)]};}function a52_0x38d5(_0x37e9d9,_0x216b4b){_0x37e9d9=_0x37e9d9-0x8c;const _0x1b9745=a52_0x1b97();let _0x38d50a=_0x1b9745[_0x37e9d9];return _0x38d50a;}function a52_0x1b97(){const _0x339cab=['1345npKRIa','169583HqzzcD','12lReFCC','24834pUeAjh','description','2iDyFgj','appCode','17402YjbxFF','119IAKHFM','344920CzpfEQ','tags','8107740zVXIvv','skill-metadata-appcode-retargeted','14004tvCvUM','preferInputSkillName','Local\x20Skill\x20metadata\x20appCode\x20','isArray','1274826roFPlG','sourceSessionId','\x20after\x20successful\x20push.','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','6871851hdTgkC','skillName','version','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'];a52_0x1b97=function(){return _0x339cab;};return a52_0x1b97();}export function buildRetargetWarning(_0x425fb6,_0x2e3185){const _0x50782b=a52_0x38d5;if(!_0x425fb6?.[_0x50782b(0x9c)]||_0x425fb6[_0x50782b(0x9c)]===_0x2e3185)return[];return[{'level':'warning','ruleId':_0x50782b(0xa2),'file':'lovrabet.skill.json','message':_0x50782b(0x8c)+_0x425fb6[_0x50782b(0x9c)]+_0x50782b(0x91)+_0x2e3185+_0x50782b(0x90),'suggestion':_0x50782b(0x95)}];}
|