@lovrabet/lovrabet-cli 2.3.10-beta.1 → 2.3.10-beta.3
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/approval/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/init.d.ts +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- 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/domain-config.d.ts +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.d.ts +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.d.ts +5 -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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.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/generated/official-routing.d.ts +6 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +3 -3
- package/lib/generated/routing-contract.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.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/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/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.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 +1 -1
- package/skills/lovrabet/references/lovrabet-config-commands.md +17 -33
- package/skills/lovrabet/references/lovrabet-config.md +11 -3
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +4 -4
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a68_0x5540ea=a68_0x3ed0;(function(_0x564665,_0x103ccb){const _0x3f5665=a68_0x3ed0,_0x4e467b=_0x564665();while(!![]){try{const _0x1d5316=parseInt(_0x3f5665(0x20d))/0x1+-parseInt(_0x3f5665(0x20c))/0x2+parseInt(_0x3f5665(0x1f1))/0x3*(-parseInt(_0x3f5665(0x1fb))/0x4)+-parseInt(_0x3f5665(0x1cc))/0x5*(-parseInt(_0x3f5665(0x201))/0x6)+-parseInt(_0x3f5665(0x1db))/0x7*(parseInt(_0x3f5665(0x1ce))/0x8)+-parseInt(_0x3f5665(0x1f0))/0x9*(parseInt(_0x3f5665(0x1c2))/0xa)+parseInt(_0x3f5665(0x1d8))/0xb;if(_0x1d5316===_0x103ccb)break;else _0x4e467b['push'](_0x4e467b['shift']());}catch(_0x53886c){_0x4e467b['push'](_0x4e467b['shift']());}}}(a68_0x1e4c,0x73078));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';function a68_0x3ed0(_0x16dcaa,_0x20c114){_0x16dcaa=_0x16dcaa-0x1be;const _0x1e4ce8=a68_0x1e4c();let _0x3ed0f1=_0x1e4ce8[_0x16dcaa];return _0x3ed0f1;}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=a68_0x5540ea(0x1e9);export function getServiceRegistryPath(_0x38ddf8={}){const _0x43d061=a68_0x5540ea;return resolve(_0x38ddf8['homeDir']??homedir(),PRODUCT_CONFIG[_0x43d061(0x1cf)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x4468ca={}){const _0x4d3866=a68_0x5540ea,_0x31614f=getServiceRegistryPath(_0x4468ca);if(!existsSync(_0x31614f))return emptyServiceRegistry();try{const _0x48b52c=readFileSync(_0x31614f,'utf8');if(!_0x48b52c[_0x4d3866(0x1ca)]())return emptyServiceRegistry();const _0x3788c6=JSON[_0x4d3866(0x1c1)](_0x48b52c);if(_0x3788c6[_0x4d3866(0x1e5)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x4d3866(0x1d4)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x3788c6[_0x4d3866(0x1e5)]),_0x4d3866(0x1ee)+_0x31614f+'.');if(!Array[_0x4d3866(0x204)](_0x3788c6[_0x4d3866(0x20b)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3788c6[_0x4d3866(0x1ed)],'services':_0x3788c6[_0x4d3866(0x20b)]};}catch(_0x156ae8){if(_0x156ae8 instanceof Error&&_0x156ae8[_0x4d3866(0x211)]===_0x4d3866(0x1f6))throw _0x156ae8;throw CliErrors[_0x4d3866(0x1d4)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x31614f,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x5f2c56,_0x2c523e={}){const _0x1e3cda=a68_0x5540ea,_0x2d8fd3=getServiceRegistryPath(_0x2c523e),_0x51a415=dirname(_0x2d8fd3);!existsSync(_0x51a415)&&mkdirSync(_0x51a415,{'recursive':!![]});const _0x4341b3=_0x2d8fd3+_0x1e3cda(0x1d5);try{writeFileSync(_0x4341b3,JSON[_0x1e3cda(0x203)](_0x5f2c56,null,0x2)+'\x0a',{'encoding':_0x1e3cda(0x1ea),'mode':0x180}),renameSync(_0x4341b3,_0x2d8fd3);}catch(_0x24aee5){try{unlinkSync(_0x4341b3);}catch{}if(_0x24aee5?.['code']===_0x1e3cda(0x20f))throw CliErrors['validation']('Cannot\x20write\x20service\x20registry:\x20'+_0x2d8fd3);throw _0x24aee5;}return _0x2d8fd3;}export function loadServiceManifestFromFile(_0x2a5384){const _0x28706c=a68_0x5540ea,_0x19905c=resolve(_0x2a5384);if(!existsSync(_0x19905c))throw CliErrors['validation'](_0x28706c(0x1bf)+_0x2a5384);let _0x28b425;const _0xd634b9=readFileSync(_0x19905c,'utf8');try{_0x28b425=JSON[_0x28706c(0x1c1)](_0xd634b9);}catch{throw CliErrors[_0x28706c(0x1d4)](_0x28706c(0x1f8)+_0x2a5384,_0x28706c(0x1fe));}const _0x2d1bb0=sha256(_0xd634b9),_0x371a10=extractLoadedServiceManifests(_0x28b425,_0x2d1bb0),_0x4b3127=aggregateValidationReports(_0x371a10),_0x419765=_0x371a10[0x0];return{'filePath':_0x19905c,'hash':_0x2d1bb0,'kind':isServiceRegistryLike(_0x28b425)?_0x28706c(0x1f9):_0x28706c(0x1fc),'manifest':_0x419765?.['manifest']??_0x28b425,'report':_0x4b3127,'normalizedManifest':_0x371a10[_0x28706c(0x1ff)]===0x1?_0x419765?.[_0x28706c(0x20a)]:undefined,'manifests':_0x371a10};}export function importServiceManifest(_0x2684df,_0x458a9d={}){const _0x473394=a68_0x5540ea,_0x29e225=loadServiceManifestFromFile(_0x2684df);if(!_0x29e225[_0x473394(0x1fd)]['ok'])throw CliErrors['validation'](formatValidationFailure(_0x29e225[_0x473394(0x1fd)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x29e225['manifests'][_0x473394(0x1ff)]===0x0)throw CliErrors[_0x473394(0x1d4)](_0x473394(0x1c4),_0x473394(0x1da));const _0x1c7b37=readServiceRegistry(_0x458a9d),_0x14ba4f=(_0x458a9d[_0x473394(0x1e1)]??(()=>new Date()))()['toISOString'](),_0x4764e3=[];let _0x3ff855=0x0,_0x54c9c2=0x0;for(const _0x510378 of _0x29e225[_0x473394(0x1cd)]){if(!_0x510378[_0x473394(0x20a)])continue;const _0x9c633b=_0x510378[_0x473394(0x20a)][_0x473394(0x1f7)][_0x473394(0x209)],_0x27e33b={'serviceCode':_0x9c633b,'version':_0x510378[_0x473394(0x20a)][_0x473394(0x208)],'importedAt':_0x14ba4f,'source':{'type':_0x473394(0x200),'path':_0x29e225['filePath'],'hash':_0x510378[_0x473394(0x1f5)]},'manifest':_0x510378[_0x473394(0x1fc)],'normalizedManifest':_0x510378['normalizedManifest']},_0x3141b5=_0x1c7b37[_0x473394(0x20b)][_0x473394(0x1e6)](_0x4a6ff7=>_0x4a6ff7[_0x473394(0x1f2)]===_0x9c633b);_0x3141b5>=0x0?(_0x1c7b37[_0x473394(0x20b)][_0x3141b5]=_0x27e33b,_0x54c9c2++):(_0x1c7b37['services']['push'](_0x27e33b),_0x3ff855++),_0x4764e3[_0x473394(0x1d3)](_0x27e33b);}_0x1c7b37['services'][_0x473394(0x1f3)]((_0x5ef4ae,_0x14fc4f)=>_0x5ef4ae[_0x473394(0x1f2)][_0x473394(0x207)](_0x14fc4f['serviceCode'])),_0x1c7b37[_0x473394(0x1ed)]=_0x14ba4f;const _0x1d7041=writeServiceRegistry(_0x1c7b37,_0x458a9d);return{'registryPath':_0x1d7041,'entry':_0x4764e3[0x0],'replaced':_0x4764e3[_0x473394(0x1ff)]===0x1?_0x54c9c2===0x1:_0x54c9c2>0x0,'entries':_0x4764e3,'imported':_0x3ff855,'updated':_0x54c9c2,'serviceCount':_0x1c7b37[_0x473394(0x20b)][_0x473394(0x1ff)]};}export function exportServiceManifest(_0x387db6,_0x240c6d,_0x101f4b={}){const _0x2aeed2=a68_0x5540ea,_0x528c24=getServiceRegistryPath(_0x101f4b),_0x4ce624=getLocalServiceEntry(_0x387db6,_0x101f4b);if(!_0x4ce624)throw CliErrors[_0x2aeed2(0x1d4)](_0x2aeed2(0x1e0)+_0x387db6,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x5f4970=resolve(_0x240c6d),_0x3af82f=dirname(_0x5f4970);return!existsSync(_0x3af82f)&&mkdirSync(_0x3af82f,{'recursive':!![]}),writeFileSync(_0x5f4970,JSON[_0x2aeed2(0x203)](_0x4ce624['manifest'],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x528c24,'filePath':_0x5f4970,'entry':_0x4ce624};}export function removeServiceManifest(_0x57f0e1,_0x1a3eaf={}){const _0x3e4faa=a68_0x5540ea,_0x2b68a0=readServiceRegistry(_0x1a3eaf),_0x35337c=_0x57f0e1[_0x3e4faa(0x1ca)](),_0x4ea454=_0x2b68a0[_0x3e4faa(0x20b)][_0x3e4faa(0x1e6)](_0x28483a=>_0x28483a[_0x3e4faa(0x1f2)]===_0x35337c);if(_0x4ea454<0x0)throw CliErrors[_0x3e4faa(0x1d4)](_0x3e4faa(0x1e0)+_0x35337c,_0x3e4faa(0x1df));const [_0xe76cdd]=_0x2b68a0['services'][_0x3e4faa(0x1e4)](_0x4ea454,0x1),_0x2bb5d4=(_0x1a3eaf[_0x3e4faa(0x1e1)]??(()=>new Date()))()['toISOString']();_0x2b68a0['updatedAt']=_0x2bb5d4;const _0x1dd6b=writeServiceRegistry(_0x2b68a0,_0x1a3eaf);return{'registryPath':_0x1dd6b,'entry':_0xe76cdd,'serviceCount':_0x2b68a0[_0x3e4faa(0x20b)][_0x3e4faa(0x1ff)]};}export function listLocalServices(_0x54a511={}){return readServiceRegistry(_0x54a511)['services'];}export function getLocalServiceEntry(_0x32d990,_0x5af5f5={}){const _0x2dbbab=a68_0x5540ea;return readServiceRegistry(_0x5af5f5)[_0x2dbbab(0x20b)][_0x2dbbab(0x1e7)](_0x45c250=>_0x45c250[_0x2dbbab(0x1f2)]===_0x32d990[_0x2dbbab(0x1ca)]());}export function listLocalServiceTrees(_0x5d1711={}){const _0x37dba3=a68_0x5540ea;return readServiceRegistry(_0x5d1711)[_0x37dba3(0x20b)]['map'](_0x140f28=>_0x140f28['normalizedManifest']);}export function inspectServiceRegistry(_0x29129f={}){const _0x244dd2=a68_0x5540ea,_0x1278c6=getServiceRegistryPath(_0x29129f);if(!existsSync(_0x1278c6))return emptyServiceRegistryInspection(_0x1278c6,_0x244dd2(0x1f4),![]);try{const _0x3a93de=readFileSync(_0x1278c6,_0x244dd2(0x1ea));if(!_0x3a93de[_0x244dd2(0x1ca)]())return emptyServiceRegistryInspection(_0x1278c6,_0x244dd2(0x1c8),!![]);const _0xc274ce=JSON[_0x244dd2(0x1c1)](_0x3a93de);if(_0xc274ce[_0x244dd2(0x1e5)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x1278c6,'invalid',!![]),'schemaVersion':_0xc274ce[_0x244dd2(0x1e5)],'message':_0x244dd2(0x1e8)+String(_0xc274ce[_0x244dd2(0x1e5)])};if(!Array[_0x244dd2(0x204)](_0xc274ce[_0x244dd2(0x20b)]))return{...emptyServiceRegistryInspection(_0x1278c6,_0x244dd2(0x213),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xc274ce[_0x244dd2(0x1ed)],'message':'services\x20must\x20be\x20an\x20array'};const _0x57d48c=_0xc274ce['services'][_0x244dd2(0x1d6)](summarizeLocalServiceEntry);return{'registryPath':_0x1278c6,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0xc274ce[_0x244dd2(0x1ed)],'serviceCount':_0x57d48c['length'],'commandCount':_0x57d48c[_0x244dd2(0x1cb)]((_0x2acfe7,_0x4731a2)=>_0x2acfe7+_0x4731a2[_0x244dd2(0x1e3)],0x0),'services':_0x57d48c};}catch(_0x37be22){return{...emptyServiceRegistryInspection(_0x1278c6,_0x244dd2(0x213),!![]),'message':_0x37be22 instanceof Error?_0x37be22[_0x244dd2(0x1c7)]:String(_0x37be22)};}}export function formatValidationFailure(_0x1f646f){const _0x28e270=a68_0x5540ea,_0x5b35a6=_0x1f646f[_0x28e270(0x1eb)][_0x28e270(0x1d6)](_0x5c71b6=>_0x5c71b6[_0x28e270(0x1d7)]+':\x20'+_0x5c71b6[_0x28e270(0x1c7)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x5b35a6[_0x28e270(0x202)]('\x0a');}function extractLoadedServiceManifests(_0xd27626,_0x816e47){const _0xb6c3cf=a68_0x5540ea;if(!isServiceRegistryLike(_0xd27626)){const _0x3c8734=_0xd27626,{manifest:_0x23360a,errors:_0x1255da}=adaptServiceTreeManifestForLegacyFramework(_0x3c8734),_0x3c08a3=validateServiceTreeManifest(_0x23360a),_0x407350=mergeValidationErrors(_0x3c08a3,_0x1255da);return[{'manifest':_0x3c8734,'report':_0x407350,'normalizedManifest':_0x407350['ok']?normalizeServiceTreeManifest(_0x23360a):undefined,'sourceHash':_0x816e47}];}return _0xd27626[_0xb6c3cf(0x20b)][_0xb6c3cf(0x1d6)]((_0x225304,_0x164989)=>{const _0x4accb9=_0xb6c3cf,_0x56f8f0=isObjectRecord(_0x225304)?_0x225304[_0x4accb9(0x1fc)]:undefined,{manifest:_0x32021e,errors:_0x2b2421}=adaptServiceTreeManifestForLegacyFramework(_0x56f8f0),_0x57ecd9=validateServiceTreeManifest(_0x32021e),_0x4de182=mergeValidationErrors(_0x57ecd9,_0x2b2421),_0x4d26a7=isObjectRecord(_0x225304)&&typeof _0x225304[_0x4accb9(0x1f2)]===_0x4accb9(0x1d1)?_0x225304[_0x4accb9(0x1f2)]:undefined;return{'manifest':_0x56f8f0,'report':_0x4de182,'normalizedManifest':_0x4de182['ok']?normalizeServiceTreeManifest(_0x32021e):undefined,'sourceHash':sha256(JSON[_0x4accb9(0x203)](_0x56f8f0,null,0x2)+'\x0a'),'registryIndex':_0x164989,'registryServiceCode':_0x4d26a7};});}function mergeValidationErrors(_0x202f20,_0x3beffc){const _0x2f6f31=a68_0x5540ea,_0x584557=_0x202f20[_0x2f6f31(0x1eb)][_0x2f6f31(0x1d6)](_0x5ec2af=>_0x5ec2af[_0x2f6f31(0x1c7)]===_0x2f6f31(0x1c6)?{..._0x5ec2af,'message':_0x2f6f31(0x1ef)}:_0x5ec2af),_0x286026=[..._0x3beffc,..._0x584557];return{'ok':_0x286026[_0x2f6f31(0x1ff)]===0x0,'errors':_0x286026,'warnings':_0x202f20[_0x2f6f31(0x1d2)]};}function aggregateValidationReports(_0x55f034){const _0x29ccdf=a68_0x5540ea,_0x19863c=_0x55f034['flatMap'](_0xd4c228=>_0xd4c228[_0x29ccdf(0x1c0)]===undefined?_0xd4c228[_0x29ccdf(0x1fd)][_0x29ccdf(0x1eb)]:_0xd4c228[_0x29ccdf(0x1fd)][_0x29ccdf(0x1eb)][_0x29ccdf(0x1d6)](_0x26fb1d=>({..._0x26fb1d,'path':prefixRegistryIssuePath(_0xd4c228[_0x29ccdf(0x1c0)],_0x26fb1d[_0x29ccdf(0x1d7)])}))),_0x476e66=_0x55f034[_0x29ccdf(0x1ec)](_0x49e30f=>_0x49e30f['registryIndex']===undefined?_0x49e30f[_0x29ccdf(0x1fd)][_0x29ccdf(0x1d2)]:_0x49e30f[_0x29ccdf(0x1fd)][_0x29ccdf(0x1d2)][_0x29ccdf(0x1d6)](_0x40c95c=>({..._0x40c95c,'path':prefixRegistryIssuePath(_0x49e30f['registryIndex'],_0x40c95c['path'])})));return{'ok':_0x19863c[_0x29ccdf(0x1ff)]===0x0,'errors':_0x19863c,'warnings':_0x476e66};}function prefixRegistryIssuePath(_0x38a67e,_0x4d3b85){const _0x2fe8b5=a68_0x5540ea;if(_0x4d3b85==='$')return _0x2fe8b5(0x210)+_0x38a67e+_0x2fe8b5(0x206);if(_0x4d3b85[_0x2fe8b5(0x1be)]('$.'))return _0x2fe8b5(0x210)+_0x38a67e+_0x2fe8b5(0x206)+_0x4d3b85[_0x2fe8b5(0x1d0)](0x1);if(_0x4d3b85[_0x2fe8b5(0x1be)]('$['))return _0x2fe8b5(0x210)+_0x38a67e+_0x2fe8b5(0x206)+_0x4d3b85[_0x2fe8b5(0x1d0)](0x1);return _0x2fe8b5(0x210)+_0x38a67e+_0x2fe8b5(0x212)+_0x4d3b85;}function a68_0x1e4c(){const _0xc5fb6b=['utf8','errors','flatMap','updatedAt','Remove\x20or\x20migrate\x20','bff\x20target\x20requires\x20functionName.','342dlTpFc','85839DZPzhq','serviceCode','sort','missing','sourceHash','CliError','service','Invalid\x20service\x20manifest\x20JSON:\x20','registry','cliPath','104JtyWAi','manifest','report','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','length','file','4551852kFiLQd','join','stringify','isArray','hex','].manifest','localeCompare','version','code','normalizedManifest','services','20442mPkFeG','417307sTexZn','description','ENOENT','$.services[','name','].manifest.','invalid','startsWith','Service\x20manifest\x20file\x20not\x20found:\x20','registryIndex','parse','178090zkZtrI','kind','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','target','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','message','empty','commands','trim','reduce','5fgjCSf','manifests','1256RdoCgi','homeDirName','slice','string','warnings','push','validation','.tmp','map','path','12543058BTjMQH','source','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','18466ioiafh','digest','sha256','object','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Local\x20service\x20not\x20found:\x20','now','risk','commandCount','splice','schemaVersion','findIndex','find','Unsupported\x20schemaVersion:\x20','service.json'];a68_0x1e4c=function(){return _0xc5fb6b;};return a68_0x1e4c();}function isServiceRegistryLike(_0x45abdb){const _0x40153d=a68_0x5540ea;return isObjectRecord(_0x45abdb)&&_0x45abdb[_0x40153d(0x1e5)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x40153d(0x204)](_0x45abdb[_0x40153d(0x20b)]);}function isObjectRecord(_0x211444){const _0x46c04d=a68_0x5540ea;return Boolean(_0x211444)&&typeof _0x211444===_0x46c04d(0x1de)&&!Array[_0x46c04d(0x204)](_0x211444);}function emptyServiceRegistryInspection(_0x5f4345,_0xb547bc,_0x5863bf){return{'registryPath':_0x5f4345,'exists':_0x5863bf,'status':_0xb547bc,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0xbc6a50){const _0x5eae78=a68_0x5540ea,_0xa05779=_0xbc6a50['normalizedManifest'],_0x433e2c=_0xa05779[_0x5eae78(0x1c9)][_0x5eae78(0x1d6)](_0x11b8b9=>({'path':_0x11b8b9[_0x5eae78(0x1fa)],'description':_0x11b8b9[_0x5eae78(0x20e)],'risk':_0x11b8b9[_0x5eae78(0x1e2)],'targetKind':_0x11b8b9[_0x5eae78(0x1c5)][_0x5eae78(0x1c3)],'targetCommand':_0x11b8b9[_0x5eae78(0x1c5)]['command']}));return{'serviceCode':_0xbc6a50[_0x5eae78(0x1f2)],'name':_0xa05779[_0x5eae78(0x1f7)][_0x5eae78(0x211)],'description':_0xa05779[_0x5eae78(0x1f7)][_0x5eae78(0x20e)],'version':_0xbc6a50[_0x5eae78(0x208)],'importedAt':_0xbc6a50['importedAt'],'source':_0xbc6a50[_0x5eae78(0x1d9)],'commandCount':_0x433e2c[_0x5eae78(0x1ff)],'commands':_0x433e2c};}function sha256(_0x3e059a){const _0x5832af=a68_0x5540ea;return createHash(_0x5832af(0x1dd))['update'](_0x3e059a)[_0x5832af(0x1dc)](_0x5832af(0x205));}
|
|
1
|
+
const a68_0x400846=a68_0x5c15;(function(_0x3e31da,_0x3cefac){const _0x24588a=a68_0x5c15,_0xd52922=_0x3e31da();while(!![]){try{const _0x5551b2=-parseInt(_0x24588a(0x1d5))/0x1*(parseInt(_0x24588a(0x1cd))/0x2)+-parseInt(_0x24588a(0x1a7))/0x3+-parseInt(_0x24588a(0x1bc))/0x4*(-parseInt(_0x24588a(0x1bf))/0x5)+-parseInt(_0x24588a(0x1f2))/0x6*(-parseInt(_0x24588a(0x1a2))/0x7)+parseInt(_0x24588a(0x1ca))/0x8*(parseInt(_0x24588a(0x1b2))/0x9)+-parseInt(_0x24588a(0x1f7))/0xa*(parseInt(_0x24588a(0x1e4))/0xb)+-parseInt(_0x24588a(0x1d6))/0xc*(-parseInt(_0x24588a(0x1df))/0xd);if(_0x5551b2===_0x3cefac)break;else _0xd52922['push'](_0xd52922['shift']());}catch(_0x1376ae){_0xd52922['push'](_0xd52922['shift']());}}}(a68_0x2d65,0x71100));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=a68_0x400846(0x1d3);export function getServiceRegistryPath(_0x1e1fba={}){const _0x5b4455=a68_0x400846;return resolve(_0x1e1fba['homeDir']??homedir(),PRODUCT_CONFIG[_0x5b4455(0x1ea)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3e0568={}){const _0x16595c=a68_0x400846,_0x5aa676=getServiceRegistryPath(_0x3e0568);if(!existsSync(_0x5aa676))return emptyServiceRegistry();try{const _0x52794a=readFileSync(_0x5aa676,_0x16595c(0x1c6));if(!_0x52794a['trim']())return emptyServiceRegistry();const _0x251a02=JSON[_0x16595c(0x1d8)](_0x52794a);if(_0x251a02[_0x16595c(0x1c7)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x16595c(0x1fc)](_0x16595c(0x1db)+String(_0x251a02['schemaVersion']),_0x16595c(0x1e3)+_0x5aa676+'.');if(!Array[_0x16595c(0x1b9)](_0x251a02[_0x16595c(0x1af)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x251a02['updatedAt'],'services':_0x251a02[_0x16595c(0x1af)]};}catch(_0x334abf){if(_0x334abf instanceof Error&&_0x334abf[_0x16595c(0x1fa)]===_0x16595c(0x1f6))throw _0x334abf;throw CliErrors[_0x16595c(0x1fc)](_0x16595c(0x1b8)+_0x5aa676,_0x16595c(0x1ab));}}export function writeServiceRegistry(_0x24047c,_0x2c2adc={}){const _0x3ea80f=a68_0x400846,_0x4c3393=getServiceRegistryPath(_0x2c2adc),_0x1f8c71=dirname(_0x4c3393);!existsSync(_0x1f8c71)&&mkdirSync(_0x1f8c71,{'recursive':!![]});const _0xd8a074=_0x4c3393+_0x3ea80f(0x1da);try{writeFileSync(_0xd8a074,JSON[_0x3ea80f(0x1e8)](_0x24047c,null,0x2)+'\x0a',{'encoding':_0x3ea80f(0x1c6),'mode':0x180}),renameSync(_0xd8a074,_0x4c3393);}catch(_0x5471f2){try{unlinkSync(_0xd8a074);}catch{}if(_0x5471f2?.[_0x3ea80f(0x1b6)]===_0x3ea80f(0x1c2))throw CliErrors[_0x3ea80f(0x1fc)](_0x3ea80f(0x1d2)+_0x4c3393);throw _0x5471f2;}return _0x4c3393;}export function loadServiceManifestFromFile(_0x416f98){const _0x35e2cd=a68_0x400846,_0x115631=resolve(_0x416f98);if(!existsSync(_0x115631))throw CliErrors[_0x35e2cd(0x1fc)](_0x35e2cd(0x1cf)+_0x416f98);let _0xcc1da;const _0x5ee894=readFileSync(_0x115631,_0x35e2cd(0x1c6));try{_0xcc1da=JSON[_0x35e2cd(0x1d8)](_0x5ee894);}catch{throw CliErrors[_0x35e2cd(0x1fc)](_0x35e2cd(0x1ac)+_0x416f98,'Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.');}const _0x4d3c2b=sha256(_0x5ee894),_0x519cf9=extractLoadedServiceManifests(_0xcc1da,_0x4d3c2b),_0x43d106=aggregateValidationReports(_0x519cf9),_0xe3907e=_0x519cf9[0x0];return{'filePath':_0x115631,'hash':_0x4d3c2b,'kind':isServiceRegistryLike(_0xcc1da)?_0x35e2cd(0x1b5):_0x35e2cd(0x1f0),'manifest':_0xe3907e?.[_0x35e2cd(0x1f0)]??_0xcc1da,'report':_0x43d106,'normalizedManifest':_0x519cf9[_0x35e2cd(0x1d7)]===0x1?_0xe3907e?.[_0x35e2cd(0x1e1)]:undefined,'manifests':_0x519cf9};}export function importServiceManifest(_0x3a52a8,_0xe044c7={}){const _0x1df1d3=a68_0x400846,_0x1af307=loadServiceManifestFromFile(_0x3a52a8);if(!_0x1af307[_0x1df1d3(0x1f3)]['ok'])throw CliErrors[_0x1df1d3(0x1fc)](formatValidationFailure(_0x1af307[_0x1df1d3(0x1f3)]),_0x1df1d3(0x1f4));if(_0x1af307['manifests'][_0x1df1d3(0x1d7)]===0x0)throw CliErrors[_0x1df1d3(0x1fc)](_0x1df1d3(0x1f5),_0x1df1d3(0x1dd));const _0x18c5bc=readServiceRegistry(_0xe044c7),_0x4a4bad=(_0xe044c7['now']??(()=>new Date()))()[_0x1df1d3(0x1a1)](),_0x4f4eb6=[];let _0x347f60=0x0,_0x2289e0=0x0;for(const _0x347bd9 of _0x1af307[_0x1df1d3(0x1e6)]){if(!_0x347bd9['normalizedManifest'])continue;const _0x55235c=_0x347bd9[_0x1df1d3(0x1e1)]['service'][_0x1df1d3(0x1b6)],_0x3ddda4={'serviceCode':_0x55235c,'version':_0x347bd9[_0x1df1d3(0x1e1)]['version'],'importedAt':_0x4a4bad,'source':{'type':_0x1df1d3(0x1b3),'path':_0x1af307[_0x1df1d3(0x1f1)],'hash':_0x347bd9[_0x1df1d3(0x1ed)]},'manifest':_0x347bd9[_0x1df1d3(0x1f0)],'normalizedManifest':_0x347bd9[_0x1df1d3(0x1e1)]},_0x478268=_0x18c5bc[_0x1df1d3(0x1af)][_0x1df1d3(0x19e)](_0x53353d=>_0x53353d[_0x1df1d3(0x1aa)]===_0x55235c);_0x478268>=0x0?(_0x18c5bc['services'][_0x478268]=_0x3ddda4,_0x2289e0++):(_0x18c5bc[_0x1df1d3(0x1af)][_0x1df1d3(0x1a4)](_0x3ddda4),_0x347f60++),_0x4f4eb6['push'](_0x3ddda4);}_0x18c5bc[_0x1df1d3(0x1af)][_0x1df1d3(0x1ba)]((_0x4b4644,_0x634881)=>_0x4b4644[_0x1df1d3(0x1aa)][_0x1df1d3(0x1bd)](_0x634881['serviceCode'])),_0x18c5bc['updatedAt']=_0x4a4bad;const _0x4d91e6=writeServiceRegistry(_0x18c5bc,_0xe044c7);return{'registryPath':_0x4d91e6,'entry':_0x4f4eb6[0x0],'replaced':_0x4f4eb6['length']===0x1?_0x2289e0===0x1:_0x2289e0>0x0,'entries':_0x4f4eb6,'imported':_0x347f60,'updated':_0x2289e0,'serviceCount':_0x18c5bc[_0x1df1d3(0x1af)]['length']};}export function exportServiceManifest(_0x590054,_0x120671,_0x416a85={}){const _0x5bdef2=a68_0x400846,_0x2cc57e=getServiceRegistryPath(_0x416a85),_0x14b750=getLocalServiceEntry(_0x590054,_0x416a85);if(!_0x14b750)throw CliErrors[_0x5bdef2(0x1fc)](_0x5bdef2(0x1bb)+_0x590054,_0x5bdef2(0x1c3));const _0x224303=resolve(_0x120671),_0x5c23d4=dirname(_0x224303);return!existsSync(_0x5c23d4)&&mkdirSync(_0x5c23d4,{'recursive':!![]}),writeFileSync(_0x224303,JSON[_0x5bdef2(0x1e8)](_0x14b750[_0x5bdef2(0x1f0)],null,0x2)+'\x0a',{'encoding':_0x5bdef2(0x1c6),'mode':0x180}),{'registryPath':_0x2cc57e,'filePath':_0x224303,'entry':_0x14b750};}export function removeServiceManifest(_0x34d24f,_0x21524b={}){const _0x2fd4fe=a68_0x400846,_0x4f1fca=readServiceRegistry(_0x21524b),_0x5a718f=_0x34d24f[_0x2fd4fe(0x1dc)](),_0x2c165f=_0x4f1fca[_0x2fd4fe(0x1af)][_0x2fd4fe(0x19e)](_0x41d511=>_0x41d511[_0x2fd4fe(0x1aa)]===_0x5a718f);if(_0x2c165f<0x0)throw CliErrors[_0x2fd4fe(0x1fc)](_0x2fd4fe(0x1bb)+_0x5a718f,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x3de329]=_0x4f1fca[_0x2fd4fe(0x1af)][_0x2fd4fe(0x1cb)](_0x2c165f,0x1),_0x362009=(_0x21524b[_0x2fd4fe(0x1cc)]??(()=>new Date()))()['toISOString']();_0x4f1fca[_0x2fd4fe(0x1ad)]=_0x362009;const _0x3b5bb7=writeServiceRegistry(_0x4f1fca,_0x21524b);return{'registryPath':_0x3b5bb7,'entry':_0x3de329,'serviceCount':_0x4f1fca[_0x2fd4fe(0x1af)][_0x2fd4fe(0x1d7)]};}export function listLocalServices(_0x3a0935={}){return readServiceRegistry(_0x3a0935)['services'];}export function getLocalServiceEntry(_0x29a6f3,_0xbfe113={}){const _0x2d5893=a68_0x400846;return readServiceRegistry(_0xbfe113)[_0x2d5893(0x1af)][_0x2d5893(0x1a3)](_0x7e35a=>_0x7e35a['serviceCode']===_0x29a6f3[_0x2d5893(0x1dc)]());}export function listLocalServiceTrees(_0x588b96={}){const _0x20704e=a68_0x400846;return readServiceRegistry(_0x588b96)[_0x20704e(0x1af)][_0x20704e(0x1ec)](_0xdd86b3=>_0xdd86b3[_0x20704e(0x1e1)]);}export function inspectServiceRegistry(_0x286c69={}){const _0x176823=a68_0x400846,_0x6e087=getServiceRegistryPath(_0x286c69);if(!existsSync(_0x6e087))return emptyServiceRegistryInspection(_0x6e087,_0x176823(0x1c1),![]);try{const _0x73a3a9=readFileSync(_0x6e087,_0x176823(0x1c6));if(!_0x73a3a9['trim']())return emptyServiceRegistryInspection(_0x6e087,_0x176823(0x1a5),!![]);const _0x2919b5=JSON[_0x176823(0x1d8)](_0x73a3a9);if(_0x2919b5[_0x176823(0x1c7)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x6e087,_0x176823(0x1a9),!![]),'schemaVersion':_0x2919b5[_0x176823(0x1c7)],'message':_0x176823(0x1e9)+String(_0x2919b5[_0x176823(0x1c7)])};if(!Array['isArray'](_0x2919b5[_0x176823(0x1af)]))return{...emptyServiceRegistryInspection(_0x6e087,_0x176823(0x1a9),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2919b5[_0x176823(0x1ad)],'message':_0x176823(0x1e5)};const _0x25713f=_0x2919b5[_0x176823(0x1af)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x6e087,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x2919b5[_0x176823(0x1ad)],'serviceCount':_0x25713f[_0x176823(0x1d7)],'commandCount':_0x25713f[_0x176823(0x1ae)]((_0x5b5d1d,_0x55e8bf)=>_0x5b5d1d+_0x55e8bf[_0x176823(0x1fd)],0x0),'services':_0x25713f};}catch(_0xb98f6d){return{...emptyServiceRegistryInspection(_0x6e087,_0x176823(0x1a9),!![]),'message':_0xb98f6d instanceof Error?_0xb98f6d[_0x176823(0x1c4)]:String(_0xb98f6d)};}}export function formatValidationFailure(_0x44c9d2){const _0x57e2e0=a68_0x400846,_0x202afd=_0x44c9d2[_0x57e2e0(0x1f8)][_0x57e2e0(0x1ec)](_0x5f39a8=>_0x5f39a8['path']+':\x20'+_0x5f39a8[_0x57e2e0(0x1c4)]);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x202afd[_0x57e2e0(0x1b4)]('\x0a');}function extractLoadedServiceManifests(_0x432e9c,_0x1e2875){const _0x38e21c=a68_0x400846;if(!isServiceRegistryLike(_0x432e9c)){const _0x2a02da=_0x432e9c,{manifest:_0x3deb75,errors:_0x2ee769}=adaptServiceTreeManifestForLegacyFramework(_0x2a02da),_0x5cabff=validateServiceTreeManifest(_0x3deb75),_0x519e81=mergeValidationErrors(_0x5cabff,_0x2ee769);return[{'manifest':_0x2a02da,'report':_0x519e81,'normalizedManifest':_0x519e81['ok']?normalizeServiceTreeManifest(_0x3deb75):undefined,'sourceHash':_0x1e2875}];}return _0x432e9c['services'][_0x38e21c(0x1ec)]((_0x553f45,_0x2e9e45)=>{const _0x117374=_0x38e21c,_0x3e16d1=isObjectRecord(_0x553f45)?_0x553f45['manifest']:undefined,{manifest:_0x5f0d18,errors:_0x2c5a71}=adaptServiceTreeManifestForLegacyFramework(_0x3e16d1),_0x2935d0=validateServiceTreeManifest(_0x5f0d18),_0x42e303=mergeValidationErrors(_0x2935d0,_0x2c5a71),_0xf1e3da=isObjectRecord(_0x553f45)&&typeof _0x553f45[_0x117374(0x1aa)]===_0x117374(0x1b7)?_0x553f45[_0x117374(0x1aa)]:undefined;return{'manifest':_0x3e16d1,'report':_0x42e303,'normalizedManifest':_0x42e303['ok']?normalizeServiceTreeManifest(_0x5f0d18):undefined,'sourceHash':sha256(JSON[_0x117374(0x1e8)](_0x3e16d1,null,0x2)+'\x0a'),'registryIndex':_0x2e9e45,'registryServiceCode':_0xf1e3da};});}function mergeValidationErrors(_0x1f5528,_0x44b2d4){const _0x4e9bd5=a68_0x400846,_0x1eb4ba=_0x1f5528[_0x4e9bd5(0x1f8)]['map'](_0xeea019=>_0xeea019[_0x4e9bd5(0x1c4)]===_0x4e9bd5(0x1a6)?{..._0xeea019,'message':_0x4e9bd5(0x1a0)}:_0xeea019),_0x24e746=[..._0x44b2d4,..._0x1eb4ba];return{'ok':_0x24e746['length']===0x0,'errors':_0x24e746,'warnings':_0x1f5528[_0x4e9bd5(0x1c8)]};}function aggregateValidationReports(_0x4be5){const _0x174824=a68_0x400846,_0x1e860d=_0x4be5[_0x174824(0x1eb)](_0x4edbf8=>_0x4edbf8['registryIndex']===undefined?_0x4edbf8[_0x174824(0x1f3)][_0x174824(0x1f8)]:_0x4edbf8['report']['errors'][_0x174824(0x1ec)](_0x5743da=>({..._0x5743da,'path':prefixRegistryIssuePath(_0x4edbf8[_0x174824(0x1d0)],_0x5743da[_0x174824(0x1e0)])}))),_0x2d169d=_0x4be5[_0x174824(0x1eb)](_0x38e69d=>_0x38e69d[_0x174824(0x1d0)]===undefined?_0x38e69d[_0x174824(0x1f3)][_0x174824(0x1c8)]:_0x38e69d[_0x174824(0x1f3)][_0x174824(0x1c8)][_0x174824(0x1ec)](_0x29b0ba=>({..._0x29b0ba,'path':prefixRegistryIssuePath(_0x38e69d[_0x174824(0x1d0)],_0x29b0ba[_0x174824(0x1e0)])})));return{'ok':_0x1e860d[_0x174824(0x1d7)]===0x0,'errors':_0x1e860d,'warnings':_0x2d169d};}function prefixRegistryIssuePath(_0x2986bc,_0x480c8d){const _0x183b67=a68_0x400846;if(_0x480c8d==='$')return _0x183b67(0x1d4)+_0x2986bc+_0x183b67(0x1d9);if(_0x480c8d[_0x183b67(0x1f9)]('$.'))return _0x183b67(0x1d4)+_0x2986bc+'].manifest'+_0x480c8d[_0x183b67(0x1c5)](0x1);if(_0x480c8d['startsWith']('$['))return'$.services['+_0x2986bc+_0x183b67(0x1d9)+_0x480c8d[_0x183b67(0x1c5)](0x1);return _0x183b67(0x1d4)+_0x2986bc+_0x183b67(0x1fb)+_0x480c8d;}function isServiceRegistryLike(_0xf6038){const _0xad8795=a68_0x400846;return isObjectRecord(_0xf6038)&&_0xf6038[_0xad8795(0x1c7)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0xad8795(0x1b9)](_0xf6038[_0xad8795(0x1af)]);}function a68_0x5c15(_0x32fa23,_0x550af9){_0x32fa23=_0x32fa23-0x19e;const _0x2d654d=a68_0x2d65();let _0x5c15b5=_0x2d654d[_0x32fa23];return _0x5c15b5;}function isObjectRecord(_0x3330e3){const _0x4714c6=a68_0x400846;return Boolean(_0x3330e3)&&typeof _0x3330e3==='object'&&!Array[_0x4714c6(0x1b9)](_0x3330e3);}function emptyServiceRegistryInspection(_0xca5a9f,_0x392bba,_0x385639){return{'registryPath':_0xca5a9f,'exists':_0x385639,'status':_0x392bba,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x294746){const _0x2dce30=a68_0x400846,_0x380013=_0x294746['normalizedManifest'],_0x1e088d=_0x380013[_0x2dce30(0x1d1)][_0x2dce30(0x1ec)](_0x32c2a1=>({'path':_0x32c2a1[_0x2dce30(0x1c0)],'description':_0x32c2a1[_0x2dce30(0x1e2)],'risk':_0x32c2a1[_0x2dce30(0x1b0)],'targetKind':_0x32c2a1['target'][_0x2dce30(0x1ef)],'targetCommand':_0x32c2a1[_0x2dce30(0x19f)][_0x2dce30(0x1e7)]}));return{'serviceCode':_0x294746['serviceCode'],'name':_0x380013[_0x2dce30(0x1b1)][_0x2dce30(0x1fa)],'description':_0x380013[_0x2dce30(0x1b1)][_0x2dce30(0x1e2)],'version':_0x294746[_0x2dce30(0x1a8)],'importedAt':_0x294746['importedAt'],'source':_0x294746[_0x2dce30(0x1ce)],'commandCount':_0x1e088d[_0x2dce30(0x1d7)],'commands':_0x1e088d};}function a68_0x2d65(){const _0x57624b=['risk','service','18otfrYU','file','join','registry','code','string','Invalid\x20service\x20registry\x20JSON:\x20','isArray','sort','Local\x20service\x20not\x20found:\x20','25476uwgiAg','localeCompare','digest','155lkVVKs','cliPath','missing','ENOENT','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','message','slice','utf8','schemaVersion','warnings','hex','491192DrhZPn','splice','now','44658LhptfU','source','Service\x20manifest\x20file\x20not\x20found:\x20','registryIndex','commands','Cannot\x20write\x20service\x20registry:\x20','service.json','$.services[','17IwGrDW','51432IynKny','length','parse','].manifest','.tmp','Unsupported\x20service\x20registry\x20schemaVersion:\x20','trim','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','sha256','1846waBXZX','path','normalizedManifest','description','Remove\x20or\x20migrate\x20','11ONLddb','services\x20must\x20be\x20an\x20array','manifests','command','stringify','Unsupported\x20schemaVersion:\x20','homeDirName','flatMap','map','sourceHash','update','kind','manifest','filePath','4860kVuksZ','report','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','CliError','3073690JpWBLy','errors','startsWith','name','].manifest.','validation','commandCount','findIndex','target','bff\x20target\x20requires\x20functionName.','toISOString','6356tSyxtg','find','push','empty','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','1542789hyRWOH','version','invalid','serviceCode','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','Invalid\x20service\x20manifest\x20JSON:\x20','updatedAt','reduce','services'];a68_0x2d65=function(){return _0x57624b;};return a68_0x2d65();}function sha256(_0x20e58f){const _0x185235=a68_0x400846;return createHash(_0x185235(0x1de))[_0x185235(0x1ee)](_0x20e58f)[_0x185235(0x1be)](_0x185235(0x1c9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x2fd9f5=a69_0x3116;(function(_0x3fef1f,_0x3d0277){const _0x145658=a69_0x3116,_0x5c6296=_0x3fef1f();while(!![]){try{const _0x4b93b2=parseInt(_0x145658(0x120))/0x1+-parseInt(_0x145658(0x116))/0x2+parseInt(_0x145658(0x101))/0x3*(parseInt(_0x145658(0x11a))/0x4)+-parseInt(_0x145658(0x11c))/0x5+-parseInt(_0x145658(0x10a))/0x6+parseInt(_0x145658(0x113))/0x7*(parseInt(_0x145658(0xfd))/0x8)+parseInt(_0x145658(0x10e))/0x9*(parseInt(_0x145658(0x117))/0xa);if(_0x4b93b2===_0x3d0277)break;else _0x5c6296['push'](_0x5c6296['shift']());}catch(_0x341037){_0x5c6296['push'](_0x5c6296['shift']());}}}(a69_0x4632,0xbf0f0));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 a69_0x3116(_0xfab0e7,_0x221d58){_0xfab0e7=_0xfab0e7-0xfd;const _0x4632dc=a69_0x4632();let _0x311644=_0x4632dc[_0xfab0e7];return _0x311644;}export const createCommand={'service':a69_0x2fd9f5(0x104),'command':a69_0x2fd9f5(0x106),'description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':a69_0x2fd9f5(0x11d),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0x5623ae){const _0x440b8e=a69_0x2fd9f5,_0x4d1195=buildSkillCreatePlan(_0x5623ae['str'](_0x440b8e(0x10f)),_0x5623ae[_0x440b8e(0x121)](_0x440b8e(0x103)),_0x5623ae[_0x440b8e(0x121)]('target'));return{'method':_0x440b8e(0x118),'url':_0x4d1195['skillDir'],'body':{'skillName':_0x4d1195[_0x440b8e(0xfe)][_0x440b8e(0x119)],'type':_0x4d1195[_0x440b8e(0xfe)][_0x440b8e(0x103)],'selfContained':!![],'files':_0x4d1195[_0x440b8e(0xfe)][_0x440b8e(0x107)]['map'](_0x286deb=>_0x286deb[_0x440b8e(0x112)])},'description':_0x440b8e(0x105)};},async 'execute'(_0x35ffd1){const _0x343c92=a69_0x2fd9f5,_0x258da1=buildSkillCreatePlan(_0x35ffd1[_0x343c92(0x121)](_0x343c92(0x10f)),_0x35ffd1['str'](_0x343c92(0x103)),_0x35ffd1[_0x343c92(0x121)](_0x343c92(0x111)));return writeSkillDraft(_0x258da1,_0x35ffd1[_0x343c92(0x109)]('force')),{'ok':!![],'data':{'skillName':_0x258da1[_0x343c92(0xfe)]['skillName'],'type':_0x258da1[_0x343c92(0xfe)]['type'],'dir':_0x258da1[_0x343c92(0xff)],'files':_0x258da1[_0x343c92(0xfe)]['files'][_0x343c92(0x110)](_0x149013=>_0x149013['path'])},'message':_0x343c92(0x10d)+_0x258da1[_0x343c92(0xfe)]['skillName']};}};function buildSkillCreatePlan(_0xbe89fb,_0x16f9c0,_0x26e5e1){const _0x256962=a69_0x2fd9f5,_0xa8c7ce=_0x16f9c0['trim'](),_0x25d06e=renderSkillTemplate({'skillName':_0xbe89fb,'type':_0xa8c7ce});!_0xa8c7ce&&writeCliSideChannelLine(_0x256962(0x10c));const _0x4de227=resolve(normalizeSkillTarget(_0x26e5e1));return{'rendered':_0x25d06e,'targetRoot':_0x4de227,'skillDir':resolve(_0x4de227,_0x25d06e[_0x256962(0x119)])};}function a69_0x4632(){const _0x3e243d=['path','90048JCzbQK','utf8','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','238896DQXhPG','1670780recyKz','WRITE','skillName','63496lYNJkO','trim','4076410TeVKhs','read','isSymbolicLink','content','186339SxmHOI','str','824CQPeBa','rendered','skillDir','validation','57NrqTvS','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','type','skill','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','create','files','Skill\x20directory\x20already\x20exists:\x20','bool','3581190WcHFAI','isDirectory','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','Created\x20local\x20Skill\x20draft\x20','27gbiGjv','name','map','target'];a69_0x4632=function(){return _0x3e243d;};return a69_0x4632();}function normalizeSkillTarget(_0x84e82c){const _0x43b720=a69_0x2fd9f5;return(_0x84e82c||DEFAULT_SKILL_TARGET)[_0x43b720(0x11b)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0x442404,_0x545d78){const _0x320d2c=a69_0x2fd9f5;if(existsSync(_0x442404['skillDir'])){const _0x3b5f02=lstatSync(_0x442404[_0x320d2c(0xff)]);if(!_0x3b5f02[_0x320d2c(0x10b)]()||_0x3b5f02[_0x320d2c(0x11e)]())throw CliErrors[_0x320d2c(0x100)](_0x320d2c(0x102)+_0x442404[_0x320d2c(0xff)]);if(!_0x545d78)throw CliErrors['validation'](_0x320d2c(0x108)+_0x442404[_0x320d2c(0xff)],_0x320d2c(0x115));}for(const _0x2e6376 of _0x442404['rendered']['files']){const _0x3a9547=resolve(_0x442404['skillDir'],_0x2e6376[_0x320d2c(0x112)]),_0x2862d4=dirname(_0x3a9547);mkdirSync(_0x2862d4,{'recursive':!![]});if(existsSync(_0x3a9547)&&lstatSync(_0x3a9547)[_0x320d2c(0x11e)]())throw CliErrors[_0x320d2c(0x100)]('Refusing\x20to\x20overwrite\x20symlink:\x20'+_0x3a9547);writeFileSync(_0x3a9547,_0x2e6376[_0x320d2c(0x11f)],_0x320d2c(0x114));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a70_0x5e7a(){const _0x542a98=['729909ZHRoZI','appCode','expected-diagram-revision','isInteger','20382372yMHxtG','skill','found','Updated','num','Create\x20or\x20replace\x20a\x20Mermaid\x20diagram\x20for\x20a\x20specific\x20Skill\x20version','297016zzBEjb','trim','\x20is\x20unchanged.','10kxkDsZ','diagram-validate','57188YztrhQ','\x20Skill\x20diagram\x20for\x20','Creates\x20or\x20replaces\x20a\x20Mermaid\x20diagram\x20for\x20an\x20exact\x20Skill\x20version.\x20The\x20write\x20is\x20rejected\x20if\x20the\x20server\x20version\x20has\x20changed.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20diagram\x20body.','scope','created','30shcwdx','personal','6776913bKhNEC','read',';\x20next\x20write\x20expects\x20revision\x20','16CLHPqc','version','30pEtssb','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version','source-fingerprint','diagram-show','str','action','validation','skillCode','6auZVvZ','No\x20Skill\x20diagram\x20is\x20stored\x20for\x20','5788315stIqoE','company','diagram-file','expectedDiagramRevision','write','--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.','skill-code','7613760UILwDu','Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version',';\x20first\x20write\x20expects\x20revision\x20','diagram-push','Skill\x20diagram\x20for\x20'];a70_0x5e7a=function(){return _0x542a98;};return a70_0x5e7a();}const a70_0x4cd3c4=a70_0x1785;(function(_0x2cbb4e,_0x375ca5){const _0x20ce6c=a70_0x1785,_0x44e355=_0x2cbb4e();while(!![]){try{const _0xa50bed=parseInt(_0x20ce6c(0xf7))/0x1*(parseInt(_0x20ce6c(0xf2))/0x2)+-parseInt(_0x20ce6c(0xfe))/0x3*(-parseInt(_0x20ce6c(0xed))/0x4)+-parseInt(_0x20ce6c(0xd7))/0x5*(parseInt(_0x20ce6c(0x106))/0x6)+parseInt(_0x20ce6c(0xde))/0x7+-parseInt(_0x20ce6c(0xfc))/0x8*(-parseInt(_0x20ce6c(0xe3))/0x9)+-parseInt(_0x20ce6c(0xf0))/0xa*(-parseInt(_0x20ce6c(0xf9))/0xb)+-parseInt(_0x20ce6c(0xe7))/0xc;if(_0xa50bed===_0x375ca5)break;else _0x44e355['push'](_0x44e355['shift']());}catch(_0x50de06){_0x44e355['push'](_0x44e355['shift']());}}}(a70_0x5e7a,0x94f53));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';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 a70_0x1785(_0x1d8a88,_0xe3b223){_0x1d8a88=_0x1d8a88-0xd6;const _0x5e7aaf=a70_0x5e7a();let _0x178567=_0x5e7aaf[_0x1d8a88];return _0x178567;}function readDiagramTarget(_0x2be823){const _0x3962bb=a70_0x1785,_0x30a761=_0x2be823[_0x3962bb(0x102)](_0x3962bb(0xdd))[_0x3962bb(0xee)](),_0x100aac=_0x2be823[_0x3962bb(0x102)](_0x3962bb(0xfd))['trim'](),_0x1b713e=_0x2be823[_0x3962bb(0x102)]('scope');if(!_0x30a761||!_0x100aac||_0x1b713e!==_0x3962bb(0xf8)&&_0x1b713e!==_0x3962bb(0xd8))throw CliErrors[_0x3962bb(0x104)]('--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.');return{'skillCode':_0x30a761,'version':_0x100aac,'scope':_0x1b713e};}async function readDiagramWriteInput(_0x5ae76f){const _0x3e4321=a70_0x1785,_0x5719c7=_0x5ae76f[_0x3e4321(0xeb)](_0x3e4321(0xe5)),_0x378502=_0x5ae76f['str'](_0x3e4321(0x100))[_0x3e4321(0xee)]();if(!Number[_0x3e4321(0xe6)](_0x5719c7)||_0x5719c7<0x0)throw CliErrors['validation']('--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.');if(!/^sha256:[0-9a-f]{64}$/['test'](_0x378502))throw CliErrors[_0x3e4321(0x104)](_0x3e4321(0xdc));return{'expectedDiagramRevision':_0x5719c7,'sourceFingerprint':_0x378502,'diagram':await readRequiredSkillDiagram(_0x5ae76f[_0x3e4321(0x102)](_0x3e4321(0xd9)))};}export const diagramValidateCommand={'service':a70_0x4cd3c4(0xe8),'command':a70_0x4cd3c4(0xf1),'description':a70_0x4cd3c4(0xff),'risk':a70_0x4cd3c4(0xfa),'flags':WRITE_FLAGS,async 'execute'(_0x58e42c){const _0x5e7a9d=a70_0x4cd3c4,_0x4192ce=readDiagramTarget(_0x58e42c),_0x477ed6=await validateRuntimeSkillVersionDiagram(_0x58e42c[_0x5e7a9d(0xe4)],_0x4192ce['skillCode'],_0x4192ce[_0x5e7a9d(0xfd)],_0x4192ce['scope'],await readDiagramWriteInput(_0x58e42c));return{'ok':!![],'data':_0x477ed6,'message':'Skill\x20diagram\x20validation\x20passed\x20for\x20'+_0x4192ce[_0x5e7a9d(0x105)]+'@'+_0x4192ce[_0x5e7a9d(0xfd)]+'.'};}};export const diagramPushCommand={'service':a70_0x4cd3c4(0xe8),'command':a70_0x4cd3c4(0xe1),'description':a70_0x4cd3c4(0xec),'risk':a70_0x4cd3c4(0xdb),'confirmationDescription':a70_0x4cd3c4(0xf4),'flags':WRITE_FLAGS,async 'execute'(_0x11a963){const _0x20bd73=a70_0x4cd3c4,_0x20e5a6=readDiagramTarget(_0x11a963),_0x59204a=await putRuntimeSkillVersionDiagram(_0x11a963[_0x20bd73(0xe4)],_0x20e5a6[_0x20bd73(0x105)],_0x20e5a6[_0x20bd73(0xfd)],_0x20e5a6[_0x20bd73(0xf5)],await readDiagramWriteInput(_0x11a963));return{'ok':!![],'data':_0x59204a,'message':_0x59204a['action']==='unchanged'?_0x20bd73(0xe2)+_0x20e5a6[_0x20bd73(0x105)]+'@'+_0x20e5a6[_0x20bd73(0xfd)]+_0x20bd73(0xef):(_0x59204a[_0x20bd73(0x103)]===_0x20bd73(0xf6)?'Created':_0x20bd73(0xea))+_0x20bd73(0xf3)+_0x20e5a6['skillCode']+'@'+_0x20e5a6[_0x20bd73(0xfd)]+'.'};}};export const diagramShowCommand={'service':'skill','command':a70_0x4cd3c4(0x101),'description':a70_0x4cd3c4(0xdf),'risk':'read','flags':TARGET_FLAGS,async 'execute'(_0x27eae6){const _0xdba203=a70_0x4cd3c4,_0x23c379=readDiagramTarget(_0x27eae6),_0xfe0d2c=await getRuntimeSkillVersionDiagram(_0x27eae6[_0xdba203(0xe4)],_0x23c379[_0xdba203(0x105)],_0x23c379['version'],_0x23c379[_0xdba203(0xf5)]);return{'ok':!![],'data':_0xfe0d2c,'message':_0xfe0d2c[_0xdba203(0xe9)]?'Found\x20Skill\x20diagram\x20for\x20'+_0x23c379[_0xdba203(0x105)]+'@'+_0x23c379[_0xdba203(0xfd)]+_0xdba203(0xfb)+_0xfe0d2c[_0xdba203(0xda)]+'.':_0xdba203(0xd6)+_0x23c379[_0xdba203(0x105)]+'@'+_0x23c379[_0xdba203(0xfd)]+_0xdba203(0xe0)+_0xfe0d2c['expectedDiagramRevision']+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x1e6957=a71_0xf524;(function(_0x321a2b,_0x500fa1){const _0x5a59f0=a71_0xf524,_0xa5f45f=_0x321a2b();while(!![]){try{const _0x18defc=-parseInt(_0x5a59f0(0xbf))/0x1*(parseInt(_0x5a59f0(0xb2))/0x2)+parseInt(_0x5a59f0(0xaa))/0x3+parseInt(_0x5a59f0(0xaf))/0x4+parseInt(_0x5a59f0(0xb7))/0x5+-parseInt(_0x5a59f0(0xac))/0x6*(-parseInt(_0x5a59f0(0xc1))/0x7)+parseInt(_0x5a59f0(0xb3))/0x8+parseInt(_0x5a59f0(0xa9))/0x9*(-parseInt(_0x5a59f0(0xc9))/0xa);if(_0x18defc===_0x500fa1)break;else _0xa5f45f['push'](_0xa5f45f['shift']());}catch(_0x4a04fa){_0xa5f45f['push'](_0xa5f45f['shift']());}}}(a71_0x2569,0xe085b));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';const PACKAGE_DOWNLOAD_CONCURRENCY=0x4;export const installCommand={'service':'skill','command':a71_0x1e6957(0xb0),'description':a71_0x1e6957(0xba),'risk':'read','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x299b97){return syncRuntimeSkills(_0x299b97);}};function a71_0x2569(){const _0x460f3f=['3283oJkSMi','production','scope','includes','skillCode','global','bool','version','70fUtxYN','min','\x20company\x20Skill(s).','all','envName','removed','length','map','authRequired','2470014pdEjIq','1555536MmlzFK','reduce','9222JnZWSV','action','unchanged','1210872jtijrw','install','skillRoots','6VMVrMI','8281040XWWJoO','personal','force','from','1750825eiAKaq','../../../skills/runtime-skill-sync.js','str','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','trim','filter','company','project','28871sinYnN','appCode'];a71_0x2569=function(){return _0x460f3f;};return a71_0x2569();}function a71_0xf524(_0x2600d9,_0x322f15){_0x2600d9=_0x2600d9-0xa7;const _0x2569bd=a71_0x2569();let _0xf5249e=_0x2569bd[_0x2600d9];return _0xf5249e;}async function syncRuntimeSkills(_0x127cc7){const _0x317d3a=a71_0x1e6957,{downloadRuntimeSkillPackage:_0x3db6e7,listRuntimeSkills:_0x5e5afc}=await import('../../../core/api-client.js'),{linkEffectiveRuntimeSkills:_0x2404c8,materializeRuntimeSkill:_0x12d953,pruneStaleRuntimeSkillCache:_0x185439,pruneStaleRuntimeSkillLinks:_0x58fa8b,resolveRuntimeSkillInstallTarget:_0x1660cd,reuseMaterializedRuntimeSkill:_0x3d280c}=await import(_0x317d3a(0xb8)),_0x16ef87=_0x127cc7[_0x317d3a(0xb9)]('code'),_0xd17c28=normalizeSyncScopes(_0x127cc7[_0x317d3a(0xb9)]('scope')),_0x470d76=_0x127cc7[_0x317d3a(0xcd)]??_0x317d3a(0xc2),_0xdc02aa=_0x127cc7['accessKey'],_0x179a89=_0x127cc7[_0x317d3a(0xc7)](_0x317d3a(0xb5));if(!_0xdc02aa)throw CliErrors[_0x317d3a(0xa8)]('Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.');const _0x2d32ab=_0x1660cd(_0x127cc7['appCode'],_0x127cc7[_0x317d3a(0xc7)](_0x317d3a(0xbe))?_0x317d3a(0xbe):_0x317d3a(0xc6)),_0x4a7555=_0x1660cd(_0x127cc7[_0x317d3a(0xc0)],_0x2d32ab[_0x317d3a(0xc3)]==='project'?_0x317d3a(0xc6):'project'),_0x122f43=await _0x5e5afc({'appCode':_0x127cc7[_0x317d3a(0xc0)],'scope':_0xd17c28[_0x317d3a(0xcf)]===0x1?_0xd17c28[0x0]:_0x317d3a(0xcc),'code':_0x16ef87[_0x317d3a(0xbb)]()||undefined,'installableOnly':!![]}),_0x3f8a5d=_0xd17c28['includes']('personal')?_0x122f43['personal']:[],_0x12acce=_0xd17c28[_0x317d3a(0xc4)](_0x317d3a(0xbd))?_0x122f43['company']:[],_0x3c6df2=new Set([..._0x3f8a5d[_0x317d3a(0xa7)](_0x289132=>_0x289132[_0x317d3a(0xc5)]?.['trim']())['filter'](_0x373cd4=>Boolean(_0x373cd4)),..._0x12acce['map'](_0x460821=>_0x460821[_0x317d3a(0xc5)]?.[_0x317d3a(0xbb)]())[_0x317d3a(0xbc)](_0x321a0a=>Boolean(_0x321a0a))]),_0x389b72=_0x16ef87[_0x317d3a(0xbb)]()?[_0x16ef87[_0x317d3a(0xbb)]()]:undefined,_0x5f2dce=_0xd17c28[_0x317d3a(0xcf)]===0x2&&_0xd17c28[_0x317d3a(0xc4)]('personal')&&_0xd17c28[_0x317d3a(0xc4)](_0x317d3a(0xbd)),_0x54dc3c=_0x5f2dce?_0x58fa8b(_0x2d32ab,_0x3c6df2,_0x389b72):[],_0x39075b=_0x185439({'env':_0x470d76,'accessKey':_0xdc02aa,'appCode':_0x127cc7[_0x317d3a(0xc0)],'activeSkillCodes':_0x3c6df2,'pruneSkillCodes':_0x389b72,'scopes':_0xd17c28,'protectedLinkRoots':_0x4a7555[_0x317d3a(0xb1)]}),_0x3635f3=[..._0x3f8a5d[_0x317d3a(0xa7)](_0x301c64=>({'skill':_0x301c64,'scope':_0x317d3a(0xb4)})),..._0x12acce[_0x317d3a(0xa7)](_0x2e8c57=>({'skill':_0x2e8c57,'scope':_0x317d3a(0xbd)}))],_0x24de67=await mapConcurrent(_0x3635f3,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0x52a65e,scope:_0x4276e2})=>{const _0x1d090b=_0x317d3a,_0x31d650=_0x3d280c(_0x52a65e,_0x4276e2,{'env':_0x470d76,'accessKey':_0xdc02aa,'appCode':_0x127cc7[_0x1d090b(0xc0)]});if(_0x31d650)return _0x31d650;return _0x12d953(_0x52a65e,_0x4276e2,{'env':_0x470d76,'accessKey':_0xdc02aa,'appCode':_0x127cc7[_0x1d090b(0xc0)],'force':_0x179a89,'packageBytes':await downloadSkillPackage(_0x52a65e,_0x4276e2,_0x127cc7['appCode'],_0x3db6e7)});}),_0x576761=_0x2404c8(_0x24de67,_0x2d32ab),_0x20df31=countLinkActions(_0x576761);return{'ok':!![],'data':{'appCode':_0x127cc7[_0x317d3a(0xc0)],..._0x2d32ab['scope']===_0x317d3a(0xbe)?{'installTarget':{'scope':_0x2d32ab[_0x317d3a(0xc3)],'skillRoots':[..._0x2d32ab[_0x317d3a(0xb1)]]}}:{},'personal':_0x3f8a5d[_0x317d3a(0xcf)],'company':_0x12acce['length'],'materialized':_0x24de67[_0x317d3a(0xcf)],'links':{'total':_0x576761[_0x317d3a(0xcf)],'created':_0x20df31['created']??0x0,'updated':_0x20df31['updated']??0x0,'unchanged':_0x20df31[_0x317d3a(0xae)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x54dc3c[_0x317d3a(0xbc)](_0xd699a8=>_0xd699a8['action']===_0x317d3a(0xce))[_0x317d3a(0xcf)],'cacheDirs':_0x39075b[_0x317d3a(0xbc)](_0x32c890=>_0x32c890[_0x317d3a(0xad)]===_0x317d3a(0xce))[_0x317d3a(0xcf)],'skipped':[..._0x54dc3c,..._0x39075b][_0x317d3a(0xbc)](_0x5dd7af=>_0x5dd7af['action']==='skipped')[_0x317d3a(0xcf)]},'skills':{'personal':_0x3f8a5d[_0x317d3a(0xa7)](summarizeRuntimeSkill),'company':_0x12acce[_0x317d3a(0xa7)](summarizeRuntimeSkill)}},'message':'Installed\x20'+_0x3f8a5d[_0x317d3a(0xcf)]+'\x20personal\x20and\x20'+_0x12acce[_0x317d3a(0xcf)]+_0x317d3a(0xcb)};}async function mapConcurrent(_0x552729,_0x1e7ea7,_0xcc423e){const _0x7e7a07=a71_0x1e6957,_0x2f7bb3=new Array(_0x552729['length']);let _0x2cd5d4=0x0;const _0x14e05a=Array[_0x7e7a07(0xb6)]({'length':Math[_0x7e7a07(0xca)](_0x1e7ea7,_0x552729[_0x7e7a07(0xcf)])},async()=>{const _0x205320=_0x7e7a07;while(_0x2cd5d4<_0x552729[_0x205320(0xcf)]){const _0x5e3ebe=_0x2cd5d4;_0x2cd5d4+=0x1,_0x2f7bb3[_0x5e3ebe]=await _0xcc423e(_0x552729[_0x5e3ebe]);}});return await Promise[_0x7e7a07(0xcc)](_0x14e05a),_0x2f7bb3;}async function downloadSkillPackage(_0x4fd3fd,_0x161b32,_0x50a3b3,_0x14c537){const _0x5f5899=a71_0x1e6957,_0x214581=_0x4fd3fd[_0x5f5899(0xc8)]?.[_0x5f5899(0xbb)]();return _0x214581?_0x14c537(_0x161b32,_0x4fd3fd[_0x5f5899(0xc5)],_0x50a3b3,_0x214581):_0x14c537(_0x161b32,_0x4fd3fd[_0x5f5899(0xc5)],_0x50a3b3);}function countLinkActions(_0x249255){const _0x112c56=a71_0x1e6957;return _0x249255[_0x112c56(0xab)]((_0x109e49,_0x26a9e7)=>{const _0x41b4ef=_0x112c56;return _0x109e49[_0x26a9e7['action']]=(_0x109e49[_0x26a9e7[_0x41b4ef(0xad)]]??0x0)+0x1,_0x109e49;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x1cc453=a72_0x173b;(function(_0xa19044,_0x1a897b){const _0x411ab6=a72_0x173b,_0x5e4d46=_0xa19044();while(!![]){try{const _0x4ab6f4=parseInt(_0x411ab6(0x206))/0x1+parseInt(_0x411ab6(0x20a))/0x2+parseInt(_0x411ab6(0x1f4))/0x3+-parseInt(_0x411ab6(0x1f1))/0x4+-parseInt(_0x411ab6(0x205))/0x5+parseInt(_0x411ab6(0x204))/0x6*(parseInt(_0x411ab6(0x1ef))/0x7)+parseInt(_0x411ab6(0x20b))/0x8*(parseInt(_0x411ab6(0x1ee))/0x9);if(_0x4ab6f4===_0x1a897b)break;else _0x5e4d46['push'](_0x5e4d46['shift']());}catch(_0x46619b){_0x5e4d46['push'](_0x5e4d46['shift']());}}}(a72_0x117f,0xcfb8f));function a72_0x117f(){const _0x4213c1=['appCode','company','local','filter','bool','\x20local\x20Skill(s).','builtin','map','list','remote','6yZnPXR','3385785rqljRt','515033VrajJq','production','../../../skills/runtime-skill-sync.js','Listed\x20','768430sxMSUH','9592XHBQEx','str','envName','read','scope','3222XLEbmo','1753451GBMCnO','trim','6802776NDwpOY','code','../../../core/api-client.js','4949097Opysak','\x20remote\x20Skill(s).','length','accessKey','project','personal'];a72_0x117f=function(){return _0x4213c1;};return a72_0x117f();}import{CliErrors}from'../../../errors.js';function a72_0x173b(_0x4c1a9a,_0x58aded){_0x4c1a9a=_0x4c1a9a-0x1ee;const _0x117f72=a72_0x117f();let _0x173b91=_0x117f72[_0x4c1a9a];return _0x173b91;}import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';export const listCommand={'service':'skill','command':a72_0x1cc453(0x202),'description':'List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','risk':a72_0x1cc453(0x20e),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x3fe6ec){const _0x41b0ab=a72_0x1cc453,_0x268de0=_0x3fe6ec[_0x41b0ab(0x20c)](_0x41b0ab(0x1f2)),_0x4abe2e=normalizeListScope(_0x3fe6ec[_0x41b0ab(0x20c)](_0x41b0ab(0x20f)));if(_0x3fe6ec[_0x41b0ab(0x1fe)]('local')){const _0x45832f=_0x3fe6ec[_0x41b0ab(0x1f7)];if(!_0x45832f)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0xbcccf1,resolveRuntimeSkillInstallTarget:_0x42c860}=await import(_0x41b0ab(0x208)),_0x464a30=_0x42c860(_0x3fe6ec['appCode'],_0x3fe6ec[_0x41b0ab(0x1fe)]('project')?_0x41b0ab(0x1f8):'global'),_0x137b8d=_0xbcccf1({'env':_0x3fe6ec[_0x41b0ab(0x20d)]??_0x41b0ab(0x207),'accessKey':_0x45832f,'appCode':_0x3fe6ec[_0x41b0ab(0x1fa)],'scopes':listScopeToRuntimeScopes(_0x4abe2e),'code':_0x268de0[_0x41b0ab(0x1f0)]()||undefined},_0x464a30),_0x153eef=groupLocalRuntimeSkills(_0x137b8d);return{'ok':!![],'data':{'appCode':_0x3fe6ec[_0x41b0ab(0x1fa)],'source':_0x41b0ab(0x1fc),..._0x464a30[_0x41b0ab(0x20f)]==='project'?{'installScope':_0x464a30['scope']}:{},'scope':_0x4abe2e,'total':_0x137b8d[_0x41b0ab(0x1f6)],'personal':_0x153eef['personal'][_0x41b0ab(0x1f6)],'company':_0x153eef[_0x41b0ab(0x1fb)]['length'],'items':_0x137b8d[_0x41b0ab(0x201)](summarizeLocalRuntimeSkill),'skills':{'personal':_0x153eef[_0x41b0ab(0x1f9)][_0x41b0ab(0x201)](summarizeLocalRuntimeSkill),'company':_0x153eef[_0x41b0ab(0x1fb)][_0x41b0ab(0x201)](summarizeLocalRuntimeSkill)}},'message':'Listed\x20'+_0x137b8d['length']+_0x41b0ab(0x1ff)};}const {listRuntimeSkills:_0xb6e810}=await import(_0x41b0ab(0x1f3)),_0x6d1913=await _0xb6e810({'appCode':_0x3fe6ec['appCode'],'scope':listScopeToRemoteScope(_0x4abe2e),'code':_0x268de0['trim']()||undefined}),_0x2360c1=shouldListScope(_0x4abe2e,_0x41b0ab(0x1f9))?_0x6d1913[_0x41b0ab(0x1f9)]??[]:[],_0x4e47c4=shouldListScope(_0x4abe2e,_0x41b0ab(0x1fb))?_0x6d1913['company']??[]:[],_0x556f99=[..._0x2360c1,..._0x4e47c4];return{'ok':!![],'data':{'appCode':_0x3fe6ec['appCode'],'source':_0x41b0ab(0x203),'scope':_0x4abe2e,'total':_0x556f99[_0x41b0ab(0x1f6)],'personal':_0x2360c1[_0x41b0ab(0x1f6)],'company':_0x4e47c4[_0x41b0ab(0x1f6)],'items':_0x556f99[_0x41b0ab(0x201)](summarizeRuntimeSkill),'skills':{'personal':_0x2360c1[_0x41b0ab(0x201)](summarizeRuntimeSkill),'company':_0x4e47c4[_0x41b0ab(0x201)](summarizeRuntimeSkill)}},'message':_0x41b0ab(0x209)+_0x556f99[_0x41b0ab(0x1f6)]+_0x41b0ab(0x1f5)};}};function groupLocalRuntimeSkills(_0x469d5c){const _0x28fc91=a72_0x1cc453;return{'personal':_0x469d5c[_0x28fc91(0x1fd)](_0x3852f1=>_0x3852f1['scope']===_0x28fc91(0x1f9)),'company':_0x469d5c[_0x28fc91(0x1fd)](_0x29ba93=>_0x29ba93[_0x28fc91(0x20f)]===_0x28fc91(0x1fb)),'builtin':_0x469d5c[_0x28fc91(0x1fd)](_0x323b41=>_0x323b41[_0x28fc91(0x20f)]===_0x28fc91(0x200))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x2c424f=a73_0x600c;(function(_0x1d8acb,_0x346b69){const _0x40c75d=a73_0x600c,_0x3ae754=_0x1d8acb();while(!![]){try{const _0x4ab214=-parseInt(_0x40c75d(0x1d4))/0x1*(-parseInt(_0x40c75d(0x1d6))/0x2)+parseInt(_0x40c75d(0x1ca))/0x3*(parseInt(_0x40c75d(0x1cc))/0x4)+-parseInt(_0x40c75d(0x1d7))/0x5+-parseInt(_0x40c75d(0x1cf))/0x6+-parseInt(_0x40c75d(0x1d5))/0x7*(parseInt(_0x40c75d(0x1d2))/0x8)+parseInt(_0x40c75d(0x1ce))/0x9*(parseInt(_0x40c75d(0x1d8))/0xa)+-parseInt(_0x40c75d(0x1cb))/0xb;if(_0x4ab214===_0x346b69)break;else _0x3ae754['push'](_0x3ae754['shift']());}catch(_0x10b116){_0x3ae754['push'](_0x3ae754['shift']());}}}(a73_0x2bc5,0xb3bfd));function a73_0x600c(_0x4f5542,_0x3a977d){_0x4f5542=_0x4f5542-0x1ca;const _0x2bc514=a73_0x2bc5();let _0x600c23=_0x2bc514[_0x4f5542];return _0x600c23;}import{CONFIRM_WARNINGS_FLAG,DIAGRAM_FILE_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';function a73_0x2bc5(){const _0x15954b=['4AaDGql','skill','477yaDheI','1441956dOivoX','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope,\x20or\x20submit\x20a\x20company-scope\x20version\x20for\x20review','write','319896HalMwC','push','253316CCtqHB','84VpybsD','8XTtJqC','1494835CRsrzs','134620MWjXzP','385278VhEhXq','1097646xjaYoQ'];a73_0x2bc5=function(){return _0x15954b;};return a73_0x2bc5();}import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a73_0x2c424f(0x1cd),'command':a73_0x2c424f(0x1d3),'description':a73_0x2c424f(0x1d0),'risk':a73_0x2c424f(0x1d1),'confirmationDescription':'Reads\x20local\x20Skill\x20content:\x20personal\x20scope\x20is\x20saved\x20immediately;\x20company\x20scope\x20submits\x20a\x20new\x20version\x20for\x20review.\x20The\x20confirmation\x20UI\x20does\x20not\x20show\x20the\x20directory\x20path\x20or\x20Skill\x20body.','flags':[DIR_FLAG,DIAGRAM_FILE_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a74_0xc08108=a74_0xe98b;(function(_0x5bac65,_0x2c7e62){const _0x384586=a74_0xe98b,_0x2155c3=_0x5bac65();while(!![]){try{const _0x23015d=-parseInt(_0x384586(0x187))/0x1*(-parseInt(_0x384586(0x18e))/0x2)+parseInt(_0x384586(0x18d))/0x3+parseInt(_0x384586(0x192))/0x4+-parseInt(_0x384586(0x191))/0x5+parseInt(_0x384586(0x189))/0x6+-parseInt(_0x384586(0x190))/0x7*(parseInt(_0x384586(0x184))/0x8)+-parseInt(_0x384586(0x18b))/0x9;if(_0x23015d===_0x2c7e62)break;else _0x2155c3['push'](_0x2155c3['shift']());}catch(_0x3af079){_0x2155c3['push'](_0x2155c3['shift']());}}}(a74_0x1691,0x32ca9));function a74_0x1691(){const _0x2b2016=['warnings','1147503unQcTd','130yyGmNK','skill','7wFwWzL','188585KGUNtw','461964CFWTLv','validate','errors','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','dir','366904zIZzHp','read','bool','3013yESLYc','type','1827606ABKgRa','str','6361353gmNvbv'];a74_0x1691=function(){return _0x2b2016;};return a74_0x1691();}import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a74_0xe98b(_0x19c5ee,_0x3dd1f3){_0x19c5ee=_0x19c5ee-0x180;const _0x16914f=a74_0x1691();let _0xe98ba=_0x16914f[_0x19c5ee];return _0xe98ba;}export const validateCommand={'service':a74_0xc08108(0x18f),'command':a74_0xc08108(0x180),'description':a74_0xc08108(0x182),'risk':a74_0xc08108(0x185),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x49d562){const _0x42cb7b=a74_0xc08108,_0x1664e8=_0x49d562[_0x42cb7b(0x186)]('strict'),_0x1c3f74=validateSkillDirectory(_0x49d562[_0x42cb7b(0x18a)]('dir'),{'strict':_0x1664e8});return throwIfSkillValidationFailed(_0x1c3f74,_0x1664e8),{'ok':!![],'data':{'dir':_0x1c3f74[_0x42cb7b(0x183)],'type':_0x1c3f74[_0x42cb7b(0x188)],'errors':_0x1c3f74[_0x42cb7b(0x181)],'warnings':_0x1c3f74[_0x42cb7b(0x18c)]},'message':'Skill\x20validation\x20passed.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3cc463,_0x36f651){const _0x32f1b8=a75_0x58d3,_0x20f0f4=_0x3cc463();while(!![]){try{const _0x4e841c=parseInt(_0x32f1b8(0xf1))/0x1+-parseInt(_0x32f1b8(0xeb))/0x2+-parseInt(_0x32f1b8(0xe3))/0x3*(parseInt(_0x32f1b8(0xe8))/0x4)+-parseInt(_0x32f1b8(0xee))/0x5+parseInt(_0x32f1b8(0xe2))/0x6*(parseInt(_0x32f1b8(0xe6))/0x7)+-parseInt(_0x32f1b8(0xe4))/0x8+parseInt(_0x32f1b8(0xe9))/0x9;if(_0x4e841c===_0x36f651)break;else _0x20f0f4['push'](_0x20f0f4['shift']());}catch(_0x1495b2){_0x20f0f4['push'](_0x20f0f4['shift']());}}}(a75_0xc2b8,0x5eb8a));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(_0x482d9c){const _0x16e882=a75_0x58d3;return(await readRequiredSkillDiagramInput(_0x482d9c))[_0x16e882(0xef)];}function a75_0xc2b8(){const _0x2027a6=['484281RgkkXo','3278408XAxdih','Mermaid\x20flowchart\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','280CGJtwW','parse','12fwxwFu','18958203tJhsbI','utf8','1408594Cmyugo','Fix\x20the\x20Mermaid\x20syntax\x20reported\x20by\x20your\x20editor\x20or\x20preview\x20tool,\x20then\x20retry\x20with\x20the\x20same\x20file.','trim','3182565JmzIZo','diagram','mermaid','174443WwxJwt','replace','Mermaid\x20syntax\x20validation\x20failed.','validation','window','document','isFile','51294iUYCOy'];a75_0xc2b8=function(){return _0x2027a6;};return a75_0xc2b8();}export async function readRequiredSkillDiagramInput(_0x4e35d8){const _0x75d9dc=a75_0x58d3,_0x504b06=_0x4e35d8[_0x75d9dc(0xed)]();if(!_0x504b06)throw CliErrors[_0x75d9dc(0xde)]('--diagram-file\x20is\x20required\x20when\x20publishing\x20a\x20Skill\x20version.','Generate\x20a\x20Mermaid\x20flowchart\x20and\x20pass\x20--diagram-file\x20<path>,\x20or\x20use\x20--diagram-file\x20-\x20for\x20standard\x20input.');let _0x33f20e,_0x4c1200;if(_0x504b06==='-')try{_0x33f20e=readFileSync(0x0,_0x75d9dc(0xea));}catch{throw CliErrors[_0x75d9dc(0xde)]('Unable\x20to\x20read\x20Mermaid\x20flowchart\x20from\x20standard\x20input.');}else{const _0x5d9b03=resolve(_0x504b06);if(!existsSync(_0x5d9b03))throw CliErrors[_0x75d9dc(0xde)]('Mermaid\x20flowchart\x20file\x20not\x20found:\x20'+_0x5d9b03);if(!statSync(_0x5d9b03)[_0x75d9dc(0xe1)]())throw CliErrors['validation'](_0x75d9dc(0xe5)+_0x5d9b03);_0x4c1200=realpathSync(_0x5d9b03),_0x33f20e=readFileSync(_0x4c1200,_0x75d9dc(0xea));}return{'diagram':{'schemaVersion':0x1,'mermaid':await validateAndCanonicalizeMermaid(_0x33f20e)},'sourceFilePath':_0x4c1200};}export async function validateAndCanonicalizeMermaid(_0x8a87c8){const _0x453749=a75_0x58d3,_0x16a8b4=_0x8a87c8[_0x453749(0xf2)](/\r\n/g,'\x0a')[_0x453749(0xf2)](/\r/g,'\x0a')['replace'](/\n+$/,'')+'\x0a';try{const _0x3a2832=await loadMermaidApi();await _0x3a2832[_0x453749(0xe7)](_0x16a8b4);}catch{throw diagramValidationError();}return _0x16a8b4;}function loadMermaidApi(){return mermaidApiPromise??=((async()=>{const _0x13f988=a75_0x58d3;if(!(_0x13f988(0xdf)in globalThis)||!(_0x13f988(0xe0)in globalThis)){const _0x4bba0c=new JSDOM('');Object['defineProperties'](globalThis,{'window':{'configurable':!![],'value':_0x4bba0c[_0x13f988(0xdf)]},'document':{'configurable':!![],'value':_0x4bba0c[_0x13f988(0xdf)]['document']}});}return(await import(_0x13f988(0xf0)))['default'];})()),mermaidApiPromise;}function a75_0x58d3(_0x483325,_0x18bb4e){_0x483325=_0x483325-0xde;const _0xc2b8e9=a75_0xc2b8();let _0x58d3a9=_0xc2b8e9[_0x483325];return _0x58d3a9;}function diagramValidationError(){const _0x4af074=a75_0x58d3;return CliErrors[_0x4af074(0xde)](_0x4af074(0xf3),_0x4af074(0xec));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a76_0x34e460=a76_0xc795;(function(_0x1e0083,_0x3c5def){const _0x39229a=a76_0xc795,_0x49ee74=_0x1e0083();while(!![]){try{const _0x542ba7=parseInt(_0x39229a(0x142))/0x1*(parseInt(_0x39229a(0x125))/0x2)+-parseInt(_0x39229a(0x13f))/0x3+-parseInt(_0x39229a(0x133))/0x4*(-parseInt(_0x39229a(0x13d))/0x5)+parseInt(_0x39229a(0x13e))/0x6+parseInt(_0x39229a(0x12f))/0x7+-parseInt(_0x39229a(0x146))/0x8*(-parseInt(_0x39229a(0x135))/0x9)+-parseInt(_0x39229a(0x141))/0xa;if(_0x542ba7===_0x3c5def)break;else _0x49ee74['push'](_0x49ee74['shift']());}catch(_0x12ee43){_0x49ee74['push'](_0x49ee74['shift']());}}}(a76_0x5b4d,0xb4d0d));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':'code','type':'string','description':a76_0x34e460(0x13c)};export const SCOPE_FLAG={'name':a76_0x34e460(0x131),'type':a76_0x34e460(0x149),'description':'Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','enum':[a76_0x34e460(0x127),a76_0x34e460(0x138),a76_0x34e460(0x147)]};export const PUSH_SCOPE_FLAG={'name':a76_0x34e460(0x131),'type':'string','description':a76_0x34e460(0x13a),'default':'personal','enum':[a76_0x34e460(0x138),a76_0x34e460(0x147)]};export const LIST_SCOPE_FLAG={'name':'scope','type':a76_0x34e460(0x149),'description':a76_0x34e460(0x134),'enum':['all',a76_0x34e460(0x138),a76_0x34e460(0x147)]};export const LOCAL_FLAG={'name':a76_0x34e460(0x130),'type':a76_0x34e460(0x14a),'description':a76_0x34e460(0x136)};export const DIR_FLAG={'name':a76_0x34e460(0x13b),'type':'string','required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};function a76_0xc795(_0x3d883a,_0x14efe6){_0x3d883a=_0x3d883a-0x123;const _0x5b4de4=a76_0x5b4d();let _0xc79509=_0x5b4de4[_0x3d883a];return _0xc79509;}export const DIAGRAM_FILE_FLAG={'name':a76_0x34e460(0x140),'type':'string','required':!![],'description':a76_0x34e460(0x145)};export const DIAGRAM_SKILL_CODE_FLAG={'name':a76_0x34e460(0x12d),'type':a76_0x34e460(0x149),'required':!![],'description':a76_0x34e460(0x123)};export const DIAGRAM_VERSION_FLAG={'name':a76_0x34e460(0x12e),'type':a76_0x34e460(0x149),'required':!![],'description':'Exact\x20Skill\x20version\x20whose\x20diagram\x20is\x20being\x20managed'};export const DIAGRAM_SCOPE_FLAG={'name':'scope','type':a76_0x34e460(0x149),'required':!![],'enum':[a76_0x34e460(0x138),a76_0x34e460(0x147)],'description':a76_0x34e460(0x144)};export const SOURCE_FINGERPRINT_FLAG={'name':a76_0x34e460(0x14b),'type':a76_0x34e460(0x149),'required':!![],'description':'Server-reported\x20SkillVersion\x20source\x20fingerprint','pattern':{'regex':/^sha256:[0-9a-f]{64}$/,'description':a76_0x34e460(0x124)}};export const EXPECTED_DIAGRAM_REVISION_FLAG={'name':a76_0x34e460(0x12b),'type':a76_0x34e460(0x129),'required':!![],'description':'Expected\x20current\x20diagram\x20revision;\x20use\x200\x20for\x20the\x20first\x20diagram'};export const CREATE_NAME_FLAG={'name':a76_0x34e460(0x143),'type':'string','required':!![],'description':a76_0x34e460(0x12c),'pattern':{'regex':SKILL_NAME_PATTERN,'description':a76_0x34e460(0x132)}};export const TYPE_FLAG={'name':'type','type':a76_0x34e460(0x149),'description':a76_0x34e460(0x14d),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a76_0x34e460(0x14c),'type':'string','description':a76_0x34e460(0x139),'default':DEFAULT_SKILL_TARGET};function a76_0x5b4d(){const _0x1dbceb=['6352LCcTmJ','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','all','Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories','number','project','expected-diagram-revision','Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','skill-code','version','9086889jOlLgm','local','scope','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','28sXNszK','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','3241521KZEFqC','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','confirm-warnings','personal','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','dir','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','166085FxHOYy','1690824qAqQhr','2624853qlsVfY','diagram-file','14107770nORGMV','42CrVdbA','name','Exact\x20Skill\x20scope:\x20personal\x20or\x20company','UTF-8\x20Mermaid\x20flowchart\x20file;\x20the\x20selected\x20file\x20is\x20excluded\x20from\x20the\x20Skill\x20package;\x20use\x20-\x20for\x20stdin','24QKuaPn','company','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','string','boolean','source-fingerprint','target','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','Exact\x20Skill\x20code\x20whose\x20version\x20diagram\x20is\x20being\x20managed','a\x20lowercase\x20sha256:<64\x20hex\x20characters>\x20fingerprint'];a76_0x5b4d=function(){return _0x1dbceb;};return a76_0x5b4d();}export const FORCE_FLAG={'name':'force','type':a76_0x34e460(0x14a),'description':a76_0x34e460(0x148)};export const PROJECT_TARGET_FLAG={'name':a76_0x34e460(0x12a),'type':'boolean','description':a76_0x34e460(0x128)};export const CONFIRM_WARNINGS_FLAG={'name':a76_0x34e460(0x137),'type':'boolean','description':a76_0x34e460(0x126)};export const STRICT_FLAG={'name':'strict','type':'boolean','description':'Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled'};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x480c(_0x112527,_0x12e057){_0x112527=_0x112527-0x1e7;const _0x48ce28=a77_0x48ce();let _0x480c8f=_0x48ce28[_0x112527];return _0x480c8f;}(function(_0x27237f,_0x119863){const _0x48c507=a77_0x480c,_0xaee48c=_0x27237f();while(!![]){try{const _0x3be9cd=parseInt(_0x48c507(0x1ee))/0x1+-parseInt(_0x48c507(0x1e8))/0x2*(parseInt(_0x48c507(0x1f2))/0x3)+-parseInt(_0x48c507(0x1ea))/0x4*(-parseInt(_0x48c507(0x1e9))/0x5)+-parseInt(_0x48c507(0x1e7))/0x6*(-parseInt(_0x48c507(0x1f0))/0x7)+-parseInt(_0x48c507(0x1ef))/0x8*(-parseInt(_0x48c507(0x1ec))/0x9)+-parseInt(_0x48c507(0x1ed))/0xa*(parseInt(_0x48c507(0x1f1))/0xb)+-parseInt(_0x48c507(0x1eb))/0xc*(parseInt(_0x48c507(0x1f3))/0xd);if(_0x3be9cd===_0x119863)break;else _0xaee48c['push'](_0xaee48c['shift']());}catch(_0x45e332){_0xaee48c['push'](_0xaee48c['shift']());}}}(a77_0x48ce,0x39fc7));function a77_0x48ce(){const _0x336862=['109071ywRrPJ','7610ZIAUJr','202684jhdQNG','232QXYDMv','7dGmqUO','2057OUrnVa','27075ttIWgy','1620645dPgzhU','1859514QPpckc','92RbuGzU','265iJHRKw','23012jyiChK','36vizrWd'];a77_0x48ce=function(){return _0x336862;};return a77_0x48ce();}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
|
-
|
|
1
|
+
(function(_0x2fec4c,_0xd7257){var _0x1c78d3=a78_0x4548,_0x58c15e=_0x2fec4c();while(!![]){try{var _0x35c45=parseInt(_0x1c78d3(0x188))/0x1+-parseInt(_0x1c78d3(0x189))/0x2*(parseInt(_0x1c78d3(0x18e))/0x3)+parseInt(_0x1c78d3(0x18c))/0x4*(-parseInt(_0x1c78d3(0x195))/0x5)+parseInt(_0x1c78d3(0x197))/0x6+parseInt(_0x1c78d3(0x191))/0x7*(-parseInt(_0x1c78d3(0x192))/0x8)+parseInt(_0x1c78d3(0x18a))/0x9+parseInt(_0x1c78d3(0x187))/0xa*(parseInt(_0x1c78d3(0x18b))/0xb);if(_0x35c45===_0xd7257)break;else _0x58c15e['push'](_0x58c15e['shift']());}catch(_0x199778){_0x58c15e['push'](_0x58c15e['shift']());}}}(a78_0x5486,0x8bd67));function a78_0x4548(_0x132d0e,_0x458ebb){_0x132d0e=_0x132d0e-0x186;var _0x5486ec=a78_0x5486();var _0x4548e4=_0x5486ec[_0x132d0e];return _0x4548e4;}function a78_0x5486(){var _0x440c8b=['4wwYHCM','object','81UObpzV','SKILL.md','isArray','56TqCaTk','188104fIyGuP','length','ossPath','4735595xIIpYN','files','639408bLNVBX','string','190tZmNkB','47008voIFBf','84598jGBuZy','5909724tXMpqc','1180971qMNexo'];a78_0x5486=function(){return _0x440c8b;};return a78_0x5486();}export function isPackageBackedManifest(_0xc33da4){var _0x40bca3=a78_0x4548;return!!_0xc33da4&&typeof _0xc33da4===_0x40bca3(0x18d)&&!Array[_0x40bca3(0x190)](_0xc33da4)&&typeof _0xc33da4[_0x40bca3(0x194)]===_0x40bca3(0x186)&&_0xc33da4['ossPath'][_0x40bca3(0x193)]>0x0&&Array[_0x40bca3(0x190)](_0xc33da4[_0x40bca3(0x196)]);}export function isMultiFileManifest(_0x241de9){var _0x52063d=a78_0x4548;return!!_0x241de9&&typeof _0x241de9===_0x52063d(0x18d)&&!Array['isArray'](_0x241de9)&&Array['isArray'](_0x241de9[_0x52063d(0x196)])&&_0x241de9[_0x52063d(0x196)]['some'](_0x52d258=>_0x52d258['path']!==_0x52063d(0x18f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x537d56,_0x588a45){const _0x1e9965=a79_0x59f1,_0x3df30c=_0x537d56();while(!![]){try{const _0x4dad91=parseInt(_0x1e9965(0xe9))/0x1*(-parseInt(_0x1e9965(0xcf))/0x2)+-parseInt(_0x1e9965(0xe4))/0x3+parseInt(_0x1e9965(0xde))/0x4+-parseInt(_0x1e9965(0xd3))/0x5+parseInt(_0x1e9965(0xf6))/0x6*(parseInt(_0x1e9965(0x100))/0x7)+parseInt(_0x1e9965(0xc9))/0x8+-parseInt(_0x1e9965(0xd4))/0x9*(-parseInt(_0x1e9965(0xd0))/0xa);if(_0x4dad91===_0x588a45)break;else _0x3df30c['push'](_0x3df30c['shift']());}catch(_0x3244fd){_0x3df30c['push'](_0x3df30c['shift']());}}}(a79_0x206a,0xc2c54));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';function a79_0x59f1(_0x2377ca,_0x38cd2f){_0x2377ca=_0x2377ca-0xc7;const _0x206a01=a79_0x206a();let _0x59f118=_0x206a01[_0x2377ca];return _0x59f118;}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 a79_0x206a(){const _0x26bb08=['3808896sXutoV','Company','validation','\x20has\x20scope=\x22','personal','1367989uwNpvI','valid','status','payload','warnings','\x20version\x20','Submitted\x20company\x20Skill\x20','existing','../../skills/runtime-skill-sync.js','NAMESPACE_ONLY','savedSkill','skillCode','diagram-file','6wOZRFb','remoteForPreflight','dir','files','publishInput','\x20Skill\x20','resolvedVersion','accessKey','resolvedSlug','/publish/validate','6852811HqsauT','authRequired','company','11871984hqWekT','POST','PRIVATE','Personal','version','confirm-warnings','2RCUxLz','5003050rzQicc','(unknown)','../../core/api-client.js','1069110xnFPoP','9NVZolP','errors','frontmatterDisplayName','submitted','/api/cli/v1/skills/','\x20for\x20review','trim','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','diagramValidated','appCode','2743788WTYQGw','input','unknown','scope','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','str'];a79_0x206a=function(){return _0x26bb08;};return a79_0x206a();}export async function skillPushDryRun(_0x2ccef0){const _0x10a4f3=a79_0x59f1,{getRuntimeSkillByCode:_0x9797d6,validateRuntimeSkillPublish:_0x1d1214}=await import(_0x10a4f3(0xd2)),{readPushDirectory:_0x3d1467,resolvePushDirectoryIdentity:_0x1b1e78}=await import(_0x10a4f3(0xf1));if(!_0x2ccef0[_0x10a4f3(0xfd)])throw CliErrors[_0x10a4f3(0xc7)]();const _0x110d7b=resolvePushScope(_0x2ccef0),_0x550244=validateSkillDirectory(_0x2ccef0[_0x10a4f3(0xe3)]('dir'));throwIfSkillValidationFailed(_0x550244);const {diagram:_0x33b0a3,sourceFilePath:_0x2bb0ba}=await readRequiredSkillDiagramInput(_0x2ccef0['str']('diagram-file')),_0x6c6eec=diagramPackageExclusion(_0x2bb0ba),_0x3cd243=_0x1b1e78(_0x550244[_0x10a4f3(0xf8)],_0x2ccef0['appCode'],remoteFirstMetadataOptions()),_0x4b3706=await _0x9797d6(_0x2ccef0[_0x10a4f3(0xdd)],_0x3cd243[_0x10a4f3(0xf4)]);throwIfBuiltinPushTarget(_0x4b3706);if(_0x110d7b==='company'){const _0x17b701=_0x3d1467(_0x550244['dir'],_0x2ccef0[_0x10a4f3(0xdd)],{...remoteMissingCompanyReadOptions(),..._0x6c6eec}),_0x3f070b=await _0x1d1214(_0x2ccef0[_0x10a4f3(0xdd)],withDiagram(_0x17b701['input'],_0x33b0a3),{'visibility':_0x10a4f3(0xf2)});return{'method':_0x10a4f3(0xca),'url':_0x10a4f3(0xd8)+_0x2ccef0[_0x10a4f3(0xdd)]+'/publish/validate','body':{'skillCode':_0x17b701[_0x10a4f3(0xf4)],'visibility':_0x10a4f3(0xf2),'valid':_0x3f070b[_0x10a4f3(0xea)],'errors':_0x3f070b[_0x10a4f3(0xd5)],'warnings':_0x3f070b['warnings'],'resolvedSlug':_0x3f070b[_0x10a4f3(0xfe)],'resolvedVersion':_0x3f070b[_0x10a4f3(0xfc)],'diagramValidated':_0x3f070b[_0x10a4f3(0xdc)]},'description':_0x10a4f3(0xe2)};}if(_0x4b3706&&_0x4b3706['scope']!==_0x10a4f3(0xe8))throw CliErrors[_0x10a4f3(0xe6)](_0x10a4f3(0xdb)+_0x3cd243[_0x10a4f3(0xf4)]+_0x10a4f3(0xe7)+(_0x4b3706[_0x10a4f3(0xe1)]??_0x10a4f3(0xe0))+'\x22.');const _0x2536be=_0x3d1467(_0x550244[_0x10a4f3(0xf8)],_0x2ccef0[_0x10a4f3(0xdd)],{..._0x4b3706?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x6c6eec}),_0x50c21a=await _0x1d1214(_0x2ccef0[_0x10a4f3(0xdd)],withDiagram(_0x2536be[_0x10a4f3(0xdf)],_0x33b0a3),{'visibility':_0x10a4f3(0xcb)});return{'method':'POST','url':_0x10a4f3(0xd8)+_0x2ccef0[_0x10a4f3(0xdd)]+_0x10a4f3(0xff),'body':{'skillCode':_0x2536be['skillCode'],'visibility':_0x10a4f3(0xcb),'valid':_0x50c21a['valid'],'errors':_0x50c21a['errors'],'warnings':_0x50c21a[_0x10a4f3(0xed)],'resolvedSlug':_0x50c21a[_0x10a4f3(0xfe)],'resolvedVersion':_0x50c21a['resolvedVersion'],'diagramValidated':_0x50c21a[_0x10a4f3(0xdc)]},'description':'Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'};}export async function skillPushExecute(_0x3ef419){const _0x998233=a79_0x59f1,{createPersonalRuntimeSkill:_0x4a27e2,downloadRuntimeSkillPackage:_0x3ef31a,getRuntimeSkillByCode:_0x3f027c,publishCompanyRuntimeSkill:_0x33f3e3,updatePersonalRuntimeSkill:_0x127636,validateRuntimeSkillPublish:_0x54ad2b}=await import(_0x998233(0xd2)),{verifyRuntimeSkillPackage:_0xba81e7,verifyRuntimeSkillBundle:_0x32b6b3,readPushDirectory:_0x32f5bd,refreshPushDirectoryMetadataFromRemote:_0x355e82,recordPushedRuntimeSkill:_0x49c1aa,resolvePushDirectoryIdentity:_0x346c2c}=await import(_0x998233(0xf1));if(!_0x3ef419[_0x998233(0xfd)])throw CliErrors['authRequired']();const _0xd27455=resolvePushScope(_0x3ef419),_0x379430=_0x3ef419['bool'](_0x998233(0xce))||_0x3ef419['bool']('confirmWarnings'),_0x288384=validateSkillDirectory(_0x3ef419[_0x998233(0xe3)](_0x998233(0xf8)));throwIfSkillValidationFailed(_0x288384);const {diagram:_0x27e92e,sourceFilePath:_0x4aac76}=await readRequiredSkillDiagramInput(_0x3ef419[_0x998233(0xe3)](_0x998233(0xf5))),_0x50f92c=diagramPackageExclusion(_0x4aac76),_0x2bca5e=_0x288384[_0x998233(0xf8)];let _0x2fccfa;if(_0xd27455===_0x998233(0xc8)){const _0x4d6988=_0x346c2c(_0x2bca5e,_0x3ef419['appCode'],remoteFirstMetadataOptions()),_0x930a17=await _0x3f027c(_0x3ef419['appCode'],_0x4d6988[_0x998233(0xf4)]);throwIfBuiltinPushTarget(_0x930a17);if(_0x930a17)_0x355e82(_0x2bca5e,_0x930a17,_0x3ef419[_0x998233(0xdd)]);const _0x1a603a=_0x32f5bd(_0x2bca5e,_0x3ef419[_0x998233(0xdd)],{..._0x930a17?{'targetScope':_0x998233(0xc8),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x50f92c});_0x2fccfa={'scope':_0x998233(0xc8),'payload':_0x1a603a,'publishInput':withDiagram(_0x1a603a['input'],_0x27e92e),'remoteForPreflight':_0x930a17,'warnings':[]};}else{const _0x1f4ef9=_0x3ef419[_0x998233(0xe3)]('appcode')[_0x998233(0xda)](),_0x395e15=Boolean(_0x1f4ef9),_0x211d61=allowRetargetArgs(_0x395e15),_0x56c381=_0x346c2c(_0x2bca5e,_0x3ef419[_0x998233(0xdd)],{...remoteFirstMetadataOptions(),..._0x211d61[0x0]}),_0x1db686=await _0x3f027c(_0x3ef419[_0x998233(0xdd)],_0x56c381[_0x998233(0xf4)]);throwIfBuiltinPushTarget(_0x1db686);if(_0x1db686){if(_0x1db686[_0x998233(0xe1)]!=='personal'){if(_0x395e15)throw CliErrors['validation'](_0x998233(0xdb)+_0x56c381['skillCode']+'\x20has\x20scope=\x22'+(_0x1db686['scope']??'unknown')+'\x22.');_0x355e82(_0x2bca5e,_0x1db686,_0x3ef419[_0x998233(0xdd)]);}else!_0x395e15&&_0x355e82(_0x2bca5e,_0x1db686,_0x3ef419[_0x998233(0xdd)]);}const _0x59b692=_0x32f5bd(_0x2bca5e,_0x3ef419['appCode'],{..._0x1db686?remotePersonalReadOptions(_0x395e15,_0x211d61[0x0]):remoteMissingPersonalReadOptions(_0x211d61[0x0]),..._0x50f92c}),_0x58d681=_0x1db686?.['scope']===_0x998233(0xe8)&&_0x1db686['skillCode']===_0x59b692[_0x998233(0xf4)]?_0x1db686:undefined,_0x409ba5=_0x395e15&&_0x58d681?withRetargetExistingMetadata(_0x59b692['input'],_0x58d681,{'preferInputSkillName':Boolean(_0x59b692[_0x998233(0xd6)])}):_0x59b692[_0x998233(0xdf)],_0x283e85=_0x395e15?buildRetargetWarning(_0x56c381['metadata'],_0x3ef419['appCode']):[];_0x2fccfa={'scope':_0x998233(0xe8),'payload':_0x59b692,'publishInput':withDiagram(_0x409ba5,_0x27e92e),'remoteForPreflight':_0x58d681,'existing':_0x58d681,'warnings':[..._0x288384['warnings'],..._0x283e85]};}const _0x665494=await runRemoteContentPreflight({'scope':_0x2fccfa[_0x998233(0xe1)],'remote':_0x2fccfa[_0x998233(0xf7)],'publishInput':_0x2fccfa['publishInput'],'skillCode':_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)],'appCode':_0x3ef419[_0x998233(0xdd)],'downloadRuntimeSkillPackage':_0x3ef31a,'verifyRuntimeSkillBundle':_0x32b6b3});if(_0x665494[_0x998233(0xeb)]==='identical')return _0x2fccfa[_0x998233(0xe1)]===_0x998233(0xc8)?_0x49c1aa(_0x2bca5e,_0x665494[_0x998233(0xf3)],_0x3ef419[_0x998233(0xdd)],{'scope':_0x998233(0xc8)}):_0x49c1aa(_0x2bca5e,_0x665494[_0x998233(0xf3)],_0x3ef419['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x665494['savedSkill']),'scope':_0x2fccfa[_0x998233(0xe1)],..._0x2fccfa[_0x998233(0xe1)]===_0x998233(0xe8)?{'warnings':_0x2fccfa['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x2fccfa[_0x998233(0xe1)])+_0x998233(0xfb)+_0x2fccfa[_0x998233(0xec)]['skillCode']+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x2fccfa['scope']==='company'){const _0x2285e5=await _0x54ad2b(_0x3ef419[_0x998233(0xdd)],_0x2fccfa[_0x998233(0xfa)],{'visibility':'NAMESPACE_ONLY'});throwIfPublishValidationFailed(_0x998233(0xc8),_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)],_0x2285e5),throwIfUnconfirmedPublishWarnings(_0x998233(0xc8),_0x2fccfa['payload'][_0x998233(0xf4)],_0x2285e5[_0x998233(0xed)],_0x379430);const _0x5d4379=await _0x33f3e3(_0x3ef419[_0x998233(0xdd)],_0x2fccfa[_0x998233(0xfa)],{'confirmWarnings':_0x379430});return _0x49c1aa(_0x2bca5e,{..._0x5d4379,'files':_0x2fccfa[_0x998233(0xfa)][_0x998233(0xf9)]},_0x3ef419['appCode'],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5d4379),'scope':_0x998233(0xc8),'reviewState':_0x998233(0xd7),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x2285e5[_0x998233(0xed)]}},'message':_0x998233(0xef)+_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)]+_0x998233(0xee)+(_0x5d4379[_0x998233(0xcd)]??_0x998233(0xd1))+_0x998233(0xd9)};}const _0x1949dc=await _0x54ad2b(_0x3ef419[_0x998233(0xdd)],_0x2fccfa[_0x998233(0xfa)],{'visibility':_0x998233(0xcb)});throwIfPublishValidationFailed('personal',_0x2fccfa['payload'][_0x998233(0xf4)],_0x1949dc),throwIfUnconfirmedPublishWarnings(_0x998233(0xe8),_0x2fccfa[_0x998233(0xec)]['skillCode'],_0x1949dc[_0x998233(0xed)],_0x379430);const _0x3f0e6d={'confirmWarnings':_0x379430},_0x2f9f64=_0x2fccfa[_0x998233(0xf0)]?await _0x127636(_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)],_0x3ef419[_0x998233(0xdd)],_0x2fccfa[_0x998233(0xfa)],_0x3f0e6d):await _0x4a27e2(_0x3ef419[_0x998233(0xdd)],_0x2fccfa[_0x998233(0xfa)],_0x3f0e6d);let _0x5e400f=_0x2f9f64;if(isMultiFileManifest(_0x2fccfa[_0x998233(0xfa)]['files'])){const _0xf61d14=await _0x3ef31a('personal',_0x2f9f64[_0x998233(0xf4)]||_0x2fccfa['payload']['skillCode'],_0x3ef419[_0x998233(0xdd)]);_0x32b6b3(_0x2fccfa[_0x998233(0xfa)][_0x998233(0xf9)],_0xf61d14),_0x5e400f={..._0x2f9f64,'files':_0x2fccfa[_0x998233(0xfa)][_0x998233(0xf9)]};}else{if(isPackageBackedManifest(_0x2f9f64[_0x998233(0xf9)])){const _0x18a378=await _0x3ef31a(_0x998233(0xe8),_0x2f9f64['skillCode']||_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)],_0x3ef419[_0x998233(0xdd)]);_0xba81e7(_0x2f9f64[_0x998233(0xf9)],_0x18a378);}}return _0x49c1aa(_0x2bca5e,_0x5e400f,_0x3ef419[_0x998233(0xdd)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x2f9f64),'warnings':_0x2fccfa[_0x998233(0xed)],'validation':{'warnings':_0x1949dc['warnings']},'diagramBound':!![]},'message':_0x2fccfa[_0x998233(0xf0)]?'Updated\x20personal\x20Skill\x20'+_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)]:'Created\x20personal\x20Skill\x20'+_0x2fccfa[_0x998233(0xec)][_0x998233(0xf4)]};}function scopeLabel(_0x3390f2){const _0x5819d9=a79_0x59f1;return _0x3390f2===_0x5819d9(0xc8)?_0x5819d9(0xe5):_0x5819d9(0xcc);}function withDiagram(_0x16198a,_0x1c074e){return{..._0x16198a,'diagram':_0x1c074e};}function diagramPackageExclusion(_0x5394be){return _0x5394be?{'excludedFilePaths':[_0x5394be]}:{};}
|
|
1
|
+
(function(_0x5160fc,_0x4be47b){const _0x11a079=a79_0x4757,_0x77508=_0x5160fc();while(!![]){try{const _0x2f9bf3=parseInt(_0x11a079(0x1d6))/0x1*(parseInt(_0x11a079(0x1dd))/0x2)+-parseInt(_0x11a079(0x1f5))/0x3+-parseInt(_0x11a079(0x1e4))/0x4*(parseInt(_0x11a079(0x1fa))/0x5)+-parseInt(_0x11a079(0x1f2))/0x6*(parseInt(_0x11a079(0x1fb))/0x7)+-parseInt(_0x11a079(0x1f9))/0x8+-parseInt(_0x11a079(0x1ec))/0x9+parseInt(_0x11a079(0x208))/0xa;if(_0x2f9bf3===_0x4be47b)break;else _0x77508['push'](_0x77508['shift']());}catch(_0x486cb8){_0x77508['push'](_0x77508['shift']());}}}(a79_0x70bb,0x392c3));import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';function a79_0x70bb(){const _0x5115f1=['POST','resolvedVersion','appCode','input','156193nnroXL','unknown','authRequired','../../core/api-client.js','existing','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','scope','4sfWCyJ','Company','diagram-file','NAMESPACE_ONLY','\x20has\x20scope=\x22','bool','/publish/validate','8RUYhGN','accessKey','\x20Skill\x20','skillCode','valid','PRIVATE','frontmatterDisplayName','files','3717702pPSLuC','\x20version\x20','confirmWarnings','publishInput','personal','remoteForPreflight','3330kjYclD','appcode','/api/cli/v1/skills/','538653YiOyaM','\x20for\x20review','Created\x20personal\x20Skill\x20','savedSkill','2576248ncAlwF','487300MIJYbA','742QXSJHU','Updated\x20personal\x20Skill\x20','Submitted\x20company\x20Skill\x20','dir','validation','errors','../../skills/runtime-skill-sync.js','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','version','payload','status','str','submitted','10902030mjyTbS','company','resolvedSlug','warnings','diagramValidated'];a79_0x70bb=function(){return _0x5115f1;};return a79_0x70bb();}import{readRequiredSkillDiagramInput}from'./diagram.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';function a79_0x4757(_0x2cc2b4,_0xfc3314){_0x2cc2b4=_0x2cc2b4-0x1ce;const _0x70bbe=a79_0x70bb();let _0x475778=_0x70bbe[_0x2cc2b4];return _0x475778;}export async function skillPushDryRun(_0x348593){const _0x39f122=a79_0x4757,{getRuntimeSkillByCode:_0x31ce5e,validateRuntimeSkillPublish:_0x183afe}=await import(_0x39f122(0x1d9)),{readPushDirectory:_0x42022c,resolvePushDirectoryIdentity:_0x3af09e}=await import(_0x39f122(0x201));if(!_0x348593[_0x39f122(0x1e5)])throw CliErrors['authRequired']();const _0x2761bb=resolvePushScope(_0x348593),_0x1253ca=validateSkillDirectory(_0x348593[_0x39f122(0x206)](_0x39f122(0x1fe)));throwIfSkillValidationFailed(_0x1253ca);const {diagram:_0x9a5832,sourceFilePath:_0xdb973f}=await readRequiredSkillDiagramInput(_0x348593[_0x39f122(0x206)](_0x39f122(0x1df))),_0x592a6f=diagramPackageExclusion(_0xdb973f),_0x4cca17=_0x3af09e(_0x1253ca[_0x39f122(0x1fe)],_0x348593[_0x39f122(0x1d4)],remoteFirstMetadataOptions()),_0x36f7fd=await _0x31ce5e(_0x348593[_0x39f122(0x1d4)],_0x4cca17[_0x39f122(0x1e7)]);throwIfBuiltinPushTarget(_0x36f7fd);if(_0x2761bb===_0x39f122(0x1ce)){const _0x1b2d52=_0x42022c(_0x1253ca[_0x39f122(0x1fe)],_0x348593[_0x39f122(0x1d4)],{...remoteMissingCompanyReadOptions(),..._0x592a6f}),_0x7bb93d=await _0x183afe(_0x348593[_0x39f122(0x1d4)],withDiagram(_0x1b2d52[_0x39f122(0x1d5)],_0x9a5832),{'visibility':'NAMESPACE_ONLY'});return{'method':_0x39f122(0x1d2),'url':_0x39f122(0x1f4)+_0x348593['appCode']+_0x39f122(0x1e3),'body':{'skillCode':_0x1b2d52[_0x39f122(0x1e7)],'visibility':_0x39f122(0x1e0),'valid':_0x7bb93d['valid'],'errors':_0x7bb93d[_0x39f122(0x200)],'warnings':_0x7bb93d[_0x39f122(0x1d0)],'resolvedSlug':_0x7bb93d[_0x39f122(0x1cf)],'resolvedVersion':_0x7bb93d[_0x39f122(0x1d3)],'diagramValidated':_0x7bb93d[_0x39f122(0x1d1)]},'description':'Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.'};}if(_0x36f7fd&&_0x36f7fd['scope']!==_0x39f122(0x1f0))throw CliErrors[_0x39f122(0x1ff)](_0x39f122(0x202)+_0x4cca17[_0x39f122(0x1e7)]+_0x39f122(0x1e1)+(_0x36f7fd[_0x39f122(0x1dc)]??_0x39f122(0x1d7))+'\x22.');const _0x312cc6=_0x42022c(_0x1253ca[_0x39f122(0x1fe)],_0x348593[_0x39f122(0x1d4)],{..._0x36f7fd?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x592a6f}),_0x2b98e8=await _0x183afe(_0x348593['appCode'],withDiagram(_0x312cc6['input'],_0x9a5832),{'visibility':'PRIVATE'});return{'method':'POST','url':_0x39f122(0x1f4)+_0x348593[_0x39f122(0x1d4)]+_0x39f122(0x1e3),'body':{'skillCode':_0x312cc6['skillCode'],'visibility':_0x39f122(0x1e9),'valid':_0x2b98e8[_0x39f122(0x1e8)],'errors':_0x2b98e8[_0x39f122(0x200)],'warnings':_0x2b98e8[_0x39f122(0x1d0)],'resolvedSlug':_0x2b98e8[_0x39f122(0x1cf)],'resolvedVersion':_0x2b98e8['resolvedVersion'],'diagramValidated':_0x2b98e8[_0x39f122(0x1d1)]},'description':'Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'};}export async function skillPushExecute(_0x33d465){const _0x40047e=a79_0x4757,{createPersonalRuntimeSkill:_0x4c3852,downloadRuntimeSkillPackage:_0x74d4ad,getRuntimeSkillByCode:_0xbe0852,publishCompanyRuntimeSkill:_0x3e123b,updatePersonalRuntimeSkill:_0x3b4674,validateRuntimeSkillPublish:_0x2225fe}=await import(_0x40047e(0x1d9)),{verifyRuntimeSkillPackage:_0x30f77c,verifyRuntimeSkillBundle:_0x3e880c,readPushDirectory:_0x1502f0,refreshPushDirectoryMetadataFromRemote:_0x57a663,recordPushedRuntimeSkill:_0x1b9225,resolvePushDirectoryIdentity:_0x19c490}=await import('../../skills/runtime-skill-sync.js');if(!_0x33d465[_0x40047e(0x1e5)])throw CliErrors[_0x40047e(0x1d8)]();const _0x53e018=resolvePushScope(_0x33d465),_0x28373c=_0x33d465[_0x40047e(0x1e2)]('confirm-warnings')||_0x33d465[_0x40047e(0x1e2)](_0x40047e(0x1ee)),_0x527920=validateSkillDirectory(_0x33d465[_0x40047e(0x206)](_0x40047e(0x1fe)));throwIfSkillValidationFailed(_0x527920);const {diagram:_0x5a6e43,sourceFilePath:_0x18352e}=await readRequiredSkillDiagramInput(_0x33d465[_0x40047e(0x206)](_0x40047e(0x1df))),_0x4e8c3f=diagramPackageExclusion(_0x18352e),_0x1e39f1=_0x527920[_0x40047e(0x1fe)];let _0x5677c9;if(_0x53e018==='company'){const _0x1a230e=_0x19c490(_0x1e39f1,_0x33d465[_0x40047e(0x1d4)],remoteFirstMetadataOptions()),_0x4a8b59=await _0xbe0852(_0x33d465['appCode'],_0x1a230e['skillCode']);throwIfBuiltinPushTarget(_0x4a8b59);if(_0x4a8b59)_0x57a663(_0x1e39f1,_0x4a8b59,_0x33d465[_0x40047e(0x1d4)]);const _0x467214=_0x1502f0(_0x1e39f1,_0x33d465[_0x40047e(0x1d4)],{..._0x4a8b59?{'targetScope':_0x40047e(0x1ce),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x4e8c3f});_0x5677c9={'scope':_0x40047e(0x1ce),'payload':_0x467214,'publishInput':withDiagram(_0x467214['input'],_0x5a6e43),'remoteForPreflight':_0x4a8b59,'warnings':[]};}else{const _0x45fdfa=_0x33d465[_0x40047e(0x206)](_0x40047e(0x1f3))['trim'](),_0x5a1d6d=Boolean(_0x45fdfa),_0x3500c6=allowRetargetArgs(_0x5a1d6d),_0x4ec2d1=_0x19c490(_0x1e39f1,_0x33d465[_0x40047e(0x1d4)],{...remoteFirstMetadataOptions(),..._0x3500c6[0x0]}),_0x2cfd09=await _0xbe0852(_0x33d465[_0x40047e(0x1d4)],_0x4ec2d1[_0x40047e(0x1e7)]);throwIfBuiltinPushTarget(_0x2cfd09);if(_0x2cfd09){if(_0x2cfd09[_0x40047e(0x1dc)]!==_0x40047e(0x1f0)){if(_0x5a1d6d)throw CliErrors[_0x40047e(0x1ff)](_0x40047e(0x202)+_0x4ec2d1['skillCode']+'\x20has\x20scope=\x22'+(_0x2cfd09[_0x40047e(0x1dc)]??_0x40047e(0x1d7))+'\x22.');_0x57a663(_0x1e39f1,_0x2cfd09,_0x33d465['appCode']);}else!_0x5a1d6d&&_0x57a663(_0x1e39f1,_0x2cfd09,_0x33d465[_0x40047e(0x1d4)]);}const _0x4dc87d=_0x1502f0(_0x1e39f1,_0x33d465['appCode'],{..._0x2cfd09?remotePersonalReadOptions(_0x5a1d6d,_0x3500c6[0x0]):remoteMissingPersonalReadOptions(_0x3500c6[0x0]),..._0x4e8c3f}),_0x4b1f59=_0x2cfd09?.[_0x40047e(0x1dc)]===_0x40047e(0x1f0)&&_0x2cfd09[_0x40047e(0x1e7)]===_0x4dc87d[_0x40047e(0x1e7)]?_0x2cfd09:undefined,_0x22c513=_0x5a1d6d&&_0x4b1f59?withRetargetExistingMetadata(_0x4dc87d['input'],_0x4b1f59,{'preferInputSkillName':Boolean(_0x4dc87d[_0x40047e(0x1ea)])}):_0x4dc87d[_0x40047e(0x1d5)],_0x447aea=_0x5a1d6d?buildRetargetWarning(_0x4ec2d1['metadata'],_0x33d465[_0x40047e(0x1d4)]):[];_0x5677c9={'scope':_0x40047e(0x1f0),'payload':_0x4dc87d,'publishInput':withDiagram(_0x22c513,_0x5a6e43),'remoteForPreflight':_0x4b1f59,'existing':_0x4b1f59,'warnings':[..._0x527920[_0x40047e(0x1d0)],..._0x447aea]};}const _0x1c3b61=await runRemoteContentPreflight({'scope':_0x5677c9[_0x40047e(0x1dc)],'remote':_0x5677c9[_0x40047e(0x1f1)],'publishInput':_0x5677c9['publishInput'],'skillCode':_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],'appCode':_0x33d465[_0x40047e(0x1d4)],'downloadRuntimeSkillPackage':_0x74d4ad,'verifyRuntimeSkillBundle':_0x3e880c});if(_0x1c3b61[_0x40047e(0x205)]==='identical')return _0x5677c9[_0x40047e(0x1dc)]===_0x40047e(0x1ce)?_0x1b9225(_0x1e39f1,_0x1c3b61[_0x40047e(0x1f8)],_0x33d465['appCode'],{'scope':_0x40047e(0x1ce)}):_0x1b9225(_0x1e39f1,_0x1c3b61[_0x40047e(0x1f8)],_0x33d465[_0x40047e(0x1d4)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1c3b61[_0x40047e(0x1f8)]),'scope':_0x5677c9[_0x40047e(0x1dc)],..._0x5677c9[_0x40047e(0x1dc)]===_0x40047e(0x1f0)?{'warnings':_0x5677c9['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x5677c9[_0x40047e(0x1dc)])+_0x40047e(0x1e6)+_0x5677c9['payload']['skillCode']+_0x40047e(0x1db)};if(_0x5677c9['scope']===_0x40047e(0x1ce)){const _0x2f59c2=await _0x2225fe(_0x33d465[_0x40047e(0x1d4)],_0x5677c9[_0x40047e(0x1ef)],{'visibility':_0x40047e(0x1e0)});throwIfPublishValidationFailed(_0x40047e(0x1ce),_0x5677c9['payload']['skillCode'],_0x2f59c2),throwIfUnconfirmedPublishWarnings(_0x40047e(0x1ce),_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],_0x2f59c2[_0x40047e(0x1d0)],_0x28373c);const _0x1a8cd0=await _0x3e123b(_0x33d465[_0x40047e(0x1d4)],_0x5677c9[_0x40047e(0x1ef)],{'confirmWarnings':_0x28373c});return _0x1b9225(_0x1e39f1,{..._0x1a8cd0,'files':_0x5677c9['publishInput'][_0x40047e(0x1eb)]},_0x33d465[_0x40047e(0x1d4)],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x1a8cd0),'scope':_0x40047e(0x1ce),'reviewState':_0x40047e(0x207),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x2f59c2[_0x40047e(0x1d0)]}},'message':_0x40047e(0x1fd)+_0x5677c9['payload']['skillCode']+_0x40047e(0x1ed)+(_0x1a8cd0[_0x40047e(0x203)]??'(unknown)')+_0x40047e(0x1f6)};}const _0x22c461=await _0x2225fe(_0x33d465['appCode'],_0x5677c9[_0x40047e(0x1ef)],{'visibility':'PRIVATE'});throwIfPublishValidationFailed(_0x40047e(0x1f0),_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],_0x22c461),throwIfUnconfirmedPublishWarnings('personal',_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],_0x22c461[_0x40047e(0x1d0)],_0x28373c);const _0x5ecefd={'confirmWarnings':_0x28373c},_0x3cdd8e=_0x5677c9[_0x40047e(0x1da)]?await _0x3b4674(_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],_0x33d465['appCode'],_0x5677c9[_0x40047e(0x1ef)],_0x5ecefd):await _0x4c3852(_0x33d465[_0x40047e(0x1d4)],_0x5677c9['publishInput'],_0x5ecefd);let _0x1c00f5=_0x3cdd8e;if(isMultiFileManifest(_0x5677c9[_0x40047e(0x1ef)][_0x40047e(0x1eb)])){const _0x38924c=await _0x74d4ad('personal',_0x3cdd8e[_0x40047e(0x1e7)]||_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],_0x33d465[_0x40047e(0x1d4)]);_0x3e880c(_0x5677c9[_0x40047e(0x1ef)][_0x40047e(0x1eb)],_0x38924c),_0x1c00f5={..._0x3cdd8e,'files':_0x5677c9[_0x40047e(0x1ef)][_0x40047e(0x1eb)]};}else{if(isPackageBackedManifest(_0x3cdd8e[_0x40047e(0x1eb)])){const _0x3a2ee8=await _0x74d4ad(_0x40047e(0x1f0),_0x3cdd8e[_0x40047e(0x1e7)]||_0x5677c9[_0x40047e(0x204)][_0x40047e(0x1e7)],_0x33d465['appCode']);_0x30f77c(_0x3cdd8e[_0x40047e(0x1eb)],_0x3a2ee8);}}return _0x1b9225(_0x1e39f1,_0x1c00f5,_0x33d465[_0x40047e(0x1d4)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x3cdd8e),'warnings':_0x5677c9[_0x40047e(0x1d0)],'validation':{'warnings':_0x22c461['warnings']},'diagramBound':!![]},'message':_0x5677c9[_0x40047e(0x1da)]?_0x40047e(0x1fc)+_0x5677c9['payload']['skillCode']:_0x40047e(0x1f7)+_0x5677c9[_0x40047e(0x204)]['skillCode']};}function scopeLabel(_0x16d987){const _0x2488e1=a79_0x4757;return _0x16d987===_0x2488e1(0x1ce)?_0x2488e1(0x1de):'Personal';}function withDiagram(_0x491729,_0x45fbda){return{..._0x491729,'diagram':_0x45fbda};}function diagramPackageExclusion(_0x5f1f09){return _0x5f1f09?{'excludedFilePaths':[_0x5f1f09]}:{};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a80_0x18fd(_0x27d299,_0x4b20c7){_0x27d299=_0x27d299-0xa4;const _0x2bcabf=a80_0x2bca();let _0x18fd77=_0x2bcabf[_0x27d299];return _0x18fd77;}(function(_0x166d60,_0x1ce3a7){const _0x477621=a80_0x18fd,_0x38b9b9=_0x166d60();while(!![]){try{const _0x479a68=parseInt(_0x477621(0xd1))/0x1*(-parseInt(_0x477621(0xb4))/0x2)+-parseInt(_0x477621(0xb1))/0x3*(parseInt(_0x477621(0xca))/0x4)+parseInt(_0x477621(0xc3))/0x5*(-parseInt(_0x477621(0xb7))/0x6)+parseInt(_0x477621(0xb8))/0x7+parseInt(_0x477621(0xb6))/0x8+parseInt(_0x477621(0xa5))/0x9*(-parseInt(_0x477621(0xc1))/0xa)+parseInt(_0x477621(0xc4))/0xb;if(_0x479a68===_0x1ce3a7)break;else _0x38b9b9['push'](_0x38b9b9['shift']());}catch(_0x36adc6){_0x38b9b9['push'](_0x38b9b9['shift']());}}}(a80_0x2bca,0xb72ca));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x1eac77){const _0x30b134=a80_0x18fd,_0x46e0d8=_0x1eac77[_0x30b134(0xa7)](_0x30b134(0xb0))||_0x30b134(0xc7);if(_0x46e0d8==='personal'||_0x46e0d8==='company')return _0x46e0d8;throw CliErrors[_0x30b134(0xbb)](_0x30b134(0xbc)+_0x46e0d8+'\x22.');}function a80_0x2bca(){const _0x21f801=['Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','str','downloadRuntimeSkillPackage','different','builtin','warnings','Builtin\x20Skill\x20','\x20Skill\x20push\x20validation\x20failed\x20for\x20','publishInput','files','scope','1578XYvqkQ','errors','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','10294YCFfkc','Review\x20each\x20warning\x20before\x20continuing.','7859632SwIrAV','198gczgXS','10402784ZSmENT','lovrabet.skill.json','length','validation','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','\x20cannot\x20be\x20pushed.','content','Local\x20Skill\x20metadata\x20appCode\x20','not-applicable','230VQTGwK','verifyRuntimeSkillBundle','55270PGLIMN','7256271CbqDTX','Company','version','personal','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','valid','6988qYJkuZ','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','skillCode','remote','appCode','Personal','29XQvPFm','join','(unknown)','skill-metadata-appcode-retargeted','company','369774KAQXwJ'];a80_0x2bca=function(){return _0x21f801;};return a80_0x2bca();}export function allowRetargetArgs(_0x10892d){return _0x10892d?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x4dd176=a80_0x18fd;return{'targetScope':_0x4dd176(0xa4),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x237b93={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x237b93};}export function remotePersonalReadOptions(_0x3ef25e,_0x372f8={}){return{'ignoreInvalidMetadata':!![],..._0x3ef25e?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x372f8};}export function throwIfBuiltinPushTarget(_0x2d00a1){const _0x2e1bb9=a80_0x18fd;if(_0x2d00a1?.['scope']!==_0x2e1bb9(0xaa))return;throw CliErrors['validation'](_0x2e1bb9(0xac)+(_0x2d00a1[_0x2e1bb9(0xcd)]??_0x2e1bb9(0xd3))+_0x2e1bb9(0xbd),_0x2e1bb9(0xa6));}export function throwIfPublishValidationFailed(_0x1c3226,_0x5edada,_0x57a6c9){const _0x2e8791=a80_0x18fd;if(_0x57a6c9[_0x2e8791(0xb2)][_0x2e8791(0xba)]===0x0&&(_0x57a6c9[_0x2e8791(0xc9)]||_0x57a6c9[_0x2e8791(0xab)][_0x2e8791(0xba)]>0x0))return;const _0x4d19af=_0x57a6c9[_0x2e8791(0xb2)][_0x2e8791(0xba)]>0x0?_0x57a6c9['errors']['join'](';\x20'):'SkillHub\x20validation\x20returned\x20invalid.',_0x2e38cb=_0x1c3226===_0x2e8791(0xa4)?_0x2e8791(0xc5):_0x2e8791(0xd0);throw CliErrors[_0x2e8791(0xbb)](_0x2e38cb+_0x2e8791(0xad)+_0x5edada+'.',_0x4d19af);}export function throwIfUnconfirmedPublishWarnings(_0x3a9212,_0x4bbc45,_0x404f62,_0x2983bb){const _0x1d560a=a80_0x18fd;if(_0x404f62[_0x1d560a(0xba)]===0x0||_0x2983bb)return;const _0x3c119b=_0x3a9212===_0x1d560a(0xa4)?_0x1d560a(0xc5):'Personal';throw CliErrors[_0x1d560a(0xbb)](_0x3c119b+_0x1d560a(0xb3)+_0x4bbc45+'.',[_0x1d560a(0xb5),'Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.',_0x1d560a(0xcc),'Warnings:\x20'+_0x404f62[_0x1d560a(0xd2)](';\x20')][_0x1d560a(0xd2)]('\x20'));}export function buildRetargetWarning(_0x2d60ca,_0x434246){const _0x1956cf=a80_0x18fd;if(!_0x2d60ca?.[_0x1956cf(0xcf)]||_0x2d60ca[_0x1956cf(0xcf)]===_0x434246)return[];return[{'level':'warning','ruleId':_0x1956cf(0xd4),'file':_0x1956cf(0xb9),'message':_0x1956cf(0xbf)+_0x2d60ca[_0x1956cf(0xcf)]+_0x1956cf(0xc8)+_0x434246+'\x20after\x20successful\x20push.','suggestion':_0x1956cf(0xcb)}];}export async function runRemoteContentPreflight(_0x4fdcbb){const _0x45bda2=a80_0x18fd;if(!_0x4fdcbb[_0x45bda2(0xce)]||_0x4fdcbb[_0x45bda2(0xce)]['scope']!==_0x4fdcbb[_0x45bda2(0xb0)]||!_0x4fdcbb[_0x45bda2(0xae)][_0x45bda2(0xaf)])return{'status':_0x45bda2(0xc0)};const _0x3be3d2=_0x4fdcbb[_0x45bda2(0xce)][_0x45bda2(0xcd)]||_0x4fdcbb[_0x45bda2(0xcd)];if(!_0x3be3d2)return{'status':_0x45bda2(0xc0)};const _0x591276=await _0x4fdcbb[_0x45bda2(0xa8)](_0x4fdcbb[_0x45bda2(0xb0)],_0x3be3d2,_0x4fdcbb[_0x45bda2(0xcf)],_0x4fdcbb['remote'][_0x45bda2(0xc6)]);try{_0x4fdcbb[_0x45bda2(0xc2)](_0x4fdcbb[_0x45bda2(0xae)]['files'],_0x591276);}catch{return{'status':_0x45bda2(0xa9)};}return{'status':'identical','savedSkill':{..._0x4fdcbb[_0x45bda2(0xce)],'content':_0x4fdcbb[_0x45bda2(0xae)][_0x45bda2(0xbe)],'files':_0x4fdcbb[_0x45bda2(0xae)][_0x45bda2(0xaf)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a81_0x5ea9(){const _0x44c699=['skillName','4350895nNOuJj','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','2169418sRcdwU','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','782280ovyWNs','1tizGzb','1656369MePSWX','sourceSessionId','1584YFWwJH','90480rYNbFF','Local\x20Skill\x20metadata\x20appCode\x20','10555202uKurGM','description','4252804IXoyjw','appCode','tags'];a81_0x5ea9=function(){return _0x44c699;};return a81_0x5ea9();}(function(_0x4f7570,_0x3f07ef){const _0x3b4b51=a81_0x13f9,_0xf64505=_0x4f7570();while(!![]){try{const _0x38f954=-parseInt(_0x3b4b51(0x7f))/0x1*(parseInt(_0x3b4b51(0x7c))/0x2)+-parseInt(_0x3b4b51(0x80))/0x3+parseInt(_0x3b4b51(0x76))/0x4+parseInt(_0x3b4b51(0x7a))/0x5+parseInt(_0x3b4b51(0x7e))/0x6+-parseInt(_0x3b4b51(0x74))/0x7+-parseInt(_0x3b4b51(0x83))/0x8*(-parseInt(_0x3b4b51(0x82))/0x9);if(_0x38f954===_0x3f07ef)break;else _0xf64505['push'](_0xf64505['shift']());}catch(_0x1d0f45){_0xf64505['push'](_0xf64505['shift']());}}}(a81_0x5ea9,0xde122));function a81_0x13f9(_0x23354b,_0x4554da){_0x23354b=_0x23354b-0x73;const _0x5ea913=a81_0x5ea9();let _0x13f9b3=_0x5ea913[_0x23354b];return _0x13f9b3;}export function withRetargetExistingMetadata(_0x5c8b5d,_0x1d77f7,_0x54dfeb={}){const _0x3c35f5=a81_0x13f9,_0x363783=_0x54dfeb['preferInputSkillName']?_0x5c8b5d['skillName']??_0x1d77f7[_0x3c35f5(0x79)]:_0x1d77f7[_0x3c35f5(0x79)]??_0x5c8b5d['skillName'];return{..._0x5c8b5d,'skillName':_0x363783,'description':_0x1d77f7[_0x3c35f5(0x75)]??_0x5c8b5d[_0x3c35f5(0x75)],'tags':Array['isArray'](_0x1d77f7[_0x3c35f5(0x78)])?_0x1d77f7['tags']:_0x5c8b5d[_0x3c35f5(0x78)],'version':_0x1d77f7['version']??_0x5c8b5d['version'],'sourceSessionId':_0x1d77f7[_0x3c35f5(0x81)]??_0x5c8b5d[_0x3c35f5(0x81)]};}export function buildRetargetWarning(_0x1be105,_0x5c9741){const _0x1ac79d=a81_0x13f9;if(!_0x1be105?.['appCode']||_0x1be105['appCode']===_0x5c9741)return[];return[{'level':'warning','ruleId':'skill-metadata-appcode-retargeted','file':'lovrabet.skill.json','message':_0x1ac79d(0x73)+_0x1be105[_0x1ac79d(0x77)]+_0x1ac79d(0x7d)+_0x5c9741+'\x20after\x20successful\x20push.','suggestion':_0x1ac79d(0x7b)}];}
|