@lovrabet/lovrabet-cli 2.2.3 → 2.2.4-beta.2
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/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -0
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -0
- package/lib/commands/notification/shared.d.ts +13 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.d.ts +2 -0
- package/lib/commands/permit/dataset-get.js +1 -0
- package/lib/commands/permit/dataset-set.d.ts +2 -0
- package/lib/commands/permit/dataset-set.js +1 -0
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.d.ts +52 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.d.ts +33 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -0
- package/lib/commands/schedule/index.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/diagram.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/diagram.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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.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.d.ts +161 -0
- 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/raw-flags.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.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/install-target.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/types.d.ts +1 -0
- 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/skills/skill-presence.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
- package/skills/lovrabet/SKILL.md +20 -7
- package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
- package/skills/lovrabet/references/lovrabet-auth.md +1 -5
- package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
- package/skills/lovrabet/references/lovrabet-skill-authoring.md +5 -4
- package/skills/lovrabet.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a41_0x37c540=a41_0x2f3e;(function(_0x2939bc,_0x8eb1bc){const _0x55e5e7=a41_0x2f3e,_0x4a9be2=_0x2939bc();while(!![]){try{const _0x180915=-parseInt(_0x55e5e7(0x160))/0x1*(-parseInt(_0x55e5e7(0x17d))/0x2)+-parseInt(_0x55e5e7(0x177))/0x3+parseInt(_0x55e5e7(0x19b))/0x4*(-parseInt(_0x55e5e7(0x157))/0x5)+-parseInt(_0x55e5e7(0x15c))/0x6*(parseInt(_0x55e5e7(0x167))/0x7)+parseInt(_0x55e5e7(0x165))/0x8*(parseInt(_0x55e5e7(0x15d))/0x9)+parseInt(_0x55e5e7(0x183))/0xa*(-parseInt(_0x55e5e7(0x15f))/0xb)+parseInt(_0x55e5e7(0x16c))/0xc;if(_0x180915===_0x8eb1bc)break;else _0x4a9be2['push'](_0x4a9be2['shift']());}catch(_0x293a70){_0x4a9be2['push'](_0x4a9be2['shift']());}}}(a41_0x5410,0x21a4e));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':a41_0x37c540(0x194),'type':'string','required':!![],'description':'Service\x20Tree\x20manifest\x20file\x20path'},SERVICE_FLAG={'name':a41_0x37c540(0x155),'type':a41_0x37c540(0x18f),'required':!![],'description':a41_0x37c540(0x19a),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':'lower\x20kebab-case\x20service\x20code'}};function a41_0x2f3e(_0x48f758,_0x57a320){_0x48f758=_0x48f758-0x14f;const _0x5410ae=a41_0x5410();let _0x2f3e09=_0x5410ae[_0x48f758];return _0x2f3e09;}function summarizeService(_0x198554){const _0x2aa2b4=a41_0x37c540;return{'serviceCode':_0x198554[_0x2aa2b4(0x18a)],'name':_0x198554[_0x2aa2b4(0x173)][_0x2aa2b4(0x155)][_0x2aa2b4(0x16f)],'version':_0x198554[_0x2aa2b4(0x156)],'importedAt':_0x198554[_0x2aa2b4(0x189)],'source':_0x198554[_0x2aa2b4(0x158)],'commandCount':_0x198554[_0x2aa2b4(0x173)]['commands'][_0x2aa2b4(0x15b)],'commands':_0x198554[_0x2aa2b4(0x173)][_0x2aa2b4(0x191)][_0x2aa2b4(0x180)](_0x26bac1=>({'path':_0x26bac1[_0x2aa2b4(0x17a)],'description':_0x26bac1[_0x2aa2b4(0x16d)],'risk':_0x26bac1['risk'],'target':toPublicServiceTreeTarget(_0x26bac1[_0x2aa2b4(0x16b)]),'flags':_0x26bac1['flags'][_0x2aa2b4(0x180)](_0x5b6988=>({'name':_0x5b6988[_0x2aa2b4(0x16f)],'cliName':_0x5b6988[_0x2aa2b4(0x151)],'type':_0x5b6988['type'],'required':_0x5b6988[_0x2aa2b4(0x196)]===!![]}))}))};}function a41_0x5410(){const _0x534206=['Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','Local\x20service\x20code,\x20for\x20example\x20crm','219988FpumMA','manifest','将把指定服务的本地\x20Service\x20Tree\x20清单写入\x20JSON\x20文件;目标位置已有文件时可能被覆盖。确认界面不会展示本地文件路径。','Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json','cliName','import','entries','read','service','version','25uQntBw','source','将从本地\x20Service\x20Tree\x20注册表中移除指定服务清单;之后该清单提供的动态命令将不可用。','\x20service\x20','length','6nWTDtF','63QeuFuh','Exported\x20service\x20','11YAMOmT','8689NBSIoQ','errors','report','export','str','233552ySkwVR','detail','1303757plksHM','updated','replaced','entry','target','4013568mwqolZ','description','将\x20Service\x20Tree\x20清单导入本地运行态注册表','name','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','Service\x20manifest\x20validation\x20passed.','将读取指定清单并写入本地\x20Service\x20Tree\x20注册表;相同服务编码的现有清单会被更新。确认界面不会展示本地文件路径。','normalizedManifest','write','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','从本地运行态注册表移除\x20Service\x20Tree\x20清单','176535rdJMjf','Imported\x20','\x20service(s).','cliPath','WRITE','serviceCount','38WWUztx','warnings','registry','map','manifests','imported','460260lEeWct','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','validate','List\x20locally\x20imported\x20Service\x20Tree\x20manifests','Service\x20registry\x20validation\x20passed.','registryPath','importedAt','serviceCode','reduce','\x20service(s),\x20updated\x20','将本地\x20Service\x20Tree\x20清单导出为\x20JSON\x20文件','hash','string','filePath','commands','kind','risk','file','remove','required','Updated','registryIndex'];a41_0x5410=function(){return _0x534206;};return a41_0x5410();}function summarizeLoadedManifest(_0x308bb4){const _0x47d14f=a41_0x37c540;return{'service':_0x308bb4['normalizedManifest']?.[_0x47d14f(0x155)],'version':_0x308bb4[_0x47d14f(0x173)]?.[_0x47d14f(0x156)],'commandCount':_0x308bb4[_0x47d14f(0x173)]?.['commands'][_0x47d14f(0x15b)]??0x0,'commands':_0x308bb4['normalizedManifest']?.['commands'][_0x47d14f(0x180)](_0x370424=>({'path':_0x370424[_0x47d14f(0x17a)],'risk':_0x370424[_0x47d14f(0x193)],'target':toPublicServiceTreeTarget(_0x370424['target'])}))??[],'registryIndex':_0x308bb4[_0x47d14f(0x198)],'registryServiceCode':_0x308bb4['registryServiceCode'],'errors':_0x308bb4['report'][_0x47d14f(0x161)],'warnings':_0x308bb4[_0x47d14f(0x162)]['warnings']};}export const serviceDefinitions=[{'service':a41_0x37c540(0x155),'command':a41_0x37c540(0x185),'description':a41_0x37c540(0x175),'risk':a41_0x37c540(0x154),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x569ebd){const _0x226053=a41_0x37c540,_0x399826=loadServiceManifestFromFile(_0x569ebd[_0x226053(0x164)](_0x226053(0x194)));if(!_0x399826['report']['ok'])return{'ok':![],'data':{'file':_0x399826[_0x226053(0x190)],'hash':_0x399826[_0x226053(0x18e)],'kind':_0x399826[_0x226053(0x192)],'serviceCount':_0x399826['manifests'][_0x226053(0x15b)],'services':_0x399826['manifests']['map'](summarizeLoadedManifest),'errors':_0x399826[_0x226053(0x162)]['errors'],'warnings':_0x399826[_0x226053(0x162)][_0x226053(0x17e)]},'message':formatValidationFailure(_0x399826[_0x226053(0x162)])};if(_0x399826[_0x226053(0x192)]===_0x226053(0x17f)||_0x399826[_0x226053(0x181)][_0x226053(0x15b)]!==0x1)return{'ok':!![],'data':{'file':_0x399826[_0x226053(0x190)],'hash':_0x399826[_0x226053(0x18e)],'kind':_0x399826[_0x226053(0x192)],'serviceCount':_0x399826[_0x226053(0x181)][_0x226053(0x15b)],'commandCount':_0x399826[_0x226053(0x181)][_0x226053(0x18b)]((_0x7192b8,_0x12e049)=>_0x7192b8+(_0x12e049[_0x226053(0x173)]?.[_0x226053(0x191)]['length']??0x0),0x0),'services':_0x399826['manifests'][_0x226053(0x180)](summarizeLoadedManifest),'warnings':_0x399826[_0x226053(0x162)][_0x226053(0x17e)]},'message':_0x226053(0x187)};return{'ok':!![],'data':{'file':_0x399826[_0x226053(0x190)],'hash':_0x399826[_0x226053(0x18e)],'kind':_0x399826['kind'],'service':_0x399826['normalizedManifest']?.[_0x226053(0x155)],'version':_0x399826[_0x226053(0x173)]?.[_0x226053(0x156)],'commandCount':_0x399826['normalizedManifest']?.['commands'][_0x226053(0x15b)]??0x0,'commands':_0x399826[_0x226053(0x173)]?.[_0x226053(0x191)][_0x226053(0x180)](_0xd52596=>({'path':_0xd52596[_0x226053(0x17a)],'risk':_0xd52596['risk'],'target':toPublicServiceTreeTarget(_0xd52596['target'])})),'warnings':_0x399826[_0x226053(0x162)][_0x226053(0x17e)]},'message':_0x226053(0x171)};}},{'service':'service','command':a41_0x37c540(0x152),'description':a41_0x37c540(0x16e),'risk':a41_0x37c540(0x174),'confirmationDescription':a41_0x37c540(0x172),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x8f1991){const _0x1c496e=a41_0x37c540,_0x1fd18d=loadServiceManifestFromFile(_0x8f1991[_0x1c496e(0x164)](_0x1c496e(0x194)));return{'method':_0x1c496e(0x17b),'url':getServiceRegistryPath(),'body':{'file':_0x1fd18d[_0x1c496e(0x190)],'hash':_0x1fd18d['hash'],'kind':_0x1fd18d[_0x1c496e(0x192)],'ok':_0x1fd18d[_0x1c496e(0x162)]['ok'],'service':_0x1fd18d[_0x1c496e(0x173)]?.['service'],'version':_0x1fd18d[_0x1c496e(0x173)]?.['version'],'serviceCount':_0x1fd18d[_0x1c496e(0x181)]['length'],'services':_0x1fd18d['manifests'][_0x1c496e(0x180)](_0x424417=>({'service':_0x424417['normalizedManifest']?.[_0x1c496e(0x155)],'version':_0x424417[_0x1c496e(0x173)]?.[_0x1c496e(0x156)],'commandCount':_0x424417[_0x1c496e(0x173)]?.[_0x1c496e(0x191)][_0x1c496e(0x15b)]??0x0,'errors':_0x424417[_0x1c496e(0x162)][_0x1c496e(0x161)]})),'errors':_0x1fd18d[_0x1c496e(0x162)][_0x1c496e(0x161)],'commandCount':_0x1fd18d[_0x1c496e(0x173)]?.['commands'][_0x1c496e(0x15b)]??0x0},'description':_0x1c496e(0x184)};},async 'execute'(_0x23dedf){const _0x3960ce=a41_0x37c540,_0x45f860=importServiceManifest(_0x23dedf[_0x3960ce(0x164)](_0x3960ce(0x194)));if(_0x45f860[_0x3960ce(0x153)][_0x3960ce(0x15b)]!==0x1)return{'ok':!![],'data':{'registryPath':_0x45f860['registryPath'],'imported':_0x45f860['imported'],'updated':_0x45f860['updated'],'serviceCount':_0x45f860['serviceCount'],'services':_0x45f860['entries']['map'](summarizeService)},'message':_0x3960ce(0x178)+_0x45f860['imported']+_0x3960ce(0x18c)+_0x45f860['updated']+_0x3960ce(0x179)};return{'ok':!![],'data':{'registryPath':_0x45f860[_0x3960ce(0x188)],'replaced':_0x45f860[_0x3960ce(0x169)],'imported':_0x45f860[_0x3960ce(0x182)],'updated':_0x45f860[_0x3960ce(0x168)],'serviceCount':_0x45f860['serviceCount'],'service':summarizeService(_0x45f860['entry'])},'message':(_0x45f860['replaced']?_0x3960ce(0x197):'Imported')+_0x3960ce(0x15a)+_0x45f860['entry'][_0x3960ce(0x18a)]+'.'};}},{'service':a41_0x37c540(0x155),'command':a41_0x37c540(0x163),'description':a41_0x37c540(0x18d),'risk':'write','confirmationDescription':a41_0x37c540(0x14f),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x332825){const _0x3b9487=a41_0x37c540,_0x3d6334=getLocalServiceEntry(_0x332825['str'](_0x3b9487(0x155)));return{'method':_0x3b9487(0x17b),'url':_0x332825[_0x3b9487(0x164)](_0x3b9487(0x194)),'body':{'service':_0x332825[_0x3b9487(0x164)](_0x3b9487(0x155)),'found':Boolean(_0x3d6334),'version':_0x3d6334?.[_0x3b9487(0x156)],'source':_0x3d6334?.[_0x3b9487(0x158)]},'description':_0x3b9487(0x199)};},async 'execute'(_0xad12b3){const _0x2e39e4=a41_0x37c540,_0x52e5c6=exportServiceManifest(_0xad12b3['str'](_0x2e39e4(0x155)),_0xad12b3['str']('file'));return{'ok':!![],'data':{'registryPath':_0x52e5c6[_0x2e39e4(0x188)],'file':_0x52e5c6[_0x2e39e4(0x190)],'service':summarizeService(_0x52e5c6[_0x2e39e4(0x16a)])},'message':_0x2e39e4(0x15e)+_0x52e5c6[_0x2e39e4(0x16a)][_0x2e39e4(0x18a)]+'.'};}},{'service':a41_0x37c540(0x155),'command':'list','description':a41_0x37c540(0x186),'risk':a41_0x37c540(0x154),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x3e72f5=a41_0x37c540,_0x370be2=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x370be2[_0x3e72f5(0x15b)],'services':_0x370be2[_0x3e72f5(0x180)](summarizeService)}};}},{'service':'service','command':a41_0x37c540(0x195),'description':a41_0x37c540(0x176),'risk':a41_0x37c540(0x174),'confirmationDescription':a41_0x37c540(0x159),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x2015fc){const _0x56cb30=a41_0x37c540,_0x455b2b=getLocalServiceEntry(_0x2015fc[_0x56cb30(0x164)](_0x56cb30(0x155)));return{'method':_0x56cb30(0x17b),'url':getServiceRegistryPath(),'body':{'service':_0x2015fc[_0x56cb30(0x164)](_0x56cb30(0x155)),'found':Boolean(_0x455b2b),'version':_0x455b2b?.[_0x56cb30(0x156)],'source':_0x455b2b?.[_0x56cb30(0x158)]},'description':_0x56cb30(0x150)};},async 'execute'(_0x20beae){const _0x582169=a41_0x37c540,_0x35679f=removeServiceManifest(_0x20beae[_0x582169(0x164)]('service'));return{'ok':!![],'data':{'registryPath':_0x35679f[_0x582169(0x188)],'serviceCount':_0x35679f[_0x582169(0x17c)],'service':summarizeService(_0x35679f[_0x582169(0x16a)])},'message':'Removed\x20service\x20'+_0x35679f['entry'][_0x582169(0x18a)]+'.'};}},{'service':a41_0x37c540(0x155),'command':a41_0x37c540(0x166),'description':a41_0x37c540(0x170),'risk':a41_0x37c540(0x154),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x14ba64){const _0x318325=a41_0x37c540,_0x457c3e=getLocalServiceEntry(_0x14ba64[_0x318325(0x164)](_0x318325(0x155)));if(!_0x457c3e)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x14ba64['str'](_0x318325(0x155))},'message':'Local\x20service\x20not\x20found:\x20'+_0x14ba64[_0x318325(0x164)](_0x318325(0x155))};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x457c3e),'manifest':_0x457c3e[_0x318325(0x19c)],'normalizedManifest':toPublicNormalizedServiceTree(_0x457c3e[_0x318325(0x173)])}};}}];
|
|
1
|
+
const a61_0x2aae0a=a61_0x2d1a;(function(_0x1f89f4,_0x27524f){const _0x281690=a61_0x2d1a,_0x3d91fb=_0x1f89f4();while(!![]){try{const _0x41f152=parseInt(_0x281690(0x1b7))/0x1*(-parseInt(_0x281690(0x186))/0x2)+-parseInt(_0x281690(0x181))/0x3*(parseInt(_0x281690(0x196))/0x4)+parseInt(_0x281690(0x185))/0x5*(parseInt(_0x281690(0x1b4))/0x6)+-parseInt(_0x281690(0x17c))/0x7+parseInt(_0x281690(0x1b2))/0x8+-parseInt(_0x281690(0x1b3))/0x9*(-parseInt(_0x281690(0x188))/0xa)+parseInt(_0x281690(0x173))/0xb;if(_0x41f152===_0x27524f)break;else _0x3d91fb['push'](_0x3d91fb['shift']());}catch(_0x2bb657){_0x3d91fb['push'](_0x3d91fb['shift']());}}}(a61_0x3276,0x3f274));import{exportServiceManifest,formatValidationFailure,getLocalServiceEntry,getServiceRegistryPath,importServiceManifest,listLocalServices,loadServiceManifestFromFile,removeServiceManifest}from'../../commands/service/registry.js';function a61_0x2d1a(_0x2145a9,_0x4d9ef0){_0x2145a9=_0x2145a9-0x16e;const _0x3276af=a61_0x3276();let _0x2d1abc=_0x3276af[_0x2145a9];return _0x2d1abc;}function a61_0x3276(){const _0xe1d3cc=['hash','service','manifest','length','180300FfKfRq','Imported\x20','str','Preview\x20Service\x20Tree\x20export\x20from\x20~/.lovrabet/service.json','entry','entries','Exported\x20service\x20','list','Local\x20service\x20code,\x20for\x20example\x20crm','description','Show\x20a\x20locally\x20imported\x20Service\x20Tree\x20manifest','read','import','importedAt','write','将把指定服务的本地\x20Service\x20Tree\x20清单写入\x20JSON\x20文件;目标位置已有文件时可能被覆盖。确认界面不会展示本地文件路径。','cliPath','将\x20Service\x20Tree\x20清单导入本地运行态注册表','Service\x20registry\x20validation\x20passed.','kind','map','export','registryIndex','required','lower\x20kebab-case\x20service\x20code','normalizedManifest','manifests','warnings','678936iayxaF','1293687AKAeHk','24IUelBJ','\x20service(s),\x20updated\x20','version','1rwXkaV','Preview\x20Service\x20Tree\x20import\x20into\x20~/.lovrabet/service.json','serviceCount','name','Service\x20manifest\x20validation\x20passed.','string','4082903ciTAsl','commands','errors','registryPath','将读取指定清单并写入本地\x20Service\x20Tree\x20注册表;相同服务编码的现有清单会被更新。确认界面不会展示本地文件路径。','source','remove','Imported','file','994329zpJMuC','registryServiceCode','target','type','report','33kXCXSv','filePath','risk','serviceCode','602655Ejrhli','370718XXFoxj','imported','10ZFZIvA','将本地\x20Service\x20Tree\x20清单导出为\x20JSON\x20文件','Validate\x20a\x20Service\x20Tree\x20JSON\x20manifest','Removed\x20service\x20','updated','Updated','WRITE','reduce','cliName','replaced'];a61_0x3276=function(){return _0xe1d3cc;};return a61_0x3276();}import{toPublicNormalizedServiceTree,toPublicServiceTreeTarget}from'../../commands/service/function-name-adapter.js';const FILE_FLAG={'name':a61_0x2aae0a(0x17b),'type':a61_0x2aae0a(0x172),'required':!![],'description':'Service\x20Tree\x20manifest\x20file\x20path'},SERVICE_FLAG={'name':'service','type':a61_0x2aae0a(0x172),'required':!![],'description':a61_0x2aae0a(0x19e),'pattern':{'regex':/^[a-z][a-z0-9-]*$/,'description':a61_0x2aae0a(0x1ae)}};function summarizeService(_0x3075b5){const _0x57a4fc=a61_0x2aae0a;return{'serviceCode':_0x3075b5[_0x57a4fc(0x184)],'name':_0x3075b5[_0x57a4fc(0x1af)]['service'][_0x57a4fc(0x170)],'version':_0x3075b5[_0x57a4fc(0x1b6)],'importedAt':_0x3075b5[_0x57a4fc(0x1a3)],'source':_0x3075b5[_0x57a4fc(0x178)],'commandCount':_0x3075b5['normalizedManifest'][_0x57a4fc(0x174)][_0x57a4fc(0x195)],'commands':_0x3075b5[_0x57a4fc(0x1af)][_0x57a4fc(0x174)][_0x57a4fc(0x1aa)](_0x4fb204=>({'path':_0x4fb204[_0x57a4fc(0x1a6)],'description':_0x4fb204[_0x57a4fc(0x19f)],'risk':_0x4fb204[_0x57a4fc(0x183)],'target':toPublicServiceTreeTarget(_0x4fb204[_0x57a4fc(0x17e)]),'flags':_0x4fb204['flags'][_0x57a4fc(0x1aa)](_0x4f8924=>({'name':_0x4f8924[_0x57a4fc(0x170)],'cliName':_0x4f8924[_0x57a4fc(0x190)],'type':_0x4f8924[_0x57a4fc(0x17f)],'required':_0x4f8924[_0x57a4fc(0x1ad)]===!![]}))}))};}function summarizeLoadedManifest(_0xbcb2a1){const _0x5e4af=a61_0x2aae0a;return{'service':_0xbcb2a1[_0x5e4af(0x1af)]?.[_0x5e4af(0x193)],'version':_0xbcb2a1[_0x5e4af(0x1af)]?.[_0x5e4af(0x1b6)],'commandCount':_0xbcb2a1['normalizedManifest']?.[_0x5e4af(0x174)][_0x5e4af(0x195)]??0x0,'commands':_0xbcb2a1[_0x5e4af(0x1af)]?.[_0x5e4af(0x174)][_0x5e4af(0x1aa)](_0x41fbd7=>({'path':_0x41fbd7['cliPath'],'risk':_0x41fbd7['risk'],'target':toPublicServiceTreeTarget(_0x41fbd7[_0x5e4af(0x17e)])}))??[],'registryIndex':_0xbcb2a1[_0x5e4af(0x1ac)],'registryServiceCode':_0xbcb2a1[_0x5e4af(0x17d)],'errors':_0xbcb2a1[_0x5e4af(0x180)][_0x5e4af(0x175)],'warnings':_0xbcb2a1[_0x5e4af(0x180)]['warnings']};}export const serviceDefinitions=[{'service':a61_0x2aae0a(0x193),'command':'validate','description':a61_0x2aae0a(0x18a),'risk':a61_0x2aae0a(0x1a1),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'execute'(_0x54ac8e){const _0x13e7eb=a61_0x2aae0a,_0x9dc0a0=loadServiceManifestFromFile(_0x54ac8e[_0x13e7eb(0x198)](_0x13e7eb(0x17b)));if(!_0x9dc0a0[_0x13e7eb(0x180)]['ok'])return{'ok':![],'data':{'file':_0x9dc0a0[_0x13e7eb(0x182)],'hash':_0x9dc0a0[_0x13e7eb(0x192)],'kind':_0x9dc0a0[_0x13e7eb(0x1a9)],'serviceCount':_0x9dc0a0['manifests'][_0x13e7eb(0x195)],'services':_0x9dc0a0[_0x13e7eb(0x1b0)][_0x13e7eb(0x1aa)](summarizeLoadedManifest),'errors':_0x9dc0a0[_0x13e7eb(0x180)][_0x13e7eb(0x175)],'warnings':_0x9dc0a0[_0x13e7eb(0x180)][_0x13e7eb(0x1b1)]},'message':formatValidationFailure(_0x9dc0a0[_0x13e7eb(0x180)])};if(_0x9dc0a0[_0x13e7eb(0x1a9)]==='registry'||_0x9dc0a0[_0x13e7eb(0x1b0)]['length']!==0x1)return{'ok':!![],'data':{'file':_0x9dc0a0[_0x13e7eb(0x182)],'hash':_0x9dc0a0[_0x13e7eb(0x192)],'kind':_0x9dc0a0[_0x13e7eb(0x1a9)],'serviceCount':_0x9dc0a0[_0x13e7eb(0x1b0)][_0x13e7eb(0x195)],'commandCount':_0x9dc0a0[_0x13e7eb(0x1b0)][_0x13e7eb(0x18f)]((_0x1c395e,_0x5815c4)=>_0x1c395e+(_0x5815c4['normalizedManifest']?.[_0x13e7eb(0x174)][_0x13e7eb(0x195)]??0x0),0x0),'services':_0x9dc0a0['manifests']['map'](summarizeLoadedManifest),'warnings':_0x9dc0a0[_0x13e7eb(0x180)][_0x13e7eb(0x1b1)]},'message':_0x13e7eb(0x1a8)};return{'ok':!![],'data':{'file':_0x9dc0a0['filePath'],'hash':_0x9dc0a0[_0x13e7eb(0x192)],'kind':_0x9dc0a0[_0x13e7eb(0x1a9)],'service':_0x9dc0a0[_0x13e7eb(0x1af)]?.['service'],'version':_0x9dc0a0['normalizedManifest']?.[_0x13e7eb(0x1b6)],'commandCount':_0x9dc0a0[_0x13e7eb(0x1af)]?.[_0x13e7eb(0x174)][_0x13e7eb(0x195)]??0x0,'commands':_0x9dc0a0['normalizedManifest']?.[_0x13e7eb(0x174)][_0x13e7eb(0x1aa)](_0x333121=>({'path':_0x333121['cliPath'],'risk':_0x333121[_0x13e7eb(0x183)],'target':toPublicServiceTreeTarget(_0x333121[_0x13e7eb(0x17e)])})),'warnings':_0x9dc0a0[_0x13e7eb(0x180)][_0x13e7eb(0x1b1)]},'message':_0x13e7eb(0x171)};}},{'service':a61_0x2aae0a(0x193),'command':a61_0x2aae0a(0x1a2),'description':a61_0x2aae0a(0x1a7),'risk':a61_0x2aae0a(0x1a4),'confirmationDescription':a61_0x2aae0a(0x177),'requiresAuth':![],'requiresAppCode':![],'flags':[FILE_FLAG],async 'dryRun'(_0x117043){const _0x3befa8=a61_0x2aae0a,_0x572bd8=loadServiceManifestFromFile(_0x117043[_0x3befa8(0x198)](_0x3befa8(0x17b)));return{'method':_0x3befa8(0x18e),'url':getServiceRegistryPath(),'body':{'file':_0x572bd8[_0x3befa8(0x182)],'hash':_0x572bd8[_0x3befa8(0x192)],'kind':_0x572bd8[_0x3befa8(0x1a9)],'ok':_0x572bd8[_0x3befa8(0x180)]['ok'],'service':_0x572bd8[_0x3befa8(0x1af)]?.[_0x3befa8(0x193)],'version':_0x572bd8[_0x3befa8(0x1af)]?.[_0x3befa8(0x1b6)],'serviceCount':_0x572bd8[_0x3befa8(0x1b0)][_0x3befa8(0x195)],'services':_0x572bd8['manifests'][_0x3befa8(0x1aa)](_0x37cd34=>({'service':_0x37cd34[_0x3befa8(0x1af)]?.[_0x3befa8(0x193)],'version':_0x37cd34[_0x3befa8(0x1af)]?.['version'],'commandCount':_0x37cd34[_0x3befa8(0x1af)]?.[_0x3befa8(0x174)][_0x3befa8(0x195)]??0x0,'errors':_0x37cd34[_0x3befa8(0x180)][_0x3befa8(0x175)]})),'errors':_0x572bd8[_0x3befa8(0x180)][_0x3befa8(0x175)],'commandCount':_0x572bd8['normalizedManifest']?.['commands'][_0x3befa8(0x195)]??0x0},'description':_0x3befa8(0x16e)};},async 'execute'(_0x4e2697){const _0x43c868=a61_0x2aae0a,_0x54ca4c=importServiceManifest(_0x4e2697[_0x43c868(0x198)](_0x43c868(0x17b)));if(_0x54ca4c[_0x43c868(0x19b)]['length']!==0x1)return{'ok':!![],'data':{'registryPath':_0x54ca4c[_0x43c868(0x176)],'imported':_0x54ca4c['imported'],'updated':_0x54ca4c['updated'],'serviceCount':_0x54ca4c['serviceCount'],'services':_0x54ca4c[_0x43c868(0x19b)][_0x43c868(0x1aa)](summarizeService)},'message':_0x43c868(0x197)+_0x54ca4c[_0x43c868(0x187)]+_0x43c868(0x1b5)+_0x54ca4c[_0x43c868(0x18c)]+'\x20service(s).'};return{'ok':!![],'data':{'registryPath':_0x54ca4c[_0x43c868(0x176)],'replaced':_0x54ca4c['replaced'],'imported':_0x54ca4c[_0x43c868(0x187)],'updated':_0x54ca4c[_0x43c868(0x18c)],'serviceCount':_0x54ca4c[_0x43c868(0x16f)],'service':summarizeService(_0x54ca4c['entry'])},'message':(_0x54ca4c[_0x43c868(0x191)]?_0x43c868(0x18d):_0x43c868(0x17a))+'\x20service\x20'+_0x54ca4c['entry'][_0x43c868(0x184)]+'.'};}},{'service':'service','command':a61_0x2aae0a(0x1ab),'description':a61_0x2aae0a(0x189),'risk':a61_0x2aae0a(0x1a4),'confirmationDescription':a61_0x2aae0a(0x1a5),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG,FILE_FLAG],async 'dryRun'(_0x32220b){const _0xb5bc89=a61_0x2aae0a,_0x21a57e=getLocalServiceEntry(_0x32220b[_0xb5bc89(0x198)](_0xb5bc89(0x193)));return{'method':'WRITE','url':_0x32220b[_0xb5bc89(0x198)](_0xb5bc89(0x17b)),'body':{'service':_0x32220b[_0xb5bc89(0x198)](_0xb5bc89(0x193)),'found':Boolean(_0x21a57e),'version':_0x21a57e?.['version'],'source':_0x21a57e?.['source']},'description':_0xb5bc89(0x199)};},async 'execute'(_0x3eb64b){const _0x4d9069=a61_0x2aae0a,_0x911c05=exportServiceManifest(_0x3eb64b['str']('service'),_0x3eb64b['str'](_0x4d9069(0x17b)));return{'ok':!![],'data':{'registryPath':_0x911c05[_0x4d9069(0x176)],'file':_0x911c05['filePath'],'service':summarizeService(_0x911c05[_0x4d9069(0x19a)])},'message':_0x4d9069(0x19c)+_0x911c05[_0x4d9069(0x19a)]['serviceCode']+'.'};}},{'service':a61_0x2aae0a(0x193),'command':a61_0x2aae0a(0x19d),'description':'List\x20locally\x20imported\x20Service\x20Tree\x20manifests','risk':a61_0x2aae0a(0x1a1),'requiresAuth':![],'requiresAppCode':![],'flags':[],async 'execute'(){const _0x3ced05=a61_0x2aae0a,_0x571bf8=listLocalServices();return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'total':_0x571bf8[_0x3ced05(0x195)],'services':_0x571bf8[_0x3ced05(0x1aa)](summarizeService)}};}},{'service':a61_0x2aae0a(0x193),'command':a61_0x2aae0a(0x179),'description':'从本地运行态注册表移除\x20Service\x20Tree\x20清单','risk':a61_0x2aae0a(0x1a4),'confirmationDescription':'将从本地\x20Service\x20Tree\x20注册表中移除指定服务清单;之后该清单提供的动态命令将不可用。','requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'dryRun'(_0x5ab8d8){const _0x290a62=a61_0x2aae0a,_0x15bff7=getLocalServiceEntry(_0x5ab8d8[_0x290a62(0x198)](_0x290a62(0x193)));return{'method':_0x290a62(0x18e),'url':getServiceRegistryPath(),'body':{'service':_0x5ab8d8[_0x290a62(0x198)](_0x290a62(0x193)),'found':Boolean(_0x15bff7),'version':_0x15bff7?.['version'],'source':_0x15bff7?.[_0x290a62(0x178)]},'description':'Preview\x20Service\x20Tree\x20removal\x20from\x20~/.lovrabet/service.json'};},async 'execute'(_0x181a3e){const _0x2f237=a61_0x2aae0a,_0x52f9b7=removeServiceManifest(_0x181a3e[_0x2f237(0x198)](_0x2f237(0x193)));return{'ok':!![],'data':{'registryPath':_0x52f9b7[_0x2f237(0x176)],'serviceCount':_0x52f9b7[_0x2f237(0x16f)],'service':summarizeService(_0x52f9b7['entry'])},'message':_0x2f237(0x18b)+_0x52f9b7[_0x2f237(0x19a)][_0x2f237(0x184)]+'.'};}},{'service':a61_0x2aae0a(0x193),'command':'detail','description':a61_0x2aae0a(0x1a0),'risk':a61_0x2aae0a(0x1a1),'requiresAuth':![],'requiresAppCode':![],'flags':[SERVICE_FLAG],async 'execute'(_0x9bbf6c){const _0xf6e3d4=a61_0x2aae0a,_0x15712e=getLocalServiceEntry(_0x9bbf6c[_0xf6e3d4(0x198)]('service'));if(!_0x15712e)return{'ok':![],'data':{'registryPath':getServiceRegistryPath(),'service':_0x9bbf6c['str'](_0xf6e3d4(0x193))},'message':'Local\x20service\x20not\x20found:\x20'+_0x9bbf6c['str']('service')};return{'ok':!![],'data':{'registryPath':getServiceRegistryPath(),'service':summarizeService(_0x15712e),'manifest':_0x15712e[_0xf6e3d4(0x194)],'normalizedManifest':toPublicNormalizedServiceTree(_0x15712e['normalizedManifest'])}};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a42_0x466574=a42_0x38dc;(function(_0x561963,_0x2e9016){const _0x5b781a=a42_0x38dc,_0x38b85f=_0x561963();while(!![]){try{const _0x56e7a0=parseInt(_0x5b781a(0x121))/0x1+parseInt(_0x5b781a(0x122))/0x2+parseInt(_0x5b781a(0xf7))/0x3*(parseInt(_0x5b781a(0xf9))/0x4)+parseInt(_0x5b781a(0x10e))/0x5*(-parseInt(_0x5b781a(0x11a))/0x6)+parseInt(_0x5b781a(0xd5))/0x7+parseInt(_0x5b781a(0x104))/0x8+-parseInt(_0x5b781a(0xf8))/0x9;if(_0x56e7a0===_0x2e9016)break;else _0x38b85f['push'](_0x38b85f['shift']());}catch(_0x502580){_0x38b85f['push'](_0x38b85f['shift']());}}}(a42_0x43bb,0xe4867));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';function a42_0x38dc(_0x4dcfe2,_0x192f7c){_0x4dcfe2=_0x4dcfe2-0xd5;const _0x43bb33=a42_0x43bb();let _0x38dc52=_0x43bb33[_0x4dcfe2];return _0x38dc52;}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=a42_0x466574(0xed);export function getServiceRegistryPath(_0x35c5a7={}){const _0x1fc1a4=a42_0x466574;return resolve(_0x35c5a7[_0x1fc1a4(0x105)]??homedir(),PRODUCT_CONFIG[_0x1fc1a4(0xff)],SERVICE_REGISTRY_FILE_NAME);}function a42_0x43bb(){const _0x44716f=['19989eCwlYL','42147306keLfHE','820wlLbJw','invalid','localeCompare','].manifest.','target','report','homeDirName','validation','map','errors','description','9388040sGdWxN','homeDir','warnings','version','digest','flatMap','now','startsWith','commands','string','414590OjwiOb','length','Remove\x20or\x20migrate\x20','stringify','hex','filePath','update','trim','join','service','registryIndex','Unsupported\x20schemaVersion:\x20','30tVFQmx','object','parse','findIndex','empty','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','isArray','1305435IFVcjv','3402072UdkfQW','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','sha256','utf8','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','Service\x20manifest\x20validation\x20failed:\x0a','manifest','manifests','schemaVersion','3414404qdBytL','sourceHash','updatedAt','Cannot\x20write\x20service\x20registry:\x20','find','services','push','code','risk','Local\x20service\x20not\x20found:\x20','CliError','missing','sort','serviceCode','Invalid\x20service\x20manifest\x20JSON:\x20','bff\x20target\x20requires\x20functionName.','toISOString','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','command','message','slice','normalizedManifest','cliPath','].manifest','service.json','path','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','name','$.services[','source','kind','.tmp','services\x20must\x20be\x20an\x20array','file'];a42_0x43bb=function(){return _0x44716f;};return a42_0x43bb();}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x1da0e2={}){const _0x36540a=a42_0x466574,_0x291464=getServiceRegistryPath(_0x1da0e2);if(!existsSync(_0x291464))return emptyServiceRegistry();try{const _0x183746=readFileSync(_0x291464,_0x36540a(0x125));if(!_0x183746['trim']())return emptyServiceRegistry();const _0x2a5f53=JSON[_0x36540a(0x11c)](_0x183746);if(_0x2a5f53[_0x36540a(0x12a)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x36540a(0x100)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x2a5f53[_0x36540a(0x12a)]),_0x36540a(0x110)+_0x291464+'.');if(!Array[_0x36540a(0x120)](_0x2a5f53['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2a5f53[_0x36540a(0xd7)],'services':_0x2a5f53[_0x36540a(0xda)]};}catch(_0x5180f9){if(_0x5180f9 instanceof Error&&_0x5180f9[_0x36540a(0xf0)]===_0x36540a(0xdf))throw _0x5180f9;throw CliErrors[_0x36540a(0x100)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x291464,_0x36540a(0x11f));}}export function writeServiceRegistry(_0x58a7b1,_0x50b676={}){const _0x4c065e=a42_0x466574,_0x666fdd=getServiceRegistryPath(_0x50b676),_0x17b183=dirname(_0x666fdd);!existsSync(_0x17b183)&&mkdirSync(_0x17b183,{'recursive':!![]});const _0x44f467=_0x666fdd+_0x4c065e(0xf4);try{writeFileSync(_0x44f467,JSON[_0x4c065e(0x111)](_0x58a7b1,null,0x2)+'\x0a',{'encoding':_0x4c065e(0x125),'mode':0x180}),renameSync(_0x44f467,_0x666fdd);}catch(_0x5cdfa8){try{unlinkSync(_0x44f467);}catch{}if(_0x5cdfa8?.[_0x4c065e(0xdc)]==='ENOENT')throw CliErrors[_0x4c065e(0x100)](_0x4c065e(0xd8)+_0x666fdd);throw _0x5cdfa8;}return _0x666fdd;}export function loadServiceManifestFromFile(_0x1aa277){const _0x8b1590=a42_0x466574,_0x42e2a9=resolve(_0x1aa277);if(!existsSync(_0x42e2a9))throw CliErrors['validation']('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x1aa277);let _0x1be86c;const _0x43aba3=readFileSync(_0x42e2a9,'utf8');try{_0x1be86c=JSON[_0x8b1590(0x11c)](_0x43aba3);}catch{throw CliErrors[_0x8b1590(0x100)](_0x8b1590(0xe3)+_0x1aa277,_0x8b1590(0x126));}const _0x3a564e=sha256(_0x43aba3),_0x5dc159=extractLoadedServiceManifests(_0x1be86c,_0x3a564e),_0x393589=aggregateValidationReports(_0x5dc159),_0x45ae99=_0x5dc159[0x0];return{'filePath':_0x42e2a9,'hash':_0x3a564e,'kind':isServiceRegistryLike(_0x1be86c)?'registry':'manifest','manifest':_0x45ae99?.['manifest']??_0x1be86c,'report':_0x393589,'normalizedManifest':_0x5dc159['length']===0x1?_0x45ae99?.[_0x8b1590(0xea)]:undefined,'manifests':_0x5dc159};}export function importServiceManifest(_0x3ee132,_0x4d9ca6={}){const _0x12af5e=a42_0x466574,_0x39b0d6=loadServiceManifestFromFile(_0x3ee132);if(!_0x39b0d6[_0x12af5e(0xfe)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x39b0d6['report']),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x39b0d6[_0x12af5e(0x129)][_0x12af5e(0x10f)]===0x0)throw CliErrors[_0x12af5e(0x100)](_0x12af5e(0xe6),_0x12af5e(0xef));const _0x4d7393=readServiceRegistry(_0x4d9ca6),_0x2d2f4d=(_0x4d9ca6['now']??(()=>new Date()))()[_0x12af5e(0xe5)](),_0x3b9d3c=[];let _0x4e5c6d=0x0,_0x525c6e=0x0;for(const _0x2740bf of _0x39b0d6['manifests']){if(!_0x2740bf['normalizedManifest'])continue;const _0x4892d9=_0x2740bf[_0x12af5e(0xea)]['service'][_0x12af5e(0xdc)],_0x136e07={'serviceCode':_0x4892d9,'version':_0x2740bf[_0x12af5e(0xea)][_0x12af5e(0x107)],'importedAt':_0x2d2f4d,'source':{'type':_0x12af5e(0xf6),'path':_0x39b0d6[_0x12af5e(0x113)],'hash':_0x2740bf[_0x12af5e(0xd6)]},'manifest':_0x2740bf[_0x12af5e(0x128)],'normalizedManifest':_0x2740bf[_0x12af5e(0xea)]},_0x576043=_0x4d7393['services'][_0x12af5e(0x11d)](_0x2b9978=>_0x2b9978[_0x12af5e(0xe2)]===_0x4892d9);_0x576043>=0x0?(_0x4d7393['services'][_0x576043]=_0x136e07,_0x525c6e++):(_0x4d7393[_0x12af5e(0xda)][_0x12af5e(0xdb)](_0x136e07),_0x4e5c6d++),_0x3b9d3c[_0x12af5e(0xdb)](_0x136e07);}_0x4d7393[_0x12af5e(0xda)][_0x12af5e(0xe1)]((_0x40ce6d,_0x3f4d41)=>_0x40ce6d[_0x12af5e(0xe2)][_0x12af5e(0xfb)](_0x3f4d41[_0x12af5e(0xe2)])),_0x4d7393['updatedAt']=_0x2d2f4d;const _0x351fce=writeServiceRegistry(_0x4d7393,_0x4d9ca6);return{'registryPath':_0x351fce,'entry':_0x3b9d3c[0x0],'replaced':_0x3b9d3c['length']===0x1?_0x525c6e===0x1:_0x525c6e>0x0,'entries':_0x3b9d3c,'imported':_0x4e5c6d,'updated':_0x525c6e,'serviceCount':_0x4d7393['services'][_0x12af5e(0x10f)]};}export function exportServiceManifest(_0x3e195d,_0x10ab75,_0x1837f5={}){const _0x540cfc=a42_0x466574,_0x1a63dd=getServiceRegistryPath(_0x1837f5),_0x5a5995=getLocalServiceEntry(_0x3e195d,_0x1837f5);if(!_0x5a5995)throw CliErrors[_0x540cfc(0x100)](_0x540cfc(0xde)+_0x3e195d,_0x540cfc(0x123));const _0x55d530=resolve(_0x10ab75),_0x62b057=dirname(_0x55d530);return!existsSync(_0x62b057)&&mkdirSync(_0x62b057,{'recursive':!![]}),writeFileSync(_0x55d530,JSON[_0x540cfc(0x111)](_0x5a5995['manifest'],null,0x2)+'\x0a',{'encoding':_0x540cfc(0x125),'mode':0x180}),{'registryPath':_0x1a63dd,'filePath':_0x55d530,'entry':_0x5a5995};}export function removeServiceManifest(_0x5cb4ae,_0x3ea6c8={}){const _0x2c61a6=a42_0x466574,_0x6c6191=readServiceRegistry(_0x3ea6c8),_0x6b8fa1=_0x5cb4ae[_0x2c61a6(0x115)](),_0x1966b8=_0x6c6191[_0x2c61a6(0xda)][_0x2c61a6(0x11d)](_0x4e5cc5=>_0x4e5cc5['serviceCode']===_0x6b8fa1);if(_0x1966b8<0x0)throw CliErrors[_0x2c61a6(0x100)](_0x2c61a6(0xde)+_0x6b8fa1,_0x2c61a6(0x123));const [_0x3a0d40]=_0x6c6191[_0x2c61a6(0xda)]['splice'](_0x1966b8,0x1),_0x569d36=(_0x3ea6c8[_0x2c61a6(0x10a)]??(()=>new Date()))()['toISOString']();_0x6c6191[_0x2c61a6(0xd7)]=_0x569d36;const _0x5764c0=writeServiceRegistry(_0x6c6191,_0x3ea6c8);return{'registryPath':_0x5764c0,'entry':_0x3a0d40,'serviceCount':_0x6c6191[_0x2c61a6(0xda)][_0x2c61a6(0x10f)]};}export function listLocalServices(_0x23d9ab={}){const _0x48632e=a42_0x466574;return readServiceRegistry(_0x23d9ab)[_0x48632e(0xda)];}export function getLocalServiceEntry(_0xe6c076,_0x59f49b={}){const _0x361778=a42_0x466574;return readServiceRegistry(_0x59f49b)[_0x361778(0xda)][_0x361778(0xd9)](_0x5c4891=>_0x5c4891[_0x361778(0xe2)]===_0xe6c076['trim']());}export function listLocalServiceTrees(_0x1402e4={}){const _0x5b3adf=a42_0x466574;return readServiceRegistry(_0x1402e4)[_0x5b3adf(0xda)][_0x5b3adf(0x101)](_0x1e5b02=>_0x1e5b02['normalizedManifest']);}export function inspectServiceRegistry(_0x245f02={}){const _0x3fc4ee=a42_0x466574,_0x8c402f=getServiceRegistryPath(_0x245f02);if(!existsSync(_0x8c402f))return emptyServiceRegistryInspection(_0x8c402f,_0x3fc4ee(0xe0),![]);try{const _0x336bd1=readFileSync(_0x8c402f,_0x3fc4ee(0x125));if(!_0x336bd1['trim']())return emptyServiceRegistryInspection(_0x8c402f,_0x3fc4ee(0x11e),!![]);const _0x4767d9=JSON['parse'](_0x336bd1);if(_0x4767d9[_0x3fc4ee(0x12a)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x8c402f,_0x3fc4ee(0xfa),!![]),'schemaVersion':_0x4767d9[_0x3fc4ee(0x12a)],'message':_0x3fc4ee(0x119)+String(_0x4767d9[_0x3fc4ee(0x12a)])};if(!Array[_0x3fc4ee(0x120)](_0x4767d9[_0x3fc4ee(0xda)]))return{...emptyServiceRegistryInspection(_0x8c402f,_0x3fc4ee(0xfa),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4767d9[_0x3fc4ee(0xd7)],'message':_0x3fc4ee(0xf5)};const _0x418027=_0x4767d9[_0x3fc4ee(0xda)][_0x3fc4ee(0x101)](summarizeLocalServiceEntry);return{'registryPath':_0x8c402f,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x4767d9['updatedAt'],'serviceCount':_0x418027[_0x3fc4ee(0x10f)],'commandCount':_0x418027['reduce']((_0x525998,_0x4d5952)=>_0x525998+_0x4d5952['commandCount'],0x0),'services':_0x418027};}catch(_0x5bbe7a){return{...emptyServiceRegistryInspection(_0x8c402f,_0x3fc4ee(0xfa),!![]),'message':_0x5bbe7a instanceof Error?_0x5bbe7a['message']:String(_0x5bbe7a)};}}export function formatValidationFailure(_0x3b8bcd){const _0x5c42f6=a42_0x466574,_0x29bfdf=_0x3b8bcd[_0x5c42f6(0x102)][_0x5c42f6(0x101)](_0x4c6d28=>_0x4c6d28[_0x5c42f6(0xee)]+':\x20'+_0x4c6d28[_0x5c42f6(0xe8)]);return _0x5c42f6(0x127)+_0x29bfdf[_0x5c42f6(0x116)]('\x0a');}function extractLoadedServiceManifests(_0x410a19,_0x5a6454){const _0x25387b=a42_0x466574;if(!isServiceRegistryLike(_0x410a19)){const _0x128279=_0x410a19,{manifest:_0x2ecdf9,errors:_0x18c4a2}=adaptServiceTreeManifestForLegacyFramework(_0x128279),_0x61415f=validateServiceTreeManifest(_0x2ecdf9),_0x3195a0=mergeValidationErrors(_0x61415f,_0x18c4a2);return[{'manifest':_0x128279,'report':_0x3195a0,'normalizedManifest':_0x3195a0['ok']?normalizeServiceTreeManifest(_0x2ecdf9):undefined,'sourceHash':_0x5a6454}];}return _0x410a19[_0x25387b(0xda)]['map']((_0x76b96b,_0x1c841c)=>{const _0x602a5d=_0x25387b,_0x55a4ce=isObjectRecord(_0x76b96b)?_0x76b96b[_0x602a5d(0x128)]:undefined,{manifest:_0x5c8636,errors:_0x137183}=adaptServiceTreeManifestForLegacyFramework(_0x55a4ce),_0x22fd91=validateServiceTreeManifest(_0x5c8636),_0x6e207f=mergeValidationErrors(_0x22fd91,_0x137183),_0x260098=isObjectRecord(_0x76b96b)&&typeof _0x76b96b['serviceCode']===_0x602a5d(0x10d)?_0x76b96b[_0x602a5d(0xe2)]:undefined;return{'manifest':_0x55a4ce,'report':_0x6e207f,'normalizedManifest':_0x6e207f['ok']?normalizeServiceTreeManifest(_0x5c8636):undefined,'sourceHash':sha256(JSON[_0x602a5d(0x111)](_0x55a4ce,null,0x2)+'\x0a'),'registryIndex':_0x1c841c,'registryServiceCode':_0x260098};});}function mergeValidationErrors(_0x1d4f63,_0xb099d5){const _0x161f0e=a42_0x466574,_0x21bba8=_0x1d4f63[_0x161f0e(0x102)][_0x161f0e(0x101)](_0xae16b2=>_0xae16b2[_0x161f0e(0xe8)]==='bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.'?{..._0xae16b2,'message':_0x161f0e(0xe4)}:_0xae16b2),_0x46eab7=[..._0xb099d5,..._0x21bba8];return{'ok':_0x46eab7['length']===0x0,'errors':_0x46eab7,'warnings':_0x1d4f63[_0x161f0e(0x106)]};}function aggregateValidationReports(_0x292747){const _0x51de11=a42_0x466574,_0x13ca42=_0x292747['flatMap'](_0x4ef3a3=>_0x4ef3a3[_0x51de11(0x118)]===undefined?_0x4ef3a3['report'][_0x51de11(0x102)]:_0x4ef3a3[_0x51de11(0xfe)][_0x51de11(0x102)][_0x51de11(0x101)](_0x3e3aba=>({..._0x3e3aba,'path':prefixRegistryIssuePath(_0x4ef3a3['registryIndex'],_0x3e3aba[_0x51de11(0xee)])}))),_0x70544=_0x292747[_0x51de11(0x109)](_0x5dd91f=>_0x5dd91f[_0x51de11(0x118)]===undefined?_0x5dd91f['report'][_0x51de11(0x106)]:_0x5dd91f['report']['warnings'][_0x51de11(0x101)](_0x4016ae=>({..._0x4016ae,'path':prefixRegistryIssuePath(_0x5dd91f[_0x51de11(0x118)],_0x4016ae['path'])})));return{'ok':_0x13ca42[_0x51de11(0x10f)]===0x0,'errors':_0x13ca42,'warnings':_0x70544};}function prefixRegistryIssuePath(_0x540ba8,_0x22a284){const _0x51bab3=a42_0x466574;if(_0x22a284==='$')return _0x51bab3(0xf1)+_0x540ba8+_0x51bab3(0xec);if(_0x22a284[_0x51bab3(0x10b)]('$.'))return _0x51bab3(0xf1)+_0x540ba8+_0x51bab3(0xec)+_0x22a284[_0x51bab3(0xe9)](0x1);if(_0x22a284[_0x51bab3(0x10b)]('$['))return'$.services['+_0x540ba8+_0x51bab3(0xec)+_0x22a284[_0x51bab3(0xe9)](0x1);return _0x51bab3(0xf1)+_0x540ba8+_0x51bab3(0xfc)+_0x22a284;}function isServiceRegistryLike(_0x2d4d15){const _0x13b2e8=a42_0x466574;return isObjectRecord(_0x2d4d15)&&_0x2d4d15[_0x13b2e8(0x12a)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x13b2e8(0x120)](_0x2d4d15[_0x13b2e8(0xda)]);}function isObjectRecord(_0x2992d5){const _0x243700=a42_0x466574;return Boolean(_0x2992d5)&&typeof _0x2992d5===_0x243700(0x11b)&&!Array[_0x243700(0x120)](_0x2992d5);}function emptyServiceRegistryInspection(_0x2202eb,_0x67a2ee,_0x3f2bd0){return{'registryPath':_0x2202eb,'exists':_0x3f2bd0,'status':_0x67a2ee,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1269ee){const _0x3f246f=a42_0x466574,_0x342f81=_0x1269ee[_0x3f246f(0xea)],_0x321479=_0x342f81[_0x3f246f(0x10c)]['map'](_0x2b74c2=>({'path':_0x2b74c2[_0x3f246f(0xeb)],'description':_0x2b74c2[_0x3f246f(0x103)],'risk':_0x2b74c2[_0x3f246f(0xdd)],'targetKind':_0x2b74c2[_0x3f246f(0xfd)][_0x3f246f(0xf3)],'targetCommand':_0x2b74c2[_0x3f246f(0xfd)][_0x3f246f(0xe7)]}));return{'serviceCode':_0x1269ee[_0x3f246f(0xe2)],'name':_0x342f81[_0x3f246f(0x117)]['name'],'description':_0x342f81[_0x3f246f(0x117)][_0x3f246f(0x103)],'version':_0x1269ee[_0x3f246f(0x107)],'importedAt':_0x1269ee['importedAt'],'source':_0x1269ee[_0x3f246f(0xf2)],'commandCount':_0x321479[_0x3f246f(0x10f)],'commands':_0x321479};}function sha256(_0xc86d80){const _0x520232=a42_0x466574;return createHash(_0x520232(0x124))[_0x520232(0x114)](_0xc86d80)[_0x520232(0x108)](_0x520232(0x112));}
|
|
1
|
+
const a62_0x15322d=a62_0x43bf;(function(_0x31f68a,_0x30b0dc){const _0x3b0b5f=a62_0x43bf,_0x1f6601=_0x31f68a();while(!![]){try{const _0x428efb=-parseInt(_0x3b0b5f(0x184))/0x1*(parseInt(_0x3b0b5f(0x1be))/0x2)+-parseInt(_0x3b0b5f(0x1ad))/0x3+-parseInt(_0x3b0b5f(0x18b))/0x4+-parseInt(_0x3b0b5f(0x186))/0x5*(parseInt(_0x3b0b5f(0x1d4))/0x6)+parseInt(_0x3b0b5f(0x1a7))/0x7+-parseInt(_0x3b0b5f(0x197))/0x8+parseInt(_0x3b0b5f(0x182))/0x9;if(_0x428efb===_0x30b0dc)break;else _0x1f6601['push'](_0x1f6601['shift']());}catch(_0x158111){_0x1f6601['push'](_0x1f6601['shift']());}}}(a62_0x538b,0xbe06b));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=a62_0x15322d(0x1bb);export function getServiceRegistryPath(_0x50b32b={}){const _0x482cb4=a62_0x15322d;return resolve(_0x50b32b[_0x482cb4(0x181)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x5e8e71={}){const _0x4f2d04=a62_0x15322d,_0x4b2ead=getServiceRegistryPath(_0x5e8e71);if(!existsSync(_0x4b2ead))return emptyServiceRegistry();try{const _0x5ce480=readFileSync(_0x4b2ead,'utf8');if(!_0x5ce480[_0x4f2d04(0x1b9)]())return emptyServiceRegistry();const _0x123ff2=JSON[_0x4f2d04(0x19e)](_0x5ce480);if(_0x123ff2[_0x4f2d04(0x1d1)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x4f2d04(0x1a3)](_0x4f2d04(0x1c4)+String(_0x123ff2[_0x4f2d04(0x1d1)]),_0x4f2d04(0x19b)+_0x4b2ead+'.');if(!Array[_0x4f2d04(0x1a2)](_0x123ff2[_0x4f2d04(0x1b1)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x123ff2['updatedAt'],'services':_0x123ff2['services']};}catch(_0x427fae){if(_0x427fae instanceof Error&&_0x427fae[_0x4f2d04(0x1d6)]==='CliError')throw _0x427fae;throw CliErrors['validation'](_0x4f2d04(0x183)+_0x4b2ead,_0x4f2d04(0x1b4));}}export function writeServiceRegistry(_0x13b309,_0x16315c={}){const _0x4222e1=a62_0x15322d,_0x68c09e=getServiceRegistryPath(_0x16315c),_0x407938=dirname(_0x68c09e);!existsSync(_0x407938)&&mkdirSync(_0x407938,{'recursive':!![]});const _0x49b776=_0x68c09e+_0x4222e1(0x18f);try{writeFileSync(_0x49b776,JSON['stringify'](_0x13b309,null,0x2)+'\x0a',{'encoding':_0x4222e1(0x1c2),'mode':0x180}),renameSync(_0x49b776,_0x68c09e);}catch(_0x4f3cc6){try{unlinkSync(_0x49b776);}catch{}if(_0x4f3cc6?.['code']===_0x4222e1(0x1ab))throw CliErrors[_0x4222e1(0x1a3)](_0x4222e1(0x1cf)+_0x68c09e);throw _0x4f3cc6;}return _0x68c09e;}export function loadServiceManifestFromFile(_0x17c91e){const _0x3cb7e4=a62_0x15322d,_0x4cd426=resolve(_0x17c91e);if(!existsSync(_0x4cd426))throw CliErrors[_0x3cb7e4(0x1a3)](_0x3cb7e4(0x1b8)+_0x17c91e);let _0x11b215;const _0x49aab6=readFileSync(_0x4cd426,_0x3cb7e4(0x1c2));try{_0x11b215=JSON[_0x3cb7e4(0x19e)](_0x49aab6);}catch{throw CliErrors['validation'](_0x3cb7e4(0x18e)+_0x17c91e,_0x3cb7e4(0x1bf));}const _0x1fb186=sha256(_0x49aab6),_0x2565ec=extractLoadedServiceManifests(_0x11b215,_0x1fb186),_0x4c5813=aggregateValidationReports(_0x2565ec),_0x34c608=_0x2565ec[0x0];return{'filePath':_0x4cd426,'hash':_0x1fb186,'kind':isServiceRegistryLike(_0x11b215)?_0x3cb7e4(0x1ce):_0x3cb7e4(0x1d0),'manifest':_0x34c608?.[_0x3cb7e4(0x1d0)]??_0x11b215,'report':_0x4c5813,'normalizedManifest':_0x2565ec[_0x3cb7e4(0x19c)]===0x1?_0x34c608?.[_0x3cb7e4(0x1d5)]:undefined,'manifests':_0x2565ec};}export function importServiceManifest(_0x27e2e5,_0x3441ad={}){const _0xf79a34=a62_0x15322d,_0x26324d=loadServiceManifestFromFile(_0x27e2e5);if(!_0x26324d['report']['ok'])throw CliErrors[_0xf79a34(0x1a3)](formatValidationFailure(_0x26324d[_0xf79a34(0x199)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x26324d[_0xf79a34(0x1c5)]['length']===0x0)throw CliErrors[_0xf79a34(0x1a3)](_0xf79a34(0x1bd),_0xf79a34(0x195));const _0x3b7f94=readServiceRegistry(_0x3441ad),_0x289eb7=(_0x3441ad[_0xf79a34(0x1a0)]??(()=>new Date()))()[_0xf79a34(0x1a4)](),_0x37e58a=[];let _0x220f04=0x0,_0x5108d2=0x0;for(const _0x204505 of _0x26324d['manifests']){if(!_0x204505[_0xf79a34(0x1d5)])continue;const _0x16290c=_0x204505[_0xf79a34(0x1d5)]['service']['code'],_0x38e21a={'serviceCode':_0x16290c,'version':_0x204505[_0xf79a34(0x1d5)][_0xf79a34(0x1c0)],'importedAt':_0x289eb7,'source':{'type':_0xf79a34(0x1d3),'path':_0x26324d[_0xf79a34(0x185)],'hash':_0x204505['sourceHash']},'manifest':_0x204505[_0xf79a34(0x1d0)],'normalizedManifest':_0x204505['normalizedManifest']},_0x20473a=_0x3b7f94[_0xf79a34(0x1b1)][_0xf79a34(0x1b5)](_0x4601aa=>_0x4601aa[_0xf79a34(0x1cd)]===_0x16290c);_0x20473a>=0x0?(_0x3b7f94['services'][_0x20473a]=_0x38e21a,_0x5108d2++):(_0x3b7f94[_0xf79a34(0x1b1)][_0xf79a34(0x1cb)](_0x38e21a),_0x220f04++),_0x37e58a[_0xf79a34(0x1cb)](_0x38e21a);}_0x3b7f94['services'][_0xf79a34(0x198)]((_0x9234dc,_0x154a65)=>_0x9234dc['serviceCode'][_0xf79a34(0x1ae)](_0x154a65[_0xf79a34(0x1cd)])),_0x3b7f94['updatedAt']=_0x289eb7;const _0x395847=writeServiceRegistry(_0x3b7f94,_0x3441ad);return{'registryPath':_0x395847,'entry':_0x37e58a[0x0],'replaced':_0x37e58a['length']===0x1?_0x5108d2===0x1:_0x5108d2>0x0,'entries':_0x37e58a,'imported':_0x220f04,'updated':_0x5108d2,'serviceCount':_0x3b7f94['services']['length']};}export function exportServiceManifest(_0x27a61f,_0x1a075a,_0xa9169f={}){const _0x128682=a62_0x15322d,_0x56c36f=getServiceRegistryPath(_0xa9169f),_0x39128e=getLocalServiceEntry(_0x27a61f,_0xa9169f);if(!_0x39128e)throw CliErrors[_0x128682(0x1a3)](_0x128682(0x1c8)+_0x27a61f,_0x128682(0x190));const _0x34c789=resolve(_0x1a075a),_0x2b82c2=dirname(_0x34c789);return!existsSync(_0x2b82c2)&&mkdirSync(_0x2b82c2,{'recursive':!![]}),writeFileSync(_0x34c789,JSON['stringify'](_0x39128e[_0x128682(0x1d0)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x56c36f,'filePath':_0x34c789,'entry':_0x39128e};}export function removeServiceManifest(_0x31765a,_0x419d63={}){const _0x570235=a62_0x15322d,_0x2d7edf=readServiceRegistry(_0x419d63),_0x5de44b=_0x31765a[_0x570235(0x1b9)](),_0x4c2d7b=_0x2d7edf[_0x570235(0x1b1)]['findIndex'](_0x4d11e0=>_0x4d11e0[_0x570235(0x1cd)]===_0x5de44b);if(_0x4c2d7b<0x0)throw CliErrors[_0x570235(0x1a3)](_0x570235(0x1c8)+_0x5de44b,_0x570235(0x190));const [_0x6e165f]=_0x2d7edf[_0x570235(0x1b1)][_0x570235(0x19a)](_0x4c2d7b,0x1),_0x3dfa44=(_0x419d63[_0x570235(0x1a0)]??(()=>new Date()))()['toISOString']();_0x2d7edf['updatedAt']=_0x3dfa44;const _0x2339c2=writeServiceRegistry(_0x2d7edf,_0x419d63);return{'registryPath':_0x2339c2,'entry':_0x6e165f,'serviceCount':_0x2d7edf[_0x570235(0x1b1)][_0x570235(0x19c)]};}export function listLocalServices(_0x3d825c={}){const _0x4a16ef=a62_0x15322d;return readServiceRegistry(_0x3d825c)[_0x4a16ef(0x1b1)];}export function getLocalServiceEntry(_0x130a78,_0x590e33={}){const _0x5953e0=a62_0x15322d;return readServiceRegistry(_0x590e33)[_0x5953e0(0x1b1)][_0x5953e0(0x1a9)](_0x394183=>_0x394183[_0x5953e0(0x1cd)]===_0x130a78[_0x5953e0(0x1b9)]());}export function listLocalServiceTrees(_0x2f4056={}){const _0x561049=a62_0x15322d;return readServiceRegistry(_0x2f4056)[_0x561049(0x1b1)][_0x561049(0x18a)](_0x16207d=>_0x16207d[_0x561049(0x1d5)]);}export function inspectServiceRegistry(_0x1c14ba={}){const _0x19abfc=a62_0x15322d,_0x2b497d=getServiceRegistryPath(_0x1c14ba);if(!existsSync(_0x2b497d))return emptyServiceRegistryInspection(_0x2b497d,_0x19abfc(0x191),![]);try{const _0x5bff0c=readFileSync(_0x2b497d,_0x19abfc(0x1c2));if(!_0x5bff0c['trim']())return emptyServiceRegistryInspection(_0x2b497d,_0x19abfc(0x194),!![]);const _0x3bda80=JSON['parse'](_0x5bff0c);if(_0x3bda80[_0x19abfc(0x1d1)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x2b497d,_0x19abfc(0x188),!![]),'schemaVersion':_0x3bda80['schemaVersion'],'message':_0x19abfc(0x18d)+String(_0x3bda80[_0x19abfc(0x1d1)])};if(!Array[_0x19abfc(0x1a2)](_0x3bda80[_0x19abfc(0x1b1)]))return{...emptyServiceRegistryInspection(_0x2b497d,_0x19abfc(0x188),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3bda80[_0x19abfc(0x193)],'message':_0x19abfc(0x1b2)};const _0x4b2d7e=_0x3bda80[_0x19abfc(0x1b1)][_0x19abfc(0x18a)](summarizeLocalServiceEntry);return{'registryPath':_0x2b497d,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3bda80['updatedAt'],'serviceCount':_0x4b2d7e['length'],'commandCount':_0x4b2d7e['reduce']((_0x3d5a89,_0x109e8a)=>_0x3d5a89+_0x109e8a[_0x19abfc(0x18c)],0x0),'services':_0x4b2d7e};}catch(_0x3ca3c4){return{...emptyServiceRegistryInspection(_0x2b497d,_0x19abfc(0x188),!![]),'message':_0x3ca3c4 instanceof Error?_0x3ca3c4[_0x19abfc(0x1c7)]:String(_0x3ca3c4)};}}export function formatValidationFailure(_0x311261){const _0x5a56b9=a62_0x15322d,_0x53c8c2=_0x311261[_0x5a56b9(0x1bc)]['map'](_0x51c7de=>_0x51c7de[_0x5a56b9(0x1b6)]+':\x20'+_0x51c7de['message']);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x53c8c2['join']('\x0a');}function extractLoadedServiceManifests(_0xd7e1e7,_0x11f31d){const _0xba47b4=a62_0x15322d;if(!isServiceRegistryLike(_0xd7e1e7)){const _0x21404f=_0xd7e1e7,{manifest:_0x3cafe1,errors:_0x1e01a7}=adaptServiceTreeManifestForLegacyFramework(_0x21404f),_0x1c123e=validateServiceTreeManifest(_0x3cafe1),_0x14bbb6=mergeValidationErrors(_0x1c123e,_0x1e01a7);return[{'manifest':_0x21404f,'report':_0x14bbb6,'normalizedManifest':_0x14bbb6['ok']?normalizeServiceTreeManifest(_0x3cafe1):undefined,'sourceHash':_0x11f31d}];}return _0xd7e1e7[_0xba47b4(0x1b1)][_0xba47b4(0x18a)]((_0x3a2af7,_0x1d764d)=>{const _0x236f1b=_0xba47b4,_0x2cd629=isObjectRecord(_0x3a2af7)?_0x3a2af7[_0x236f1b(0x1d0)]:undefined,{manifest:_0x53137e,errors:_0x3a068b}=adaptServiceTreeManifestForLegacyFramework(_0x2cd629),_0x26cddd=validateServiceTreeManifest(_0x53137e),_0x431ec8=mergeValidationErrors(_0x26cddd,_0x3a068b),_0x5a6ae7=isObjectRecord(_0x3a2af7)&&typeof _0x3a2af7[_0x236f1b(0x1cd)]===_0x236f1b(0x1c1)?_0x3a2af7[_0x236f1b(0x1cd)]:undefined;return{'manifest':_0x2cd629,'report':_0x431ec8,'normalizedManifest':_0x431ec8['ok']?normalizeServiceTreeManifest(_0x53137e):undefined,'sourceHash':sha256(JSON[_0x236f1b(0x187)](_0x2cd629,null,0x2)+'\x0a'),'registryIndex':_0x1d764d,'registryServiceCode':_0x5a6ae7};});}function a62_0x43bf(_0x2bb7eb,_0x1506ab){_0x2bb7eb=_0x2bb7eb-0x181;const _0x538b47=a62_0x538b();let _0x43bf7a=_0x538b47[_0x2bb7eb];return _0x43bf7a;}function mergeValidationErrors(_0x5ae5fc,_0x51fab4){const _0x518f58=a62_0x15322d,_0x55fd91=_0x5ae5fc[_0x518f58(0x1bc)][_0x518f58(0x18a)](_0x108e82=>_0x108e82[_0x518f58(0x1c7)]===_0x518f58(0x1a5)?{..._0x108e82,'message':_0x518f58(0x196)}:_0x108e82),_0x3eb8a5=[..._0x51fab4,..._0x55fd91];return{'ok':_0x3eb8a5[_0x518f58(0x19c)]===0x0,'errors':_0x3eb8a5,'warnings':_0x5ae5fc['warnings']};}function aggregateValidationReports(_0x10f8a4){const _0x27f373=a62_0x15322d,_0x169972=_0x10f8a4[_0x27f373(0x1af)](_0x2e9067=>_0x2e9067[_0x27f373(0x1a8)]===undefined?_0x2e9067[_0x27f373(0x199)][_0x27f373(0x1bc)]:_0x2e9067[_0x27f373(0x199)][_0x27f373(0x1bc)][_0x27f373(0x18a)](_0x4496c5=>({..._0x4496c5,'path':prefixRegistryIssuePath(_0x2e9067['registryIndex'],_0x4496c5[_0x27f373(0x1b6)])}))),_0x2d6780=_0x10f8a4[_0x27f373(0x1af)](_0x287533=>_0x287533[_0x27f373(0x1a8)]===undefined?_0x287533[_0x27f373(0x199)][_0x27f373(0x1d2)]:_0x287533[_0x27f373(0x199)][_0x27f373(0x1d2)][_0x27f373(0x18a)](_0x8b7dc0=>({..._0x8b7dc0,'path':prefixRegistryIssuePath(_0x287533['registryIndex'],_0x8b7dc0[_0x27f373(0x1b6)])})));return{'ok':_0x169972[_0x27f373(0x19c)]===0x0,'errors':_0x169972,'warnings':_0x2d6780};}function prefixRegistryIssuePath(_0x380bab,_0x2d984f){const _0x3bff81=a62_0x15322d;if(_0x2d984f==='$')return _0x3bff81(0x1c9)+_0x380bab+_0x3bff81(0x1c3);if(_0x2d984f[_0x3bff81(0x1cc)]('$.'))return _0x3bff81(0x1c9)+_0x380bab+'].manifest'+_0x2d984f[_0x3bff81(0x1a6)](0x1);if(_0x2d984f[_0x3bff81(0x1cc)]('$['))return _0x3bff81(0x1c9)+_0x380bab+_0x3bff81(0x1c3)+_0x2d984f['slice'](0x1);return _0x3bff81(0x1c9)+_0x380bab+_0x3bff81(0x19f)+_0x2d984f;}function a62_0x538b(){const _0x4060c7=['Invalid\x20service\x20manifest\x20JSON:\x20','.tmp','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','missing','importedAt','updatedAt','empty','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','bff\x20target\x20requires\x20functionName.','5198368xXkdVk','sort','report','splice','Remove\x20or\x20migrate\x20','length','hex','parse','].manifest.','now','command','isArray','validation','toISOString','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','slice','5986344Wubvtb','registryIndex','find','service','ENOENT','risk','4353597ubWfBS','localeCompare','flatMap','commands','services','services\x20must\x20be\x20an\x20array','kind','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','findIndex','path','source','Service\x20manifest\x20file\x20not\x20found:\x20','trim','description','service.json','errors','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','1409112LAVknO','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','version','string','utf8','].manifest','Unsupported\x20service\x20registry\x20schemaVersion:\x20','manifests','digest','message','Local\x20service\x20not\x20found:\x20','$.services[','target','push','startsWith','serviceCode','registry','Cannot\x20write\x20service\x20registry:\x20','manifest','schemaVersion','warnings','file','6Sttglc','normalizedManifest','name','homeDir','46796004cgVfxI','Invalid\x20service\x20registry\x20JSON:\x20','1yPHUXS','filePath','6544670VHpzbl','stringify','invalid','object','map','4647664pyRqUa','commandCount','Unsupported\x20schemaVersion:\x20'];a62_0x538b=function(){return _0x4060c7;};return a62_0x538b();}function isServiceRegistryLike(_0x76dfbc){const _0x227fbd=a62_0x15322d;return isObjectRecord(_0x76dfbc)&&_0x76dfbc['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x227fbd(0x1a2)](_0x76dfbc[_0x227fbd(0x1b1)]);}function isObjectRecord(_0x13c4b8){const _0x1aee54=a62_0x15322d;return Boolean(_0x13c4b8)&&typeof _0x13c4b8===_0x1aee54(0x189)&&!Array[_0x1aee54(0x1a2)](_0x13c4b8);}function emptyServiceRegistryInspection(_0xfe133,_0x233ed0,_0xb7a8d){return{'registryPath':_0xfe133,'exists':_0xb7a8d,'status':_0x233ed0,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x38aa36){const _0x51f957=a62_0x15322d,_0x552cdb=_0x38aa36[_0x51f957(0x1d5)],_0x12af5f=_0x552cdb[_0x51f957(0x1b0)][_0x51f957(0x18a)](_0x3abf76=>({'path':_0x3abf76['cliPath'],'description':_0x3abf76[_0x51f957(0x1ba)],'risk':_0x3abf76[_0x51f957(0x1ac)],'targetKind':_0x3abf76[_0x51f957(0x1ca)][_0x51f957(0x1b3)],'targetCommand':_0x3abf76[_0x51f957(0x1ca)][_0x51f957(0x1a1)]}));return{'serviceCode':_0x38aa36[_0x51f957(0x1cd)],'name':_0x552cdb['service'][_0x51f957(0x1d6)],'description':_0x552cdb[_0x51f957(0x1aa)][_0x51f957(0x1ba)],'version':_0x38aa36[_0x51f957(0x1c0)],'importedAt':_0x38aa36[_0x51f957(0x192)],'source':_0x38aa36[_0x51f957(0x1b7)],'commandCount':_0x12af5f[_0x51f957(0x19c)],'commands':_0x12af5f};}function sha256(_0x4a900e){const _0x2ee270=a62_0x15322d;return createHash('sha256')['update'](_0x4a900e)[_0x2ee270(0x1c6)](_0x2ee270(0x19d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a63_0x1336d5=a63_0x50bf;function a63_0x9393(){const _0x330a9c=['str','map','name','5251851SMqWNM','rendered','bool','356lBOzXy','941908ohiQBv','path','skillName','content','isDirectory','1047378vXnWud','read','8499WJIODL','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','type','Created\x20local\x20Skill\x20draft\x20','target','Refusing\x20to\x20overwrite\x20symlink:\x20','validation','14WMzrju','WRITE','2813455mHknWJ','创建本地自包含的运行态\x20Skill\x20草稿','files','skill','1634480sxOvBX','skillDir','isSymbolicLink','471708tSZQPu','trim'];a63_0x9393=function(){return _0x330a9c;};return a63_0x9393();}(function(_0x3ccf45,_0x4e3c60){const _0x4b0cd7=a63_0x50bf,_0x36ec80=_0x3ccf45();while(!![]){try{const _0x529624=parseInt(_0x4b0cd7(0x1ef))/0x1+-parseInt(_0x4b0cd7(0x1f8))/0x2+-parseInt(_0x4b0cd7(0x1ff))/0x3*(parseInt(_0x4b0cd7(0x1f7))/0x4)+-parseInt(_0x4b0cd7(0x1e8))/0x5+parseInt(_0x4b0cd7(0x1fd))/0x6*(parseInt(_0x4b0cd7(0x1e6))/0x7)+parseInt(_0x4b0cd7(0x1ec))/0x8+parseInt(_0x4b0cd7(0x1f4))/0x9;if(_0x529624===_0x4e3c60)break;else _0x36ec80['push'](_0x36ec80['shift']());}catch(_0x43b66f){_0x36ec80['push'](_0x36ec80['shift']());}}}(a63_0x9393,0x4ed55));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{writeCliSideChannelLine}from'../../../utils/write-cli-side-channel.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';function a63_0x50bf(_0x6584a3,_0x3f3683){_0x6584a3=_0x6584a3-0x1e6;const _0x9393f3=a63_0x9393();let _0x50bfe8=_0x9393f3[_0x6584a3];return _0x50bfe8;}export const createCommand={'service':a63_0x1336d5(0x1eb),'command':'create','description':a63_0x1336d5(0x1e9),'risk':a63_0x1336d5(0x1fe),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x4ab243){const _0x51b31e=a63_0x1336d5,_0x49d6cc=buildSkillCreatePlan(_0x4ab243[_0x51b31e(0x1f1)](_0x51b31e(0x1f3)),_0x4ab243[_0x51b31e(0x1f1)]('type'),_0x4ab243['str']('target'));return{'method':_0x51b31e(0x1e7),'url':_0x49d6cc[_0x51b31e(0x1ed)],'body':{'skillName':_0x49d6cc['rendered']['skillName'],'type':_0x49d6cc[_0x51b31e(0x1f5)][_0x51b31e(0x203)],'selfContained':!![],'files':_0x49d6cc[_0x51b31e(0x1f5)][_0x51b31e(0x1ea)][_0x51b31e(0x1f2)](_0x2853a8=>_0x2853a8[_0x51b31e(0x1f9)])},'description':'Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.'};},async 'execute'(_0x590230){const _0x222856=a63_0x1336d5,_0x3577ef=buildSkillCreatePlan(_0x590230[_0x222856(0x1f1)]('name'),_0x590230[_0x222856(0x1f1)](_0x222856(0x203)),_0x590230[_0x222856(0x1f1)](_0x222856(0x205)));return writeSkillDraft(_0x3577ef,_0x590230[_0x222856(0x1f6)]('force')),{'ok':!![],'data':{'skillName':_0x3577ef[_0x222856(0x1f5)][_0x222856(0x1fa)],'type':_0x3577ef[_0x222856(0x1f5)]['type'],'dir':_0x3577ef[_0x222856(0x1ed)],'files':_0x3577ef[_0x222856(0x1f5)][_0x222856(0x1ea)][_0x222856(0x1f2)](_0x3579e5=>_0x3579e5[_0x222856(0x1f9)])},'message':_0x222856(0x204)+_0x3577ef['rendered']['skillName']};}};function buildSkillCreatePlan(_0xf66f3,_0x5486e8,_0x18db94){const _0x42a02e=a63_0x1336d5,_0x185e75=_0x5486e8['trim'](),_0x93a39b=renderSkillTemplate({'skillName':_0xf66f3,'type':_0x185e75});!_0x185e75&&writeCliSideChannelLine(_0x42a02e(0x200));const _0x5f5cc8=resolve(normalizeSkillTarget(_0x18db94));return{'rendered':_0x93a39b,'targetRoot':_0x5f5cc8,'skillDir':resolve(_0x5f5cc8,_0x93a39b[_0x42a02e(0x1fa)])};}function normalizeSkillTarget(_0x5bea72){const _0x6d7afc=a63_0x1336d5;return(_0x5bea72||DEFAULT_SKILL_TARGET)[_0x6d7afc(0x1f0)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x205c87,_0x15bd63){const _0x4d1397=a63_0x1336d5;if(existsSync(_0x205c87[_0x4d1397(0x1ed)])){const _0x213559=lstatSync(_0x205c87['skillDir']);if(!_0x213559[_0x4d1397(0x1fc)]()||_0x213559[_0x4d1397(0x1ee)]())throw CliErrors[_0x4d1397(0x207)](_0x4d1397(0x201)+_0x205c87[_0x4d1397(0x1ed)]);if(!_0x15bd63)throw CliErrors[_0x4d1397(0x207)]('Skill\x20directory\x20already\x20exists:\x20'+_0x205c87['skillDir'],_0x4d1397(0x202));}for(const _0x47d0b8 of _0x205c87[_0x4d1397(0x1f5)][_0x4d1397(0x1ea)]){const _0x4bcc08=resolve(_0x205c87[_0x4d1397(0x1ed)],_0x47d0b8[_0x4d1397(0x1f9)]),_0x1d1ce6=dirname(_0x4bcc08);mkdirSync(_0x1d1ce6,{'recursive':!![]});if(existsSync(_0x4bcc08)&&lstatSync(_0x4bcc08)[_0x4d1397(0x1ee)]())throw CliErrors['validation'](_0x4d1397(0x206)+_0x4bcc08);writeFileSync(_0x4bcc08,_0x47d0b8[_0x4d1397(0x1fb)],'utf8');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a64_0x57ab30=a64_0xc3a2;(function(_0x36db70,_0x32d9cf){const _0x2f8906=a64_0xc3a2,_0xf18c53=_0x36db70();while(!![]){try{const _0x38d570=parseInt(_0x2f8906(0xd4))/0x1*(parseInt(_0x2f8906(0xeb))/0x2)+-parseInt(_0x2f8906(0xee))/0x3*(parseInt(_0x2f8906(0xf0))/0x4)+parseInt(_0x2f8906(0xd3))/0x5+-parseInt(_0x2f8906(0xf4))/0x6*(-parseInt(_0x2f8906(0xd1))/0x7)+-parseInt(_0x2f8906(0xd0))/0x8*(-parseInt(_0x2f8906(0xce))/0x9)+parseInt(_0x2f8906(0xf1))/0xa+parseInt(_0x2f8906(0xd8))/0xb*(-parseInt(_0x2f8906(0xf8))/0xc);if(_0x38d570===_0x32d9cf)break;else _0xf18c53['push'](_0xf18c53['shift']());}catch(_0x44b5a8){_0xf18c53['push'](_0xf18c53['shift']());}}}(a64_0x27a1,0x844e5));import{getRuntimeSkillVersionDiagram,putRuntimeSkillVersionDiagram,validateRuntimeSkillVersionDiagram}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{readRequiredSkillDiagram}from'../diagram.js';import{DIAGRAM_FILE_FLAG,DIAGRAM_SCOPE_FLAG,DIAGRAM_SKILL_CODE_FLAG,DIAGRAM_VERSION_FLAG,EXPECTED_DIAGRAM_REVISION_FLAG,SOURCE_FINGERPRINT_FLAG}from'../flags.js';function a64_0xc3a2(_0x54d1d6,_0x28123a){_0x54d1d6=_0x54d1d6-0xce;const _0x27a12c=a64_0x27a1();let _0xc3a226=_0x27a12c[_0x54d1d6];return _0xc3a226;}const TARGET_FLAGS=[DIAGRAM_SKILL_CODE_FLAG,DIAGRAM_VERSION_FLAG,DIAGRAM_SCOPE_FLAG],WRITE_FLAGS=[...TARGET_FLAGS,SOURCE_FINGERPRINT_FLAG,EXPECTED_DIAGRAM_REVISION_FLAG,DIAGRAM_FILE_FLAG];function readDiagramTarget(_0x5d80b4){const _0x5b9f46=a64_0xc3a2,_0xc1e03=_0x5d80b4[_0x5b9f46(0xe5)](_0x5b9f46(0xe6))[_0x5b9f46(0xf2)](),_0x5ce591=_0x5d80b4['str'](_0x5b9f46(0xf5))['trim'](),_0x2e2805=_0x5d80b4[_0x5b9f46(0xe5)](_0x5b9f46(0xd6));if(!_0xc1e03||!_0x5ce591||_0x2e2805!==_0x5b9f46(0xdb)&&_0x2e2805!==_0x5b9f46(0xf3))throw CliErrors[_0x5b9f46(0xe4)](_0x5b9f46(0xdc));return{'skillCode':_0xc1e03,'version':_0x5ce591,'scope':_0x2e2805};}async function readDiagramWriteInput(_0x59b554){const _0x3b1910=a64_0xc3a2,_0x11e7c8=_0x59b554['num'](_0x3b1910(0xec)),_0x505c78=_0x59b554[_0x3b1910(0xe5)]('source-fingerprint')[_0x3b1910(0xf2)]();if(!Number[_0x3b1910(0xe9)](_0x11e7c8)||_0x11e7c8<0x0)throw CliErrors['validation']('--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.');if(!/^sha256:[0-9a-f]{64}$/[_0x3b1910(0xda)](_0x505c78))throw CliErrors[_0x3b1910(0xe4)]('--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.');return{'expectedDiagramRevision':_0x11e7c8,'sourceFingerprint':_0x505c78,'diagram':await readRequiredSkillDiagram(_0x59b554[_0x3b1910(0xe5)](_0x3b1910(0xd5)))};}function a64_0x27a1(){const _0x380919=['\x20is\x20unchanged.','test','personal','--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.','unchanged','found','appCode','skill','read','Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version','validation','str','skill-code','Updated','action','isInteger','Skill\x20diagram\x20for\x20','11098BVuubu','expected-diagram-revision','expectedDiagramRevision','1356009oiMwJF','diagram-show','4CPnfdb','3115890FkCywg','trim','company','1635198KVRtEr','version','Skill\x20diagram\x20validation\x20passed\x20for\x20','Created','3000xeANpQ',';\x20first\x20write\x20expects\x20revision\x20','7638165hsgvbe','skillCode','8PyFIFK','7nyVKzA','将为指定\x20Skill\x20的精确版本创建或替换\x20Mermaid\x20流程图;服务端版本已变化时会拒绝覆盖。确认界面不会展示图表正文。','657990fbeisq','77ABsiVv','diagram-file','scope','diagram-validate','43901ZgzgCF'];a64_0x27a1=function(){return _0x380919;};return a64_0x27a1();}export const diagramValidateCommand={'service':a64_0x57ab30(0xe0),'command':a64_0x57ab30(0xd7),'description':a64_0x57ab30(0xe3),'risk':a64_0x57ab30(0xe1),'flags':WRITE_FLAGS,async 'execute'(_0x57759a){const _0x58c337=a64_0x57ab30,_0x4a6d92=readDiagramTarget(_0x57759a),_0x313e87=await validateRuntimeSkillVersionDiagram(_0x57759a[_0x58c337(0xdf)],_0x4a6d92[_0x58c337(0xcf)],_0x4a6d92['version'],_0x4a6d92[_0x58c337(0xd6)],await readDiagramWriteInput(_0x57759a));return{'ok':!![],'data':_0x313e87,'message':_0x58c337(0xf6)+_0x4a6d92[_0x58c337(0xcf)]+'@'+_0x4a6d92[_0x58c337(0xf5)]+'.'};}};export const diagramPushCommand={'service':a64_0x57ab30(0xe0),'command':'diagram-push','description':'为指定版本的\x20Skill\x20创建或替换\x20Mermaid\x20图','risk':'write','confirmationDescription':a64_0x57ab30(0xd2),'flags':WRITE_FLAGS,async 'execute'(_0x46b5fa){const _0x39e257=a64_0x57ab30,_0x23c2f0=readDiagramTarget(_0x46b5fa),_0x48dae1=await putRuntimeSkillVersionDiagram(_0x46b5fa['appCode'],_0x23c2f0[_0x39e257(0xcf)],_0x23c2f0[_0x39e257(0xf5)],_0x23c2f0[_0x39e257(0xd6)],await readDiagramWriteInput(_0x46b5fa));return{'ok':!![],'data':_0x48dae1,'message':_0x48dae1[_0x39e257(0xe8)]===_0x39e257(0xdd)?_0x39e257(0xea)+_0x23c2f0['skillCode']+'@'+_0x23c2f0[_0x39e257(0xf5)]+_0x39e257(0xd9):(_0x48dae1[_0x39e257(0xe8)]==='created'?_0x39e257(0xf7):_0x39e257(0xe7))+'\x20Skill\x20diagram\x20for\x20'+_0x23c2f0[_0x39e257(0xcf)]+'@'+_0x23c2f0['version']+'.'};}};export const diagramShowCommand={'service':'skill','command':a64_0x57ab30(0xef),'description':a64_0x57ab30(0xe2),'risk':a64_0x57ab30(0xe1),'flags':TARGET_FLAGS,async 'execute'(_0x316d27){const _0x46e160=a64_0x57ab30,_0x2a743b=readDiagramTarget(_0x316d27),_0x42d65b=await getRuntimeSkillVersionDiagram(_0x316d27[_0x46e160(0xdf)],_0x2a743b[_0x46e160(0xcf)],_0x2a743b[_0x46e160(0xf5)],_0x2a743b[_0x46e160(0xd6)]);return{'ok':!![],'data':_0x42d65b,'message':_0x42d65b[_0x46e160(0xde)]?'Found\x20Skill\x20diagram\x20for\x20'+_0x2a743b[_0x46e160(0xcf)]+'@'+_0x2a743b[_0x46e160(0xf5)]+';\x20next\x20write\x20expects\x20revision\x20'+_0x42d65b[_0x46e160(0xed)]+'.':'No\x20Skill\x20diagram\x20is\x20stored\x20for\x20'+_0x2a743b[_0x46e160(0xcf)]+'@'+_0x2a743b[_0x46e160(0xf5)]+_0x46e160(0xf9)+_0x42d65b[_0x46e160(0xed)]+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a65_0x3413(_0x30acb7,_0x30a23b){_0x30acb7=_0x30acb7-0x1f1;const _0x20358e=a65_0x2035();let _0x34139f=_0x20358e[_0x30acb7];return _0x34139f;}const a65_0x5f20f1=a65_0x3413;(function(_0x101380,_0x26b07a){const _0x30e18b=a65_0x3413,_0x7105a8=_0x101380();while(!![]){try{const _0x45d83b=-parseInt(_0x30e18b(0x1fd))/0x1+parseInt(_0x30e18b(0x218))/0x2+-parseInt(_0x30e18b(0x205))/0x3+-parseInt(_0x30e18b(0x20b))/0x4*(parseInt(_0x30e18b(0x200))/0x5)+-parseInt(_0x30e18b(0x1f9))/0x6+-parseInt(_0x30e18b(0x214))/0x7+parseInt(_0x30e18b(0x206))/0x8*(parseInt(_0x30e18b(0x1f8))/0x9);if(_0x45d83b===_0x26b07a)break;else _0x7105a8['push'](_0x7105a8['shift']());}catch(_0x200e49){_0x7105a8['push'](_0x7105a8['shift']());}}}(a65_0x2035,0xeba31));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a65_0x2035(){const _0x351968=['envName','global','project','removed','scope','accessKey','filter','bool','Installed\x20','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','../../../skills/runtime-skill-sync.js','4203lVpWfX','7289124YUEGPI','all','read','length','707708euzRRe','company','code','57985NmWcuA','personal','map','created','\x20company\x20Skill(s).','5322216fUlVjn','81064WscxQb','force','install','appCode','push','28kcpTdL','skillRoots','str','action','authRequired','updated','production','flatMap','trim','6603149xCzhkB','version','includes','skipped','1908356bsvWDf','skillCode','../../../core/api-client.js'];a65_0x2035=function(){return _0x351968;};return a65_0x2035();}import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':'skill','command':a65_0x5f20f1(0x208),'description':a65_0x5f20f1(0x1f6),'risk':a65_0x5f20f1(0x1fb),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x3e13ea){return syncRuntimeSkills(_0x3e13ea);}};async function syncRuntimeSkills(_0x230d94){const _0x7fca7d=a65_0x5f20f1,{downloadRuntimeSkillPackage:_0x2a3036,listRuntimeSkills:_0x488ff3}=await import(_0x7fca7d(0x21a)),{linkEffectiveRuntimeSkills:_0x5876b4,materializeRuntimeSkill:_0x1ec3fb,pruneStaleRuntimeSkillCache:_0x5871cf,pruneStaleRuntimeSkillLinks:_0x5a5b0a,resolveRuntimeSkillInstallTarget:_0x21b53d}=await import(_0x7fca7d(0x1f7)),_0x5159d2=_0x230d94[_0x7fca7d(0x20d)](_0x7fca7d(0x1ff)),_0x334351=normalizeSyncScopes(_0x230d94[_0x7fca7d(0x20d)]('scope')),_0x280d8a=_0x230d94[_0x7fca7d(0x21b)]??_0x7fca7d(0x211),_0x2bdc83=_0x230d94[_0x7fca7d(0x1f2)],_0x47d197=_0x230d94[_0x7fca7d(0x1f4)](_0x7fca7d(0x207));if(!_0x2bdc83)throw CliErrors[_0x7fca7d(0x20f)]('Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.');const _0x52ba04=_0x21b53d(_0x230d94[_0x7fca7d(0x209)],_0x230d94[_0x7fca7d(0x1f4)](_0x7fca7d(0x21d))?_0x7fca7d(0x21d):_0x7fca7d(0x21c)),_0x10d660=_0x21b53d(_0x230d94['appCode'],_0x52ba04[_0x7fca7d(0x1f1)]==='project'?_0x7fca7d(0x21c):_0x7fca7d(0x21d)),_0x2fb96a=await Promise[_0x7fca7d(0x1fa)](_0x334351['map'](_0x137076=>_0x488ff3({'appCode':_0x230d94[_0x7fca7d(0x209)],'scope':_0x137076,'code':_0x5159d2['trim']()||undefined}))),_0x265d56=_0x334351[_0x7fca7d(0x216)](_0x7fca7d(0x201))?_0x2fb96a[_0x7fca7d(0x212)]((_0x342bc6,_0x3f6a0c)=>_0x334351[_0x3f6a0c]===_0x7fca7d(0x201)?_0x342bc6[_0x7fca7d(0x201)]:[]):[],_0x1720c2=_0x334351[_0x7fca7d(0x216)](_0x7fca7d(0x1fe))?_0x2fb96a['flatMap']((_0x1fa9ff,_0xd8d663)=>_0x334351[_0xd8d663]===_0x7fca7d(0x1fe)?_0x1fa9ff['company']:[]):[],_0x3df429=new Set([..._0x265d56[_0x7fca7d(0x202)](_0x1135b5=>_0x1135b5[_0x7fca7d(0x219)]?.['trim']())['filter'](_0x53888b=>Boolean(_0x53888b)),..._0x1720c2[_0x7fca7d(0x202)](_0x2eda72=>_0x2eda72[_0x7fca7d(0x219)]?.['trim']())[_0x7fca7d(0x1f3)](_0x34f1fa=>Boolean(_0x34f1fa))]),_0x56de17=_0x5159d2[_0x7fca7d(0x213)]()?[_0x5159d2[_0x7fca7d(0x213)]()]:undefined,_0xa557a7=_0x334351[_0x7fca7d(0x1fc)]===0x2&&_0x334351['includes'](_0x7fca7d(0x201))&&_0x334351[_0x7fca7d(0x216)](_0x7fca7d(0x1fe)),_0x37b60d=_0xa557a7?_0x5a5b0a(_0x52ba04,_0x3df429,_0x56de17):[],_0x413c76=_0x5871cf({'env':_0x280d8a,'accessKey':_0x2bdc83,'appCode':_0x230d94[_0x7fca7d(0x209)],'activeSkillCodes':_0x3df429,'pruneSkillCodes':_0x56de17,'scopes':_0x334351,'protectedLinkRoots':_0x10d660[_0x7fca7d(0x20c)]}),_0x268004=[];for(const _0x3b2e93 of _0x265d56){_0x268004[_0x7fca7d(0x20a)](_0x1ec3fb(_0x3b2e93,_0x7fca7d(0x201),{'env':_0x280d8a,'accessKey':_0x2bdc83,'appCode':_0x230d94[_0x7fca7d(0x209)],'force':_0x47d197,'packageBytes':await downloadSkillPackage(_0x3b2e93,_0x7fca7d(0x201),_0x230d94[_0x7fca7d(0x209)],_0x2a3036)}));}for(const _0x4511e4 of _0x1720c2){_0x268004[_0x7fca7d(0x20a)](_0x1ec3fb(_0x4511e4,_0x7fca7d(0x1fe),{'env':_0x280d8a,'accessKey':_0x2bdc83,'appCode':_0x230d94[_0x7fca7d(0x209)],'force':_0x47d197,'packageBytes':await downloadSkillPackage(_0x4511e4,'company',_0x230d94[_0x7fca7d(0x209)],_0x2a3036)}));}const _0x3f7468=_0x5876b4(_0x268004,_0x52ba04),_0x21a099=countLinkActions(_0x3f7468);return{'ok':!![],'data':{'appCode':_0x230d94[_0x7fca7d(0x209)],..._0x52ba04[_0x7fca7d(0x1f1)]===_0x7fca7d(0x21d)?{'installTarget':{'scope':_0x52ba04[_0x7fca7d(0x1f1)],'skillRoots':[..._0x52ba04['skillRoots']]}}:{},'personal':_0x265d56[_0x7fca7d(0x1fc)],'company':_0x1720c2['length'],'materialized':_0x268004['length'],'links':{'total':_0x3f7468[_0x7fca7d(0x1fc)],'created':_0x21a099[_0x7fca7d(0x203)]??0x0,'updated':_0x21a099[_0x7fca7d(0x210)]??0x0,'unchanged':_0x21a099['unchanged']??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x37b60d['filter'](_0x3c062e=>_0x3c062e['action']===_0x7fca7d(0x21e))['length'],'cacheDirs':_0x413c76['filter'](_0x39afa0=>_0x39afa0['action']==='removed')['length'],'skipped':[..._0x37b60d,..._0x413c76][_0x7fca7d(0x1f3)](_0x3832fd=>_0x3832fd[_0x7fca7d(0x20e)]===_0x7fca7d(0x217))[_0x7fca7d(0x1fc)]},'skills':{'personal':_0x265d56[_0x7fca7d(0x202)](summarizeRuntimeSkill),'company':_0x1720c2[_0x7fca7d(0x202)](summarizeRuntimeSkill)}},'message':_0x7fca7d(0x1f5)+_0x265d56[_0x7fca7d(0x1fc)]+'\x20personal\x20and\x20'+_0x1720c2[_0x7fca7d(0x1fc)]+_0x7fca7d(0x204)};}async function downloadSkillPackage(_0x56589d,_0x46c4fc,_0x51bbcd,_0x5704b5){const _0x46b587=a65_0x5f20f1,_0x1a8852=_0x56589d[_0x46b587(0x215)]?.[_0x46b587(0x213)]();return _0x1a8852?_0x5704b5(_0x46c4fc,_0x56589d[_0x46b587(0x219)],_0x51bbcd,_0x1a8852):_0x5704b5(_0x46c4fc,_0x56589d[_0x46b587(0x219)],_0x51bbcd);}function countLinkActions(_0x139bd8){return _0x139bd8['reduce']((_0x5dd916,_0x48e94)=>{const _0x5d04f9=a65_0x3413;return _0x5dd916[_0x48e94['action']]=(_0x5dd916[_0x48e94[_0x5d04f9(0x20e)]]??0x0)+0x1,_0x5dd916;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a66_0x2c6612=a66_0x5136;(function(_0x12cb64,_0x168b20){const _0x1b7ee8=a66_0x5136,_0x44bedb=_0x12cb64();while(!![]){try{const _0x22a286=parseInt(_0x1b7ee8(0x103))/0x1*(parseInt(_0x1b7ee8(0x11f))/0x2)+parseInt(_0x1b7ee8(0x109))/0x3+-parseInt(_0x1b7ee8(0x110))/0x4*(parseInt(_0x1b7ee8(0x11b))/0x5)+parseInt(_0x1b7ee8(0x107))/0x6+-parseInt(_0x1b7ee8(0x104))/0x7+-parseInt(_0x1b7ee8(0x11e))/0x8*(parseInt(_0x1b7ee8(0x106))/0x9)+-parseInt(_0x1b7ee8(0x120))/0xa*(-parseInt(_0x1b7ee8(0x10a))/0xb);if(_0x22a286===_0x168b20)break;else _0x44bedb['push'](_0x44bedb['shift']());}catch(_0x5cfc0a){_0x44bedb['push'](_0x44bedb['shift']());}}}(a66_0x1ee0,0xb77f1));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';function a66_0x5136(_0x451ead,_0x3b9b81){_0x451ead=_0x451ead-0xff;const _0x1ee0ab=a66_0x1ee0();let _0x513603=_0x1ee0ab[_0x451ead];return _0x513603;}import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':a66_0x2c6612(0x115),'command':a66_0x2c6612(0x102),'description':a66_0x2c6612(0x113),'risk':a66_0x2c6612(0x10e),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x680546){const _0x3b0a74=a66_0x2c6612,_0x353787=_0x680546['str'](_0x3b0a74(0x10f)),_0x2ba3a9=normalizeListScope(_0x680546[_0x3b0a74(0x108)](_0x3b0a74(0x116)));if(_0x680546[_0x3b0a74(0x105)](_0x3b0a74(0x117))){const _0x29f511=_0x680546[_0x3b0a74(0x101)];if(!_0x29f511)throw CliErrors[_0x3b0a74(0x118)]();const {listLocalRuntimeSkills:_0x507ba1,resolveRuntimeSkillInstallTarget:_0x4235ab}=await import('../../../skills/runtime-skill-sync.js'),_0x14cec1=_0x4235ab(_0x680546['appCode'],_0x680546['bool'](_0x3b0a74(0x11d))?_0x3b0a74(0x11d):_0x3b0a74(0x10d)),_0x8ecd8c=_0x507ba1({'env':_0x680546[_0x3b0a74(0x112)]??_0x3b0a74(0x123),'accessKey':_0x29f511,'appCode':_0x680546[_0x3b0a74(0x10c)],'scopes':listScopeToRuntimeScopes(_0x2ba3a9),'code':_0x353787[_0x3b0a74(0x119)]()||undefined},_0x14cec1),_0x58aec5=groupLocalRuntimeSkills(_0x8ecd8c);return{'ok':!![],'data':{'appCode':_0x680546['appCode'],'source':_0x3b0a74(0x117),..._0x14cec1[_0x3b0a74(0x116)]===_0x3b0a74(0x11d)?{'installScope':_0x14cec1[_0x3b0a74(0x116)]}:{},'scope':_0x2ba3a9,'total':_0x8ecd8c[_0x3b0a74(0x10b)],'personal':_0x58aec5[_0x3b0a74(0x100)][_0x3b0a74(0x10b)],'company':_0x58aec5['company']['length'],'items':_0x8ecd8c[_0x3b0a74(0x121)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x58aec5[_0x3b0a74(0x100)][_0x3b0a74(0x121)](summarizeLocalRuntimeSkill),'company':_0x58aec5[_0x3b0a74(0x11c)]['map'](summarizeLocalRuntimeSkill)}},'message':_0x3b0a74(0x122)+_0x8ecd8c['length']+'\x20local\x20Skill(s).'};}const {listRuntimeSkills:_0x405d4e}=await import(_0x3b0a74(0x111)),_0x5405ed=await _0x405d4e({'appCode':_0x680546['appCode'],'scope':listScopeToRemoteScope(_0x2ba3a9),'code':_0x353787[_0x3b0a74(0x119)]()||undefined}),_0x3d8374=shouldListScope(_0x2ba3a9,_0x3b0a74(0x100))?_0x5405ed[_0x3b0a74(0x100)]??[]:[],_0x43d552=shouldListScope(_0x2ba3a9,_0x3b0a74(0x11c))?_0x5405ed[_0x3b0a74(0x11c)]??[]:[],_0x4d6c77=[..._0x3d8374,..._0x43d552];return{'ok':!![],'data':{'appCode':_0x680546['appCode'],'source':'remote','scope':_0x2ba3a9,'total':_0x4d6c77['length'],'personal':_0x3d8374[_0x3b0a74(0x10b)],'company':_0x43d552[_0x3b0a74(0x10b)],'items':_0x4d6c77['map'](summarizeRuntimeSkill),'skills':{'personal':_0x3d8374[_0x3b0a74(0x121)](summarizeRuntimeSkill),'company':_0x43d552[_0x3b0a74(0x121)](summarizeRuntimeSkill)}},'message':_0x3b0a74(0x122)+_0x4d6c77['length']+_0x3b0a74(0x11a)};}};function groupLocalRuntimeSkills(_0x410047){const _0x116350=a66_0x2c6612;return{'personal':_0x410047[_0x116350(0x114)](_0x41e6e2=>_0x41e6e2[_0x116350(0x116)]==='personal'),'company':_0x410047[_0x116350(0x114)](_0x20db76=>_0x20db76[_0x116350(0x116)]===_0x116350(0x11c)),'builtin':_0x410047['filter'](_0x34481e=>_0x34481e[_0x116350(0x116)]===_0x116350(0xff))};}function a66_0x1ee0(){const _0x6fb017=['local','authRequired','trim','\x20remote\x20Skill(s).','5IPpcku','company','project','3192YgXtFN','130882kzFHZh','281110nttUdh','map','Listed\x20','production','builtin','personal','accessKey','list','2hJZUwy','1001245JzBziW','bool','12087WyIUcy','3144588uLvjGS','str','2902830TzOQxg','242ADltYF','length','appCode','global','read','code','3242156jtVRHo','../../../core/api-client.js','envName','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','filter','skill','scope'];a66_0x1ee0=function(){return _0x6fb017;};return a66_0x1ee0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a67_0x2220(_0x207b16,_0x30952c){_0x207b16=_0x207b16-0xe1;const _0x193e3d=a67_0x193e();let _0x22205e=_0x193e3d[_0x207b16];return _0x22205e;}const a67_0x5719e3=a67_0x2220;(function(_0x199b7e,_0x1daa5d){const _0x2b525a=a67_0x2220,_0x53aa46=_0x199b7e();while(!![]){try{const _0x4e1ba5=parseInt(_0x2b525a(0xed))/0x1+-parseInt(_0x2b525a(0xee))/0x2*(-parseInt(_0x2b525a(0xe2))/0x3)+parseInt(_0x2b525a(0xe1))/0x4*(-parseInt(_0x2b525a(0xe5))/0x5)+-parseInt(_0x2b525a(0xe8))/0x6*(parseInt(_0x2b525a(0xe4))/0x7)+parseInt(_0x2b525a(0xf0))/0x8*(-parseInt(_0x2b525a(0xea))/0x9)+parseInt(_0x2b525a(0xec))/0xa+parseInt(_0x2b525a(0xef))/0xb*(parseInt(_0x2b525a(0xe9))/0xc);if(_0x4e1ba5===_0x1daa5d)break;else _0x53aa46['push'](_0x53aa46['shift']());}catch(_0x8548a0){_0x53aa46['push'](_0x53aa46['shift']());}}}(a67_0x193e,0x9f895));function a67_0x193e(){const _0x6d40d8=['617007XGLBSQ','2SntLjh','11GGeQDn','176WwADVT','36rcgAVO','1619139jBDsbZ','write','5873xryHCP','291510pPxBmY','将读取本地\x20Skill\x20内容:个人范围会立即保存并生效,公司范围会提交一个新版本进入审核。确认界面不会展示目录路径或\x20Skill\x20正文。','skill','6564LvTgNn','19898964RetDHl','404388lmJOfP','将本地\x20Skill\x20目录推送到个人范围,或提交公司范围版本审核','2695820FoTsav'];a67_0x193e=function(){return _0x6d40d8;};return a67_0x193e();}import{CONFIRM_WARNINGS_FLAG,DIAGRAM_FILE_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a67_0x5719e3(0xe7),'command':'push','description':a67_0x5719e3(0xeb),'risk':a67_0x5719e3(0xe3),'confirmationDescription':a67_0x5719e3(0xe6),'flags':[DIR_FLAG,DIAGRAM_FILE_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x40ae34=a68_0x51e5;(function(_0x4f94ea,_0x3a17ae){const _0x39012a=a68_0x51e5,_0x2583b8=_0x4f94ea();while(!![]){try{const _0x30f454=parseInt(_0x39012a(0x1f6))/0x1*(-parseInt(_0x39012a(0x1f4))/0x2)+-parseInt(_0x39012a(0x1fb))/0x3+parseInt(_0x39012a(0x1f8))/0x4+-parseInt(_0x39012a(0x1ff))/0x5*(parseInt(_0x39012a(0x202))/0x6)+parseInt(_0x39012a(0x1f3))/0x7+parseInt(_0x39012a(0x1fa))/0x8+parseInt(_0x39012a(0x203))/0x9*(-parseInt(_0x39012a(0x204))/0xa);if(_0x30f454===_0x3a17ae)break;else _0x2583b8['push'](_0x2583b8['shift']());}catch(_0x57ef45){_0x2583b8['push'](_0x2583b8['shift']());}}}(a68_0x4506,0xbfb2a));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';function a68_0x51e5(_0x7c01c8,_0x53a0a1){_0x7c01c8=_0x7c01c8-0x1f3;const _0x4506f4=a68_0x4506();let _0x51e583=_0x4506f4[_0x7c01c8];return _0x51e583;}function a68_0x4506(){const _0x1d34fe=['Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','12313352YqCQJZ','1317366fGeqRO','validate','Skill\x20validation\x20passed.','skill','55YzALle','str','type','229242MwEkHI','278172LuQySK','160iTkZZz','4326329bdBxTv','2Tgazyp','errors','1011779CpgPmP','dir','3974736NWFmzf'];a68_0x4506=function(){return _0x1d34fe;};return a68_0x4506();}import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a68_0x40ae34(0x1fe),'command':a68_0x40ae34(0x1fc),'description':a68_0x40ae34(0x1f9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x340eb1){const _0x3fe97d=a68_0x40ae34,_0x25f350=_0x340eb1['bool']('strict'),_0x35ec3d=validateSkillDirectory(_0x340eb1[_0x3fe97d(0x200)](_0x3fe97d(0x1f7)),{'strict':_0x25f350});return throwIfSkillValidationFailed(_0x35ec3d,_0x25f350),{'ok':!![],'data':{'dir':_0x35ec3d[_0x3fe97d(0x1f7)],'type':_0x35ec3d[_0x3fe97d(0x201)],'errors':_0x35ec3d[_0x3fe97d(0x1f5)],'warnings':_0x35ec3d['warnings']},'message':_0x3fe97d(0x1fd)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58a2ad,_0x55ffbe){const _0x4f9080=a69_0x4993,_0x25c120=_0x58a2ad();while(!![]){try{const _0x1fdf89=parseInt(_0x4f9080(0x1c8))/0x1*(parseInt(_0x4f9080(0x1d7))/0x2)+parseInt(_0x4f9080(0x1cb))/0x3+-parseInt(_0x4f9080(0x1cc))/0x4*(parseInt(_0x4f9080(0x1d9))/0x5)+parseInt(_0x4f9080(0x1db))/0x6*(parseInt(_0x4f9080(0x1d6))/0x7)+parseInt(_0x4f9080(0x1cf))/0x8+parseInt(_0x4f9080(0x1d2))/0x9+-parseInt(_0x4f9080(0x1d4))/0xa;if(_0x1fdf89===_0x55ffbe)break;else _0x25c120['push'](_0x25c120['shift']());}catch(_0x5ade9d){_0x25c120['push'](_0x25c120['shift']());}}}(a69_0x8336,0xa08ca));function a69_0x4993(_0x2450e8,_0x1676cf){_0x2450e8=_0x2450e8-0x1c5;const _0x833648=a69_0x8336();let _0x499342=_0x833648[_0x2450e8];return _0x499342;}import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{resolve}from'node:path';import{JSDOM}from'jsdom';import{CliErrors}from'../../errors.js';let mermaidApiPromise;export async function readRequiredSkillDiagram(_0xdb1539){const _0xf63cf4=a69_0x4993;return(await readRequiredSkillDiagramInput(_0xdb1539))[_0xf63cf4(0x1d5)];}export async function readRequiredSkillDiagramInput(_0x469516){const _0x305387=a69_0x4993,_0x48400d=_0x469516['trim']();if(!_0x48400d)throw CliErrors[_0x305387(0x1dc)](_0x305387(0x1da),_0x305387(0x1ca));let _0x352e0e,_0x4c5dfe;if(_0x48400d==='-')try{_0x352e0e=readFileSync(0x0,'utf8');}catch{throw CliErrors['validation']('Unable\x20to\x20read\x20Mermaid\x20flowchart\x20from\x20standard\x20input.');}else{const _0xbf3d6b=resolve(_0x48400d);if(!existsSync(_0xbf3d6b))throw CliErrors['validation']('Mermaid\x20flowchart\x20file\x20not\x20found:\x20'+_0xbf3d6b);if(!statSync(_0xbf3d6b)[_0x305387(0x1de)]())throw CliErrors[_0x305387(0x1dc)](_0x305387(0x1ce)+_0xbf3d6b);_0x4c5dfe=realpathSync(_0xbf3d6b),_0x352e0e=readFileSync(_0x4c5dfe,_0x305387(0x1c7));}return{'diagram':{'schemaVersion':0x1,'mermaid':await validateAndCanonicalizeMermaid(_0x352e0e)},'sourceFilePath':_0x4c5dfe};}export async function validateAndCanonicalizeMermaid(_0x4e29bf){const _0x66134d=a69_0x4993,_0x48ef83=_0x4e29bf[_0x66134d(0x1c6)](/\r\n/g,'\x0a')[_0x66134d(0x1c6)](/\r/g,'\x0a')[_0x66134d(0x1c6)](/\n+$/,'')+'\x0a';try{const _0x4822ac=await loadMermaidApi();await _0x4822ac[_0x66134d(0x1c9)](_0x48ef83);}catch{throw diagramValidationError();}return _0x48ef83;}function a69_0x8336(){const _0x4045b9=['parse','Generate\x20a\x20Mermaid\x20flowchart\x20and\x20pass\x20--diagram-file\x20<path>,\x20or\x20use\x20--diagram-file\x20-\x20for\x20standard\x20input.','915558BoABHu','4EeMSnP','defineProperties','Mermaid\x20flowchart\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','6983784sjvxkS','Fix\x20the\x20Mermaid\x20syntax\x20reported\x20by\x20your\x20editor\x20or\x20preview\x20tool,\x20then\x20retry\x20with\x20the\x20same\x20file.','mermaid','11738160XMmpzk','document','19544220DTTyYK','diagram','14hcmcpR','368obVQsV','default','3061865nRhyjJ','--diagram-file\x20is\x20required\x20when\x20publishing\x20a\x20Skill\x20version.','43410wFJCIm','validation','Mermaid\x20syntax\x20validation\x20failed.','isFile','window','replace','utf8','3954yhCnlt'];a69_0x8336=function(){return _0x4045b9;};return a69_0x8336();}function loadMermaidApi(){return mermaidApiPromise??=((async()=>{const _0x33493e=a69_0x4993;if(!(_0x33493e(0x1c5)in globalThis)||!(_0x33493e(0x1d3)in globalThis)){const _0x433405=new JSDOM('');Object[_0x33493e(0x1cd)](globalThis,{'window':{'configurable':!![],'value':_0x433405[_0x33493e(0x1c5)]},'document':{'configurable':!![],'value':_0x433405[_0x33493e(0x1c5)][_0x33493e(0x1d3)]}});}return(await import(_0x33493e(0x1d1)))[_0x33493e(0x1d8)];})()),mermaidApiPromise;}function diagramValidationError(){const _0xbd44f4=a69_0x4993;return CliErrors['validation'](_0xbd44f4(0x1dd),_0xbd44f4(0x1d0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0xdc0107=a70_0x4595;(function(_0x14995b,_0x1f7fb2){const _0xe673b6=a70_0x4595,_0x49b743=_0x14995b();while(!![]){try{const _0x24a9b0=-parseInt(_0xe673b6(0x143))/0x1*(parseInt(_0xe673b6(0x163))/0x2)+-parseInt(_0xe673b6(0x148))/0x3*(-parseInt(_0xe673b6(0x149))/0x4)+parseInt(_0xe673b6(0x13a))/0x5+-parseInt(_0xe673b6(0x14d))/0x6*(parseInt(_0xe673b6(0x165))/0x7)+-parseInt(_0xe673b6(0x14a))/0x8*(-parseInt(_0xe673b6(0x140))/0x9)+-parseInt(_0xe673b6(0x15b))/0xa*(parseInt(_0xe673b6(0x15d))/0xb)+parseInt(_0xe673b6(0x154))/0xc;if(_0x24a9b0===_0x1f7fb2)break;else _0x49b743['push'](_0x49b743['shift']());}catch(_0x5ad241){_0x49b743['push'](_0x49b743['shift']());}}}(a70_0x2954,0xf2d17));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a70_0xdc0107(0x15a),'type':a70_0xdc0107(0x142),'description':a70_0xdc0107(0x15f)};function a70_0x4595(_0x2c2526,_0x4f2548){_0x2c2526=_0x2c2526-0x13a;const _0x295443=a70_0x2954();let _0x459554=_0x295443[_0x2c2526];return _0x459554;}export const SCOPE_FLAG={'name':a70_0xdc0107(0x146),'type':'string','description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':['all',a70_0xdc0107(0x150),a70_0xdc0107(0x151)]};export const PUSH_SCOPE_FLAG={'name':'scope','type':a70_0xdc0107(0x142),'description':a70_0xdc0107(0x13c),'default':a70_0xdc0107(0x150),'enum':['personal',a70_0xdc0107(0x151)]};export const LIST_SCOPE_FLAG={'name':a70_0xdc0107(0x146),'type':a70_0xdc0107(0x142),'description':a70_0xdc0107(0x13e),'enum':['all',a70_0xdc0107(0x150),a70_0xdc0107(0x151)]};export const LOCAL_FLAG={'name':'local','type':a70_0xdc0107(0x14f),'description':'Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists'};export const DIR_FLAG={'name':a70_0xdc0107(0x158),'type':a70_0xdc0107(0x142),'required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};export const DIAGRAM_FILE_FLAG={'name':'diagram-file','type':a70_0xdc0107(0x142),'required':!![],'description':a70_0xdc0107(0x164)};export const DIAGRAM_SKILL_CODE_FLAG={'name':a70_0xdc0107(0x153),'type':a70_0xdc0107(0x142),'required':!![],'description':a70_0xdc0107(0x162)};export const DIAGRAM_VERSION_FLAG={'name':a70_0xdc0107(0x166),'type':a70_0xdc0107(0x142),'required':!![],'description':a70_0xdc0107(0x15c)};function a70_0x2954(){const _0x321349=['a\x20lowercase\x20sha256:<64\x20hex\x20characters>\x20fingerprint','code','10YiiPZk','Exact\x20Skill\x20version\x20whose\x20diagram\x20is\x20being\x20managed','16378835ynOUFY','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','expected-diagram-revision','Exact\x20Skill\x20code\x20whose\x20version\x20diagram\x20is\x20being\x20managed','744644ZSXgdg','UTF-8\x20Mermaid\x20flowchart\x20file;\x20the\x20selected\x20file\x20is\x20excluded\x20from\x20the\x20Skill\x20package;\x20use\x20-\x20for\x20stdin','1020159pGlqjt','version','9841695QmRglu','Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','name','33291NjOyaB','type','string','2tBjINH','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','scope','target','211368sGshbi','44aJKxCq','3896YpongS','Exact\x20Skill\x20scope:\x20personal\x20or\x20company','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','60RScpPC','strict','boolean','personal','company','project','skill-code','1689768TTSRYX','source-fingerprint','confirm-warnings','force','dir'];a70_0x2954=function(){return _0x321349;};return a70_0x2954();}export const DIAGRAM_SCOPE_FLAG={'name':a70_0xdc0107(0x146),'type':'string','required':!![],'enum':[a70_0xdc0107(0x150),a70_0xdc0107(0x151)],'description':a70_0xdc0107(0x14b)};export const SOURCE_FINGERPRINT_FLAG={'name':a70_0xdc0107(0x155),'type':a70_0xdc0107(0x142),'required':!![],'description':'Server-reported\x20SkillVersion\x20source\x20fingerprint','pattern':{'regex':/^sha256:[0-9a-f]{64}$/,'description':a70_0xdc0107(0x159)}};export const EXPECTED_DIAGRAM_REVISION_FLAG={'name':a70_0xdc0107(0x161),'type':'number','required':!![],'description':'Expected\x20current\x20diagram\x20revision;\x20use\x200\x20for\x20the\x20first\x20diagram'};export const CREATE_NAME_FLAG={'name':a70_0xdc0107(0x13f),'type':a70_0xdc0107(0x142),'required':!![],'description':a70_0xdc0107(0x145),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a70_0xdc0107(0x160)}};export const TYPE_FLAG={'name':a70_0xdc0107(0x141),'type':a70_0xdc0107(0x142),'description':a70_0xdc0107(0x144),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a70_0xdc0107(0x147),'type':a70_0xdc0107(0x142),'description':a70_0xdc0107(0x13d),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a70_0xdc0107(0x157),'type':'boolean','description':'Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists'};export const PROJECT_TARGET_FLAG={'name':a70_0xdc0107(0x152),'type':'boolean','description':a70_0xdc0107(0x13b)};export const CONFIRM_WARNINGS_FLAG={'name':a70_0xdc0107(0x156),'type':a70_0xdc0107(0x14f),'description':a70_0xdc0107(0x15e)};export const STRICT_FLAG={'name':a70_0xdc0107(0x14e),'type':a70_0xdc0107(0x14f),'description':a70_0xdc0107(0x14c)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55c060,_0x51ff36){const _0x5ee00b=a71_0x163a,_0x5c00d8=_0x55c060();while(!![]){try{const _0x4de29c=-parseInt(_0x5ee00b(0xfa))/0x1+-parseInt(_0x5ee00b(0xf9))/0x2*(parseInt(_0x5ee00b(0xf1))/0x3)+parseInt(_0x5ee00b(0xf3))/0x4*(parseInt(_0x5ee00b(0xf8))/0x5)+parseInt(_0x5ee00b(0xf0))/0x6+parseInt(_0x5ee00b(0xf2))/0x7*(-parseInt(_0x5ee00b(0xf4))/0x8)+parseInt(_0x5ee00b(0xf5))/0x9*(-parseInt(_0x5ee00b(0xf6))/0xa)+parseInt(_0x5ee00b(0xf7))/0xb;if(_0x4de29c===_0x51ff36)break;else _0x5c00d8['push'](_0x5c00d8['shift']());}catch(_0x4a083e){_0x5c00d8['push'](_0x5c00d8['shift']());}}}(a71_0x5069,0x561a8));function a71_0x5069(){const _0x235582=['17307037ruXwut','1696535ZhTIkD','58BbkUny','533886SIJNIo','511290wMJnJN','48057edOdCN','263494ynfxcp','4XSUJCv','112dUQgrd','51336THhOWQ','210GiWvzw'];a71_0x5069=function(){return _0x235582;};return a71_0x5069();}function a71_0x163a(_0x5ba385,_0x3c665d){_0x5ba385=_0x5ba385-0xf0;const _0x5069ba=a71_0x5069();let _0x163af4=_0x5069ba[_0x5ba385];return _0x163af4;}import{createCommand}from'./commands/create.js';import{diagramPushCommand,diagramShowCommand,diagramValidateCommand}from'./commands/diagram.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,diagramValidateCommand,diagramPushCommand,diagramShowCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a72_0x2d7c(_0x529d60,_0x5dc6fd){_0x529d60=_0x529d60-0xbd;var _0x4f3c3e=a72_0x4f3c();var _0x2d7c6a=_0x4f3c3e[_0x529d60];return _0x2d7c6a;}function a72_0x4f3c(){var _0x54b560=['object','path','string','3569532Thffsr','166615QafuBI','47872Fpfuzl','length','some','539926BwbXLK','6529747zBvvMS','files','ossPath','52ivBNqO','1855158cKUXMv','isArray','5770540sdXkOH','2oRSZGg','9XJrVtN'];a72_0x4f3c=function(){return _0x54b560;};return a72_0x4f3c();}(function(_0x52ce53,_0x3412b2){var _0x46f730=a72_0x2d7c,_0x5e6947=_0x52ce53();while(!![]){try{var _0x4c804d=parseInt(_0x46f730(0xcd))/0x1*(parseInt(_0x46f730(0xc5))/0x2)+parseInt(_0x46f730(0xca))/0x3+parseInt(_0x46f730(0xc9))/0x4*(-parseInt(_0x46f730(0xc1))/0x5)+-parseInt(_0x46f730(0xc0))/0x6+parseInt(_0x46f730(0xc6))/0x7+parseInt(_0x46f730(0xc2))/0x8+parseInt(_0x46f730(0xce))/0x9*(-parseInt(_0x46f730(0xcc))/0xa);if(_0x4c804d===_0x3412b2)break;else _0x5e6947['push'](_0x5e6947['shift']());}catch(_0x304f7d){_0x5e6947['push'](_0x5e6947['shift']());}}}(a72_0x4f3c,0x781a6));export function isPackageBackedManifest(_0x2df836){var _0x137521=a72_0x2d7c;return!!_0x2df836&&typeof _0x2df836===_0x137521(0xbd)&&!Array[_0x137521(0xcb)](_0x2df836)&&typeof _0x2df836[_0x137521(0xc8)]===_0x137521(0xbf)&&_0x2df836[_0x137521(0xc8)][_0x137521(0xc3)]>0x0&&Array['isArray'](_0x2df836[_0x137521(0xc7)]);}export function isMultiFileManifest(_0x3a7e5d){var _0x2d3eca=a72_0x2d7c;return!!_0x3a7e5d&&typeof _0x3a7e5d===_0x2d3eca(0xbd)&&!Array[_0x2d3eca(0xcb)](_0x3a7e5d)&&Array['isArray'](_0x3a7e5d['files'])&&_0x3a7e5d['files'][_0x2d3eca(0xc4)](_0x159db0=>_0x159db0[_0x2d3eca(0xbe)]!=='SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xc55d91,_0x175ff5){const _0x5a9c1f=a53_0x1fe6,_0x2cebce=_0xc55d91();while(!![]){try{const _0x1a13bf=-parseInt(_0x5a9c1f(0x8a))/0x1*(-parseInt(_0x5a9c1f(0x83))/0x2)+-parseInt(_0x5a9c1f(0x9e))/0x3+parseInt(_0x5a9c1f(0x99))/0x4*(parseInt(_0x5a9c1f(0xa6))/0x5)+-parseInt(_0x5a9c1f(0x90))/0x6+-parseInt(_0x5a9c1f(0x87))/0x7+parseInt(_0x5a9c1f(0x81))/0x8*(-parseInt(_0x5a9c1f(0x72))/0x9)+parseInt(_0x5a9c1f(0x98))/0xa*(parseInt(_0x5a9c1f(0x97))/0xb);if(_0x1a13bf===_0x175ff5)break;else _0x2cebce['push'](_0x2cebce['shift']());}catch(_0x51d333){_0x2cebce['push'](_0x2cebce['shift']());}}}(a53_0x5037,0x7c7f9));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';function a53_0x1fe6(_0x5ac65d,_0x2b6ac1){_0x5ac65d=_0x5ac65d-0x6c;const _0x503727=a53_0x5037();let _0x1fe67d=_0x503727[_0x5ac65d];return _0x1fe67d;}import{summarizeRuntimeSkill}from'./summary.js';import{readRequiredSkillDiagramInput}from'./diagram.js';function a53_0x5037(){const _0x517e09=['Updated\x20personal\x20Skill\x20','/api/cli/v1/skills/','status','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','personal','input','8WrULNY','appCode','155094aYYCLw','version','dir','identical','2181879Zbpirv','PRIVATE','trim','7QOfiPr','NAMESPACE_ONLY','Submitted\x20company\x20Skill\x20','authRequired','validation','Created\x20personal\x20Skill\x20','5540208WOnkIj','warnings','\x20Skill\x20','diagramValidated','remoteForPreflight','company','appcode','44iIknKR','6023360MxaTnT','4nfnrDd','../../core/api-client.js','POST','errors','unknown','1546881PBAQvo','(unknown)','publishInput','savedSkill','resolvedVersion','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','../../skills/runtime-skill-sync.js','resolvedSlug','691705qeacGh','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','submitted','str','valid','payload','Company','scope','7468893nbDFRm','bool','/publish/validate','metadata','files','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','skillCode','existing','\x20has\x20scope=\x22'];a53_0x5037=function(){return _0x517e09;};return a53_0x5037();}import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x259631){const _0xc3ba9d=a53_0x1fe6,{getRuntimeSkillByCode:_0x1c777c,validateRuntimeSkillPublish:_0x1bf33f}=await import(_0xc3ba9d(0x9a)),{readPushDirectory:_0x353b6e,resolvePushDirectoryIdentity:_0x4f9628}=await import('../../skills/runtime-skill-sync.js');if(!_0x259631['accessKey'])throw CliErrors['authRequired']();const _0x2e5dbd=resolvePushScope(_0x259631),_0x2d8377=validateSkillDirectory(_0x259631[_0xc3ba9d(0x6d)](_0xc3ba9d(0x85)));throwIfSkillValidationFailed(_0x2d8377);const {diagram:_0x199250,sourceFilePath:_0x109568}=await readRequiredSkillDiagramInput(_0x259631[_0xc3ba9d(0x6d)]('diagram-file')),_0x175bed=diagramPackageExclusion(_0x109568),_0x47c0d2=_0x4f9628(_0x2d8377[_0xc3ba9d(0x85)],_0x259631['appCode'],remoteFirstMetadataOptions()),_0x4fa3b5=await _0x1c777c(_0x259631[_0xc3ba9d(0x82)],_0x47c0d2[_0xc3ba9d(0x78)]);throwIfBuiltinPushTarget(_0x4fa3b5);if(_0x2e5dbd===_0xc3ba9d(0x95)){const _0x7f3f40=_0x353b6e(_0x2d8377['dir'],_0x259631[_0xc3ba9d(0x82)],{...remoteMissingCompanyReadOptions(),..._0x175bed}),_0x58f58e=await _0x1bf33f(_0x259631[_0xc3ba9d(0x82)],withDiagram(_0x7f3f40[_0xc3ba9d(0x80)],_0x199250),{'visibility':_0xc3ba9d(0x8b)});return{'method':_0xc3ba9d(0x9b),'url':_0xc3ba9d(0x7c)+_0x259631[_0xc3ba9d(0x82)]+'/publish/validate','body':{'skillCode':_0x7f3f40[_0xc3ba9d(0x78)],'visibility':_0xc3ba9d(0x8b),'valid':_0x58f58e[_0xc3ba9d(0x6e)],'errors':_0x58f58e[_0xc3ba9d(0x9c)],'warnings':_0x58f58e[_0xc3ba9d(0x91)],'resolvedSlug':_0x58f58e[_0xc3ba9d(0xa5)],'resolvedVersion':_0x58f58e[_0xc3ba9d(0xa2)],'diagramValidated':_0x58f58e[_0xc3ba9d(0x93)]},'description':_0xc3ba9d(0xa7)};}if(_0x4fa3b5&&_0x4fa3b5['scope']!==_0xc3ba9d(0x7f))throw CliErrors['validation'](_0xc3ba9d(0xa3)+_0x47c0d2[_0xc3ba9d(0x78)]+_0xc3ba9d(0x7a)+(_0x4fa3b5['scope']??_0xc3ba9d(0x9d))+'\x22.');const _0x53237b=_0x353b6e(_0x2d8377[_0xc3ba9d(0x85)],_0x259631[_0xc3ba9d(0x82)],{..._0x4fa3b5?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x175bed}),_0x4e3c84=await _0x1bf33f(_0x259631['appCode'],withDiagram(_0x53237b[_0xc3ba9d(0x80)],_0x199250),{'visibility':'PRIVATE'});return{'method':_0xc3ba9d(0x9b),'url':_0xc3ba9d(0x7c)+_0x259631[_0xc3ba9d(0x82)]+_0xc3ba9d(0x74),'body':{'skillCode':_0x53237b[_0xc3ba9d(0x78)],'visibility':_0xc3ba9d(0x88),'valid':_0x4e3c84[_0xc3ba9d(0x6e)],'errors':_0x4e3c84['errors'],'warnings':_0x4e3c84[_0xc3ba9d(0x91)],'resolvedSlug':_0x4e3c84[_0xc3ba9d(0xa5)],'resolvedVersion':_0x4e3c84[_0xc3ba9d(0xa2)],'diagramValidated':_0x4e3c84['diagramValidated']},'description':_0xc3ba9d(0x77)};}export async function skillPushExecute(_0x279ff1){const _0x3854f1=a53_0x1fe6,{createPersonalRuntimeSkill:_0x2c5a01,downloadRuntimeSkillPackage:_0xee93,getRuntimeSkillByCode:_0x18ce52,publishCompanyRuntimeSkill:_0x8c4b86,updatePersonalRuntimeSkill:_0x33ddb5,validateRuntimeSkillPublish:_0x29bcae}=await import('../../core/api-client.js'),{verifyRuntimeSkillPackage:_0xdf8b40,verifyRuntimeSkillBundle:_0x272414,readPushDirectory:_0x5ee985,refreshPushDirectoryMetadataFromRemote:_0x7d8705,recordPushedRuntimeSkill:_0x2a892d,resolvePushDirectoryIdentity:_0x3ec157}=await import(_0x3854f1(0xa4));if(!_0x279ff1['accessKey'])throw CliErrors[_0x3854f1(0x8d)]();const _0x2d5b58=resolvePushScope(_0x279ff1),_0x434486=_0x279ff1['bool']('confirm-warnings')||_0x279ff1[_0x3854f1(0x73)]('confirmWarnings'),_0x2ced81=validateSkillDirectory(_0x279ff1['str']('dir'));throwIfSkillValidationFailed(_0x2ced81);const {diagram:_0x2846c3,sourceFilePath:_0x41e6ba}=await readRequiredSkillDiagramInput(_0x279ff1[_0x3854f1(0x6d)]('diagram-file')),_0x3a4b28=diagramPackageExclusion(_0x41e6ba),_0x3bf99a=_0x2ced81[_0x3854f1(0x85)];let _0x2884bb;if(_0x2d5b58==='company'){const _0x32886a=_0x3ec157(_0x3bf99a,_0x279ff1[_0x3854f1(0x82)],remoteFirstMetadataOptions()),_0x2e0e72=await _0x18ce52(_0x279ff1[_0x3854f1(0x82)],_0x32886a['skillCode']);throwIfBuiltinPushTarget(_0x2e0e72);if(_0x2e0e72)_0x7d8705(_0x3bf99a,_0x2e0e72,_0x279ff1[_0x3854f1(0x82)]);const _0x36119f=_0x5ee985(_0x3bf99a,_0x279ff1[_0x3854f1(0x82)],{..._0x2e0e72?{'targetScope':_0x3854f1(0x95),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x3a4b28});_0x2884bb={'scope':_0x3854f1(0x95),'payload':_0x36119f,'publishInput':withDiagram(_0x36119f[_0x3854f1(0x80)],_0x2846c3),'remoteForPreflight':_0x2e0e72,'warnings':[]};}else{const _0x544836=_0x279ff1[_0x3854f1(0x6d)](_0x3854f1(0x96))[_0x3854f1(0x89)](),_0x1ad71f=Boolean(_0x544836),_0x237e6a=allowRetargetArgs(_0x1ad71f),_0x357b8f=_0x3ec157(_0x3bf99a,_0x279ff1[_0x3854f1(0x82)],{...remoteFirstMetadataOptions(),..._0x237e6a[0x0]}),_0x519541=await _0x18ce52(_0x279ff1[_0x3854f1(0x82)],_0x357b8f[_0x3854f1(0x78)]);throwIfBuiltinPushTarget(_0x519541);if(_0x519541){if(_0x519541['scope']!==_0x3854f1(0x7f)){if(_0x1ad71f)throw CliErrors[_0x3854f1(0x8e)](_0x3854f1(0xa3)+_0x357b8f[_0x3854f1(0x78)]+_0x3854f1(0x7a)+(_0x519541[_0x3854f1(0x71)]??_0x3854f1(0x9d))+'\x22.');_0x7d8705(_0x3bf99a,_0x519541,_0x279ff1[_0x3854f1(0x82)]);}else!_0x1ad71f&&_0x7d8705(_0x3bf99a,_0x519541,_0x279ff1['appCode']);}const _0x394fba=_0x5ee985(_0x3bf99a,_0x279ff1[_0x3854f1(0x82)],{..._0x519541?remotePersonalReadOptions(_0x1ad71f,_0x237e6a[0x0]):remoteMissingPersonalReadOptions(_0x237e6a[0x0]),..._0x3a4b28}),_0x2bbb19=_0x519541?.[_0x3854f1(0x71)]===_0x3854f1(0x7f)&&_0x519541[_0x3854f1(0x78)]===_0x394fba[_0x3854f1(0x78)]?_0x519541:undefined,_0x220696=_0x1ad71f&&_0x2bbb19?withRetargetExistingMetadata(_0x394fba[_0x3854f1(0x80)],_0x2bbb19,{'preferInputSkillName':Boolean(_0x394fba['frontmatterDisplayName'])}):_0x394fba[_0x3854f1(0x80)],_0x3e32f3=_0x1ad71f?buildRetargetWarning(_0x357b8f[_0x3854f1(0x75)],_0x279ff1[_0x3854f1(0x82)]):[];_0x2884bb={'scope':_0x3854f1(0x7f),'payload':_0x394fba,'publishInput':withDiagram(_0x220696,_0x2846c3),'remoteForPreflight':_0x2bbb19,'existing':_0x2bbb19,'warnings':[..._0x2ced81[_0x3854f1(0x91)],..._0x3e32f3]};}const _0x3eabd1=await runRemoteContentPreflight({'scope':_0x2884bb[_0x3854f1(0x71)],'remote':_0x2884bb[_0x3854f1(0x94)],'publishInput':_0x2884bb[_0x3854f1(0xa0)],'skillCode':_0x2884bb['payload'][_0x3854f1(0x78)],'appCode':_0x279ff1['appCode'],'downloadRuntimeSkillPackage':_0xee93,'verifyRuntimeSkillBundle':_0x272414});if(_0x3eabd1[_0x3854f1(0x7d)]===_0x3854f1(0x86))return _0x2884bb['scope']===_0x3854f1(0x95)?_0x2a892d(_0x3bf99a,_0x3eabd1[_0x3854f1(0xa1)],_0x279ff1[_0x3854f1(0x82)],{'scope':_0x3854f1(0x95)}):_0x2a892d(_0x3bf99a,_0x3eabd1[_0x3854f1(0xa1)],_0x279ff1['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x3eabd1['savedSkill']),'scope':_0x2884bb[_0x3854f1(0x71)],..._0x2884bb[_0x3854f1(0x71)]===_0x3854f1(0x7f)?{'warnings':_0x2884bb[_0x3854f1(0x91)]}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x2884bb[_0x3854f1(0x71)])+_0x3854f1(0x92)+_0x2884bb[_0x3854f1(0x6f)][_0x3854f1(0x78)]+_0x3854f1(0x7e)};if(_0x2884bb[_0x3854f1(0x71)]==='company'){const _0x2c7cb1=await _0x29bcae(_0x279ff1[_0x3854f1(0x82)],_0x2884bb['publishInput'],{'visibility':_0x3854f1(0x8b)});throwIfPublishValidationFailed('company',_0x2884bb['payload'][_0x3854f1(0x78)],_0x2c7cb1),throwIfUnconfirmedPublishWarnings(_0x3854f1(0x95),_0x2884bb['payload'][_0x3854f1(0x78)],_0x2c7cb1[_0x3854f1(0x91)],_0x434486);const _0x51e544=await _0x8c4b86(_0x279ff1[_0x3854f1(0x82)],_0x2884bb[_0x3854f1(0xa0)],{'confirmWarnings':_0x434486});return _0x2a892d(_0x3bf99a,{..._0x51e544,'files':_0x2884bb[_0x3854f1(0xa0)][_0x3854f1(0x76)]},_0x279ff1['appCode'],{'scope':_0x3854f1(0x95)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x51e544),'scope':'company','reviewState':_0x3854f1(0x6c),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x2c7cb1[_0x3854f1(0x91)]}},'message':_0x3854f1(0x8c)+_0x2884bb[_0x3854f1(0x6f)][_0x3854f1(0x78)]+'\x20version\x20'+(_0x51e544[_0x3854f1(0x84)]??_0x3854f1(0x9f))+'\x20for\x20review'};}const _0x4022e4=await _0x29bcae(_0x279ff1['appCode'],_0x2884bb[_0x3854f1(0xa0)],{'visibility':_0x3854f1(0x88)});throwIfPublishValidationFailed(_0x3854f1(0x7f),_0x2884bb[_0x3854f1(0x6f)][_0x3854f1(0x78)],_0x4022e4),throwIfUnconfirmedPublishWarnings(_0x3854f1(0x7f),_0x2884bb['payload']['skillCode'],_0x4022e4[_0x3854f1(0x91)],_0x434486);const _0x188ba3={'confirmWarnings':_0x434486},_0x23296a=_0x2884bb[_0x3854f1(0x79)]?await _0x33ddb5(_0x2884bb[_0x3854f1(0x6f)][_0x3854f1(0x78)],_0x279ff1[_0x3854f1(0x82)],_0x2884bb[_0x3854f1(0xa0)],_0x188ba3):await _0x2c5a01(_0x279ff1['appCode'],_0x2884bb[_0x3854f1(0xa0)],_0x188ba3);let _0xd8446d=_0x23296a;if(isMultiFileManifest(_0x2884bb[_0x3854f1(0xa0)][_0x3854f1(0x76)])){const _0x47db14=await _0xee93(_0x3854f1(0x7f),_0x23296a[_0x3854f1(0x78)]||_0x2884bb[_0x3854f1(0x6f)][_0x3854f1(0x78)],_0x279ff1[_0x3854f1(0x82)]);_0x272414(_0x2884bb[_0x3854f1(0xa0)][_0x3854f1(0x76)],_0x47db14),_0xd8446d={..._0x23296a,'files':_0x2884bb['publishInput'][_0x3854f1(0x76)]};}else{if(isPackageBackedManifest(_0x23296a['files'])){const _0x3a0ebe=await _0xee93(_0x3854f1(0x7f),_0x23296a['skillCode']||_0x2884bb[_0x3854f1(0x6f)][_0x3854f1(0x78)],_0x279ff1[_0x3854f1(0x82)]);_0xdf8b40(_0x23296a['files'],_0x3a0ebe);}}return _0x2a892d(_0x3bf99a,_0xd8446d,_0x279ff1[_0x3854f1(0x82)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x23296a),'warnings':_0x2884bb[_0x3854f1(0x91)],'validation':{'warnings':_0x4022e4[_0x3854f1(0x91)]},'diagramBound':!![]},'message':_0x2884bb[_0x3854f1(0x79)]?_0x3854f1(0x7b)+_0x2884bb['payload']['skillCode']:_0x3854f1(0x8f)+_0x2884bb['payload'][_0x3854f1(0x78)]};}function scopeLabel(_0xddef55){const _0x108f8f=a53_0x1fe6;return _0xddef55===_0x108f8f(0x95)?_0x108f8f(0x70):'Personal';}function withDiagram(_0x228c06,_0x311da3){return{..._0x228c06,'diagram':_0x311da3};}function diagramPackageExclusion(_0x58830a){return _0x58830a?{'excludedFilePaths':[_0x58830a]}:{};}
|
|
1
|
+
(function(_0x345f1f,_0x5a6635){const _0x522328=a73_0x877a,_0x1f0872=_0x345f1f();while(!![]){try{const _0x228acc=parseInt(_0x522328(0xa2))/0x1+parseInt(_0x522328(0xcb))/0x2*(parseInt(_0x522328(0xbf))/0x3)+parseInt(_0x522328(0x9f))/0x4*(parseInt(_0x522328(0xa6))/0x5)+-parseInt(_0x522328(0xb0))/0x6*(-parseInt(_0x522328(0xa7))/0x7)+-parseInt(_0x522328(0xb4))/0x8+parseInt(_0x522328(0xa5))/0x9+-parseInt(_0x522328(0xd1))/0xa;if(_0x228acc===_0x5a6635)break;else _0x1f0872['push'](_0x1f0872['shift']());}catch(_0xa8530f){_0x1f0872['push'](_0x1f0872['shift']());}}}(a73_0x4a44,0x50b3c));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{readRequiredSkillDiagramInput}from'./diagram.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';function a73_0x4a44(){const _0x3f4575=['\x20Skill\x20','appCode','../../core/api-client.js','diagram-file','Created\x20personal\x20Skill\x20','input','authRequired','diagramValidated','unknown','151852IaLJWr','publishInput','Company','remoteForPreflight','resolvedSlug','accessKey','13051090GacjlC','frontmatterDisplayName','Updated\x20personal\x20Skill\x20','\x20has\x20scope=\x22','skillCode','dir','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','NAMESPACE_ONLY','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','(unknown)','confirmWarnings','str','4fEUsJI','/api/cli/v1/skills/','personal','443859styHWv','validation','files','1686762DGYfEY','3015970rfGjcX','7lqhYrD','submitted','Personal','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','/publish/validate','appcode','savedSkill','existing','status','374586bSreZe','valid','POST','payload','1541752qUloUj','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','../../skills/runtime-skill-sync.js','\x20version\x20','\x20for\x20review','bool','PRIVATE','warnings','errors','trim','scope','21Ousuht','resolvedVersion','company'];a73_0x4a44=function(){return _0x3f4575;};return a73_0x4a44();}export async function skillPushDryRun(_0xc7a646){const _0x188440=a73_0x877a,{getRuntimeSkillByCode:_0x5715ad,validateRuntimeSkillPublish:_0xc04bc1}=await import(_0x188440(0xc4)),{readPushDirectory:_0x1bd640,resolvePushDirectoryIdentity:_0x145c58}=await import(_0x188440(0xb6));if(!_0xc7a646[_0x188440(0xd0)])throw CliErrors['authRequired']();const _0x46ad63=resolvePushScope(_0xc7a646),_0x25de30=validateSkillDirectory(_0xc7a646[_0x188440(0x9e)](_0x188440(0x98)));throwIfSkillValidationFailed(_0x25de30);const {diagram:_0x25f9d4,sourceFilePath:_0x27ff86}=await readRequiredSkillDiagramInput(_0xc7a646['str'](_0x188440(0xc5))),_0x2d5232=diagramPackageExclusion(_0x27ff86),_0x5aedf1=_0x145c58(_0x25de30[_0x188440(0x98)],_0xc7a646[_0x188440(0xc3)],remoteFirstMetadataOptions()),_0x26574f=await _0x5715ad(_0xc7a646[_0x188440(0xc3)],_0x5aedf1[_0x188440(0x97)]);throwIfBuiltinPushTarget(_0x26574f);if(_0x46ad63===_0x188440(0xc1)){const _0x207dbb=_0x1bd640(_0x25de30[_0x188440(0x98)],_0xc7a646[_0x188440(0xc3)],{...remoteMissingCompanyReadOptions(),..._0x2d5232}),_0x26603b=await _0xc04bc1(_0xc7a646[_0x188440(0xc3)],withDiagram(_0x207dbb[_0x188440(0xc7)],_0x25f9d4),{'visibility':_0x188440(0x9a)});return{'method':_0x188440(0xb2),'url':_0x188440(0xa0)+_0xc7a646[_0x188440(0xc3)]+'/publish/validate','body':{'skillCode':_0x207dbb[_0x188440(0x97)],'visibility':_0x188440(0x9a),'valid':_0x26603b[_0x188440(0xb1)],'errors':_0x26603b['errors'],'warnings':_0x26603b[_0x188440(0xbb)],'resolvedSlug':_0x26603b[_0x188440(0xcf)],'resolvedVersion':_0x26603b[_0x188440(0xc0)],'diagramValidated':_0x26603b[_0x188440(0xc9)]},'description':_0x188440(0x99)};}if(_0x26574f&&_0x26574f['scope']!=='personal')throw CliErrors[_0x188440(0xa3)](_0x188440(0x9b)+_0x5aedf1[_0x188440(0x97)]+'\x20has\x20scope=\x22'+(_0x26574f[_0x188440(0xbe)]??_0x188440(0xca))+'\x22.');const _0x29a390=_0x1bd640(_0x25de30[_0x188440(0x98)],_0xc7a646[_0x188440(0xc3)],{..._0x26574f?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x2d5232}),_0x53af68=await _0xc04bc1(_0xc7a646['appCode'],withDiagram(_0x29a390['input'],_0x25f9d4),{'visibility':_0x188440(0xba)});return{'method':_0x188440(0xb2),'url':'/api/cli/v1/skills/'+_0xc7a646[_0x188440(0xc3)]+_0x188440(0xab),'body':{'skillCode':_0x29a390[_0x188440(0x97)],'visibility':_0x188440(0xba),'valid':_0x53af68[_0x188440(0xb1)],'errors':_0x53af68[_0x188440(0xbc)],'warnings':_0x53af68['warnings'],'resolvedSlug':_0x53af68[_0x188440(0xcf)],'resolvedVersion':_0x53af68[_0x188440(0xc0)],'diagramValidated':_0x53af68[_0x188440(0xc9)]},'description':_0x188440(0xaa)};}export async function skillPushExecute(_0x237c0c){const _0x57c959=a73_0x877a,{createPersonalRuntimeSkill:_0x248d74,downloadRuntimeSkillPackage:_0x48bffa,getRuntimeSkillByCode:_0x111acd,publishCompanyRuntimeSkill:_0x7f3501,updatePersonalRuntimeSkill:_0x3c44f6,validateRuntimeSkillPublish:_0x55f82d}=await import(_0x57c959(0xc4)),{verifyRuntimeSkillPackage:_0x10bb96,verifyRuntimeSkillBundle:_0x287d0a,readPushDirectory:_0xb267f9,refreshPushDirectoryMetadataFromRemote:_0x313f09,recordPushedRuntimeSkill:_0x152c25,resolvePushDirectoryIdentity:_0x1726f0}=await import('../../skills/runtime-skill-sync.js');if(!_0x237c0c['accessKey'])throw CliErrors[_0x57c959(0xc8)]();const _0x1fd2ba=resolvePushScope(_0x237c0c),_0x34d8e9=_0x237c0c['bool']('confirm-warnings')||_0x237c0c[_0x57c959(0xb9)](_0x57c959(0x9d)),_0x5ba0f2=validateSkillDirectory(_0x237c0c['str']('dir'));throwIfSkillValidationFailed(_0x5ba0f2);const {diagram:_0x4844d4,sourceFilePath:_0x307ec8}=await readRequiredSkillDiagramInput(_0x237c0c[_0x57c959(0x9e)](_0x57c959(0xc5))),_0x2a5744=diagramPackageExclusion(_0x307ec8),_0x193b00=_0x5ba0f2[_0x57c959(0x98)];let _0x463dbf;if(_0x1fd2ba==='company'){const _0x8c5400=_0x1726f0(_0x193b00,_0x237c0c['appCode'],remoteFirstMetadataOptions()),_0x340070=await _0x111acd(_0x237c0c[_0x57c959(0xc3)],_0x8c5400[_0x57c959(0x97)]);throwIfBuiltinPushTarget(_0x340070);if(_0x340070)_0x313f09(_0x193b00,_0x340070,_0x237c0c[_0x57c959(0xc3)]);const _0xf99ba6=_0xb267f9(_0x193b00,_0x237c0c[_0x57c959(0xc3)],{..._0x340070?{'targetScope':'company','ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x2a5744});_0x463dbf={'scope':_0x57c959(0xc1),'payload':_0xf99ba6,'publishInput':withDiagram(_0xf99ba6[_0x57c959(0xc7)],_0x4844d4),'remoteForPreflight':_0x340070,'warnings':[]};}else{const _0x4da2ea=_0x237c0c[_0x57c959(0x9e)](_0x57c959(0xac))[_0x57c959(0xbd)](),_0x415767=Boolean(_0x4da2ea),_0x267f96=allowRetargetArgs(_0x415767),_0x25a9c5=_0x1726f0(_0x193b00,_0x237c0c[_0x57c959(0xc3)],{...remoteFirstMetadataOptions(),..._0x267f96[0x0]}),_0x20ea01=await _0x111acd(_0x237c0c[_0x57c959(0xc3)],_0x25a9c5[_0x57c959(0x97)]);throwIfBuiltinPushTarget(_0x20ea01);if(_0x20ea01){if(_0x20ea01['scope']!==_0x57c959(0xa1)){if(_0x415767)throw CliErrors[_0x57c959(0xa3)](_0x57c959(0x9b)+_0x25a9c5[_0x57c959(0x97)]+_0x57c959(0x96)+(_0x20ea01[_0x57c959(0xbe)]??'unknown')+'\x22.');_0x313f09(_0x193b00,_0x20ea01,_0x237c0c[_0x57c959(0xc3)]);}else!_0x415767&&_0x313f09(_0x193b00,_0x20ea01,_0x237c0c[_0x57c959(0xc3)]);}const _0x958f14=_0xb267f9(_0x193b00,_0x237c0c[_0x57c959(0xc3)],{..._0x20ea01?remotePersonalReadOptions(_0x415767,_0x267f96[0x0]):remoteMissingPersonalReadOptions(_0x267f96[0x0]),..._0x2a5744}),_0x471170=_0x20ea01?.[_0x57c959(0xbe)]===_0x57c959(0xa1)&&_0x20ea01['skillCode']===_0x958f14['skillCode']?_0x20ea01:undefined,_0x2e8309=_0x415767&&_0x471170?withRetargetExistingMetadata(_0x958f14[_0x57c959(0xc7)],_0x471170,{'preferInputSkillName':Boolean(_0x958f14[_0x57c959(0xd2)])}):_0x958f14['input'],_0x29732f=_0x415767?buildRetargetWarning(_0x25a9c5['metadata'],_0x237c0c[_0x57c959(0xc3)]):[];_0x463dbf={'scope':_0x57c959(0xa1),'payload':_0x958f14,'publishInput':withDiagram(_0x2e8309,_0x4844d4),'remoteForPreflight':_0x471170,'existing':_0x471170,'warnings':[..._0x5ba0f2[_0x57c959(0xbb)],..._0x29732f]};}const _0x4125ad=await runRemoteContentPreflight({'scope':_0x463dbf[_0x57c959(0xbe)],'remote':_0x463dbf[_0x57c959(0xce)],'publishInput':_0x463dbf['publishInput'],'skillCode':_0x463dbf[_0x57c959(0xb3)][_0x57c959(0x97)],'appCode':_0x237c0c['appCode'],'downloadRuntimeSkillPackage':_0x48bffa,'verifyRuntimeSkillBundle':_0x287d0a});if(_0x4125ad[_0x57c959(0xaf)]==='identical')return _0x463dbf['scope']==='company'?_0x152c25(_0x193b00,_0x4125ad[_0x57c959(0xad)],_0x237c0c[_0x57c959(0xc3)],{'scope':_0x57c959(0xc1)}):_0x152c25(_0x193b00,_0x4125ad[_0x57c959(0xad)],_0x237c0c[_0x57c959(0xc3)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4125ad[_0x57c959(0xad)]),'scope':_0x463dbf[_0x57c959(0xbe)],..._0x463dbf[_0x57c959(0xbe)]==='personal'?{'warnings':_0x463dbf['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x463dbf[_0x57c959(0xbe)])+_0x57c959(0xc2)+_0x463dbf[_0x57c959(0xb3)]['skillCode']+_0x57c959(0xb5)};if(_0x463dbf[_0x57c959(0xbe)]===_0x57c959(0xc1)){const _0x39ef10=await _0x55f82d(_0x237c0c[_0x57c959(0xc3)],_0x463dbf[_0x57c959(0xcc)],{'visibility':_0x57c959(0x9a)});throwIfPublishValidationFailed(_0x57c959(0xc1),_0x463dbf['payload'][_0x57c959(0x97)],_0x39ef10),throwIfUnconfirmedPublishWarnings(_0x57c959(0xc1),_0x463dbf['payload'][_0x57c959(0x97)],_0x39ef10[_0x57c959(0xbb)],_0x34d8e9);const _0x69f8d9=await _0x7f3501(_0x237c0c[_0x57c959(0xc3)],_0x463dbf[_0x57c959(0xcc)],{'confirmWarnings':_0x34d8e9});return _0x152c25(_0x193b00,{..._0x69f8d9,'files':_0x463dbf[_0x57c959(0xcc)][_0x57c959(0xa4)]},_0x237c0c['appCode'],{'scope':_0x57c959(0xc1)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x69f8d9),'scope':_0x57c959(0xc1),'reviewState':_0x57c959(0xa8),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x39ef10[_0x57c959(0xbb)]}},'message':'Submitted\x20company\x20Skill\x20'+_0x463dbf[_0x57c959(0xb3)][_0x57c959(0x97)]+_0x57c959(0xb7)+(_0x69f8d9['version']??_0x57c959(0x9c))+_0x57c959(0xb8)};}const _0x1d13e8=await _0x55f82d(_0x237c0c[_0x57c959(0xc3)],_0x463dbf[_0x57c959(0xcc)],{'visibility':_0x57c959(0xba)});throwIfPublishValidationFailed(_0x57c959(0xa1),_0x463dbf[_0x57c959(0xb3)][_0x57c959(0x97)],_0x1d13e8),throwIfUnconfirmedPublishWarnings(_0x57c959(0xa1),_0x463dbf['payload'][_0x57c959(0x97)],_0x1d13e8['warnings'],_0x34d8e9);const _0x4cd953={'confirmWarnings':_0x34d8e9},_0x28a573=_0x463dbf['existing']?await _0x3c44f6(_0x463dbf[_0x57c959(0xb3)]['skillCode'],_0x237c0c[_0x57c959(0xc3)],_0x463dbf[_0x57c959(0xcc)],_0x4cd953):await _0x248d74(_0x237c0c[_0x57c959(0xc3)],_0x463dbf['publishInput'],_0x4cd953);let _0x3ecbee=_0x28a573;if(isMultiFileManifest(_0x463dbf[_0x57c959(0xcc)]['files'])){const _0x1eccfe=await _0x48bffa(_0x57c959(0xa1),_0x28a573['skillCode']||_0x463dbf[_0x57c959(0xb3)]['skillCode'],_0x237c0c[_0x57c959(0xc3)]);_0x287d0a(_0x463dbf[_0x57c959(0xcc)][_0x57c959(0xa4)],_0x1eccfe),_0x3ecbee={..._0x28a573,'files':_0x463dbf[_0x57c959(0xcc)][_0x57c959(0xa4)]};}else{if(isPackageBackedManifest(_0x28a573[_0x57c959(0xa4)])){const _0x1289c9=await _0x48bffa(_0x57c959(0xa1),_0x28a573[_0x57c959(0x97)]||_0x463dbf[_0x57c959(0xb3)][_0x57c959(0x97)],_0x237c0c['appCode']);_0x10bb96(_0x28a573['files'],_0x1289c9);}}return _0x152c25(_0x193b00,_0x3ecbee,_0x237c0c[_0x57c959(0xc3)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x28a573),'warnings':_0x463dbf[_0x57c959(0xbb)],'validation':{'warnings':_0x1d13e8[_0x57c959(0xbb)]},'diagramBound':!![]},'message':_0x463dbf[_0x57c959(0xae)]?_0x57c959(0x95)+_0x463dbf[_0x57c959(0xb3)][_0x57c959(0x97)]:_0x57c959(0xc6)+_0x463dbf[_0x57c959(0xb3)][_0x57c959(0x97)]};}function scopeLabel(_0x237569){const _0x588bf5=a73_0x877a;return _0x237569===_0x588bf5(0xc1)?_0x588bf5(0xcd):_0x588bf5(0xa9);}function withDiagram(_0x5e88da,_0x536151){return{..._0x5e88da,'diagram':_0x536151};}function a73_0x877a(_0x2c440f,_0x2e65e2){_0x2c440f=_0x2c440f-0x95;const _0x4a4489=a73_0x4a44();let _0x877a3e=_0x4a4489[_0x2c440f];return _0x877a3e;}function diagramPackageExclusion(_0x53c37f){return _0x53c37f?{'excludedFilePaths':[_0x53c37f]}:{};}
|