@lovrabet/lovrabet-cli 2.3.10 → 2.3.11
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.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.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/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.js +1 -1
- 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 +3 -3
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +50 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4b1ad8,_0x233acc){const _0x248768=a68_0x48b0,_0x5a9fdc=_0x4b1ad8();while(!![]){try{const _0x492d11=parseInt(_0x248768(0x20b))/0x1+-parseInt(_0x248768(0x1c9))/0x2+parseInt(_0x248768(0x1db))/0x3*(-parseInt(_0x248768(0x210))/0x4)+-parseInt(_0x248768(0x1de))/0x5+-parseInt(_0x248768(0x202))/0x6+parseInt(_0x248768(0x20e))/0x7+parseInt(_0x248768(0x1f9))/0x8;if(_0x492d11===_0x233acc)break;else _0x5a9fdc['push'](_0x5a9fdc['shift']());}catch(_0x46e5b6){_0x5a9fdc['push'](_0x5a9fdc['shift']());}}}(a68_0x164b,0xc52f1));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';function a68_0x48b0(_0x39f33c,_0x36e16d){_0x39f33c=_0x39f33c-0x1c0;const _0x164b73=a68_0x164b();let _0x48b070=_0x164b73[_0x39f33c];return _0x48b070;}import{normalizeServiceTreeManifest,validateServiceTreeManifest}from'@lovrabet/cli-framework';import{PRODUCT_CONFIG}from'../../constant/product.js';import{CliErrors}from'../../errors.js';import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x18d6cc={}){const _0x54119=a68_0x48b0;return resolve(_0x18d6cc[_0x54119(0x1ca)]??homedir(),PRODUCT_CONFIG[_0x54119(0x1d2)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x39668b={}){const _0x2d3647=a68_0x48b0,_0x440557=getServiceRegistryPath(_0x39668b);if(!existsSync(_0x440557))return emptyServiceRegistry();try{const _0x1cbcbf=readFileSync(_0x440557,_0x2d3647(0x1f7));if(!_0x1cbcbf['trim']())return emptyServiceRegistry();const _0x182d6b=JSON['parse'](_0x1cbcbf);if(_0x182d6b[_0x2d3647(0x1e9)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x2d3647(0x1e8)](_0x2d3647(0x1f1)+String(_0x182d6b['schemaVersion']),_0x2d3647(0x200)+_0x440557+'.');if(!Array['isArray'](_0x182d6b[_0x2d3647(0x206)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x182d6b[_0x2d3647(0x1ed)],'services':_0x182d6b['services']};}catch(_0xb90328){if(_0xb90328 instanceof Error&&_0xb90328['name']==='CliError')throw _0xb90328;throw CliErrors[_0x2d3647(0x1e8)]('Invalid\x20service\x20registry\x20JSON:\x20'+_0x440557,_0x2d3647(0x204));}}export function writeServiceRegistry(_0x1059e3,_0x1b36d7={}){const _0x1c4c29=a68_0x48b0,_0x53e6f0=getServiceRegistryPath(_0x1b36d7),_0x260e86=dirname(_0x53e6f0);!existsSync(_0x260e86)&&mkdirSync(_0x260e86,{'recursive':!![]});const _0x25ec25=_0x53e6f0+_0x1c4c29(0x208);try{writeFileSync(_0x25ec25,JSON[_0x1c4c29(0x1c4)](_0x1059e3,null,0x2)+'\x0a',{'encoding':_0x1c4c29(0x1f7),'mode':0x180}),renameSync(_0x25ec25,_0x53e6f0);}catch(_0x326d48){try{unlinkSync(_0x25ec25);}catch{}if(_0x326d48?.[_0x1c4c29(0x1fe)]===_0x1c4c29(0x209))throw CliErrors['validation'](_0x1c4c29(0x1c7)+_0x53e6f0);throw _0x326d48;}return _0x53e6f0;}export function loadServiceManifestFromFile(_0x365fc3){const _0x229a76=a68_0x48b0,_0x467fdc=resolve(_0x365fc3);if(!existsSync(_0x467fdc))throw CliErrors[_0x229a76(0x1e8)](_0x229a76(0x1e2)+_0x365fc3);let _0x32d163;const _0x4492a8=readFileSync(_0x467fdc,_0x229a76(0x1f7));try{_0x32d163=JSON[_0x229a76(0x1e3)](_0x4492a8);}catch{throw CliErrors[_0x229a76(0x1e8)](_0x229a76(0x1ff)+_0x365fc3,_0x229a76(0x207));}const _0x43f00c=sha256(_0x4492a8),_0x161538=extractLoadedServiceManifests(_0x32d163,_0x43f00c),_0x6fe6f4=aggregateValidationReports(_0x161538),_0x42d5a3=_0x161538[0x0];return{'filePath':_0x467fdc,'hash':_0x43f00c,'kind':isServiceRegistryLike(_0x32d163)?_0x229a76(0x1c1):_0x229a76(0x1f3),'manifest':_0x42d5a3?.[_0x229a76(0x1f3)]??_0x32d163,'report':_0x6fe6f4,'normalizedManifest':_0x161538[_0x229a76(0x1fa)]===0x1?_0x42d5a3?.['normalizedManifest']:undefined,'manifests':_0x161538};}export function importServiceManifest(_0x6b86f9,_0x748dc={}){const _0x2905b4=a68_0x48b0,_0x53c2dd=loadServiceManifestFromFile(_0x6b86f9);if(!_0x53c2dd['report']['ok'])throw CliErrors[_0x2905b4(0x1e8)](formatValidationFailure(_0x53c2dd[_0x2905b4(0x1ee)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x53c2dd[_0x2905b4(0x1e4)][_0x2905b4(0x1fa)]===0x0)throw CliErrors[_0x2905b4(0x1e8)](_0x2905b4(0x20f),_0x2905b4(0x205));const _0x57599c=readServiceRegistry(_0x748dc),_0x40a3bf=(_0x748dc[_0x2905b4(0x201)]??(()=>new Date()))()[_0x2905b4(0x1f0)](),_0x1b8d2c=[];let _0x4c9ce5=0x0,_0x511e96=0x0;for(const _0x91b482 of _0x53c2dd['manifests']){if(!_0x91b482['normalizedManifest'])continue;const _0x150195=_0x91b482['normalizedManifest'][_0x2905b4(0x1fb)][_0x2905b4(0x1fe)],_0x4e59d8={'serviceCode':_0x150195,'version':_0x91b482['normalizedManifest'][_0x2905b4(0x1ea)],'importedAt':_0x40a3bf,'source':{'type':'file','path':_0x53c2dd[_0x2905b4(0x1f2)],'hash':_0x91b482[_0x2905b4(0x203)]},'manifest':_0x91b482['manifest'],'normalizedManifest':_0x91b482[_0x2905b4(0x1d8)]},_0x2bb54f=_0x57599c[_0x2905b4(0x206)]['findIndex'](_0x2893cc=>_0x2893cc[_0x2905b4(0x1f6)]===_0x150195);_0x2bb54f>=0x0?(_0x57599c[_0x2905b4(0x206)][_0x2bb54f]=_0x4e59d8,_0x511e96++):(_0x57599c[_0x2905b4(0x206)]['push'](_0x4e59d8),_0x4c9ce5++),_0x1b8d2c['push'](_0x4e59d8);}_0x57599c[_0x2905b4(0x206)][_0x2905b4(0x1d7)]((_0x3bf094,_0x91789)=>_0x3bf094[_0x2905b4(0x1f6)][_0x2905b4(0x1e5)](_0x91789[_0x2905b4(0x1f6)])),_0x57599c[_0x2905b4(0x1ed)]=_0x40a3bf;const _0x4ab1c3=writeServiceRegistry(_0x57599c,_0x748dc);return{'registryPath':_0x4ab1c3,'entry':_0x1b8d2c[0x0],'replaced':_0x1b8d2c[_0x2905b4(0x1fa)]===0x1?_0x511e96===0x1:_0x511e96>0x0,'entries':_0x1b8d2c,'imported':_0x4c9ce5,'updated':_0x511e96,'serviceCount':_0x57599c[_0x2905b4(0x206)][_0x2905b4(0x1fa)]};}export function exportServiceManifest(_0x50ca22,_0x4d2f3c,_0x5d6233={}){const _0x2a2d8f=a68_0x48b0,_0x3a38ae=getServiceRegistryPath(_0x5d6233),_0x515279=getLocalServiceEntry(_0x50ca22,_0x5d6233);if(!_0x515279)throw CliErrors[_0x2a2d8f(0x1e8)](_0x2a2d8f(0x1dc)+_0x50ca22,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const _0x328195=resolve(_0x4d2f3c),_0x246e51=dirname(_0x328195);return!existsSync(_0x246e51)&&mkdirSync(_0x246e51,{'recursive':!![]}),writeFileSync(_0x328195,JSON[_0x2a2d8f(0x1c4)](_0x515279[_0x2a2d8f(0x1f3)],null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),{'registryPath':_0x3a38ae,'filePath':_0x328195,'entry':_0x515279};}export function removeServiceManifest(_0x17d80a,_0xcce0c3={}){const _0x259aca=a68_0x48b0,_0x2cb89e=readServiceRegistry(_0xcce0c3),_0x294f70=_0x17d80a[_0x259aca(0x1e0)](),_0x22e66d=_0x2cb89e['services'][_0x259aca(0x1d5)](_0x51ca3d=>_0x51ca3d[_0x259aca(0x1f6)]===_0x294f70);if(_0x22e66d<0x0)throw CliErrors[_0x259aca(0x1e8)](_0x259aca(0x1dc)+_0x294f70,'Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.');const [_0x3be35e]=_0x2cb89e[_0x259aca(0x206)]['splice'](_0x22e66d,0x1),_0x4daeea=(_0xcce0c3[_0x259aca(0x201)]??(()=>new Date()))()[_0x259aca(0x1f0)]();_0x2cb89e[_0x259aca(0x1ed)]=_0x4daeea;const _0x292003=writeServiceRegistry(_0x2cb89e,_0xcce0c3);return{'registryPath':_0x292003,'entry':_0x3be35e,'serviceCount':_0x2cb89e[_0x259aca(0x206)]['length']};}function a68_0x164b(){const _0x222202=['stringify','flatMap','startsWith','Cannot\x20write\x20service\x20registry:\x20','empty','592280GLjSiN','homeDir','registryIndex','slice','kind','command','join','Service\x20manifest\x20validation\x20failed:\x0a','commandCount','homeDirName','$.services[','].manifest','findIndex','target','sort','normalizedManifest','services\x20must\x20be\x20an\x20array','path','3Njifll','Local\x20service\x20not\x20found:\x20','description','6453765AIFQGN','isArray','trim','invalid','Service\x20manifest\x20file\x20not\x20found:\x20','parse','manifests','localeCompare','cliPath','find','validation','schemaVersion','version','warnings','message','updatedAt','report','reduce','toISOString','Unsupported\x20service\x20registry\x20schemaVersion:\x20','filePath','manifest','digest','string','serviceCode','utf8','hex','17695776AsmCQC','length','service','Unsupported\x20schemaVersion:\x20','source','code','Invalid\x20service\x20manifest\x20JSON:\x20','Remove\x20or\x20migrate\x20','now','6004530QFdIeQ','sourceHash','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','services','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','.tmp','ENOENT','update','897719HLKeiH','object','bff\x20target\x20requires\x20functionName.','5116748FeEaCl','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','1781368uSYRXv','commands','registry','map','errors'];a68_0x164b=function(){return _0x222202;};return a68_0x164b();}export function listLocalServices(_0x2f1e18={}){const _0x5930bb=a68_0x48b0;return readServiceRegistry(_0x2f1e18)[_0x5930bb(0x206)];}export function getLocalServiceEntry(_0x51d293,_0xfa6262={}){const _0x1e0906=a68_0x48b0;return readServiceRegistry(_0xfa6262)[_0x1e0906(0x206)][_0x1e0906(0x1e7)](_0x17aced=>_0x17aced['serviceCode']===_0x51d293['trim']());}export function listLocalServiceTrees(_0x25f5e3={}){const _0x5f549d=a68_0x48b0;return readServiceRegistry(_0x25f5e3)[_0x5f549d(0x206)][_0x5f549d(0x1c2)](_0x54be4f=>_0x54be4f[_0x5f549d(0x1d8)]);}export function inspectServiceRegistry(_0x4312f7={}){const _0x4cee62=a68_0x48b0,_0x34ede6=getServiceRegistryPath(_0x4312f7);if(!existsSync(_0x34ede6))return emptyServiceRegistryInspection(_0x34ede6,'missing',![]);try{const _0x303123=readFileSync(_0x34ede6,'utf8');if(!_0x303123[_0x4cee62(0x1e0)]())return emptyServiceRegistryInspection(_0x34ede6,_0x4cee62(0x1c8),!![]);const _0x5bc7e9=JSON[_0x4cee62(0x1e3)](_0x303123);if(_0x5bc7e9['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x34ede6,'invalid',!![]),'schemaVersion':_0x5bc7e9[_0x4cee62(0x1e9)],'message':_0x4cee62(0x1fc)+String(_0x5bc7e9['schemaVersion'])};if(!Array[_0x4cee62(0x1df)](_0x5bc7e9['services']))return{...emptyServiceRegistryInspection(_0x34ede6,_0x4cee62(0x1e1),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5bc7e9[_0x4cee62(0x1ed)],'message':_0x4cee62(0x1d9)};const _0x304a4c=_0x5bc7e9['services']['map'](summarizeLocalServiceEntry);return{'registryPath':_0x34ede6,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x5bc7e9[_0x4cee62(0x1ed)],'serviceCount':_0x304a4c[_0x4cee62(0x1fa)],'commandCount':_0x304a4c[_0x4cee62(0x1ef)]((_0x54a981,_0x5d6dee)=>_0x54a981+_0x5d6dee[_0x4cee62(0x1d1)],0x0),'services':_0x304a4c};}catch(_0x324127){return{...emptyServiceRegistryInspection(_0x34ede6,_0x4cee62(0x1e1),!![]),'message':_0x324127 instanceof Error?_0x324127[_0x4cee62(0x1ec)]:String(_0x324127)};}}export function formatValidationFailure(_0x4778f8){const _0x2bfc95=a68_0x48b0,_0x595e24=_0x4778f8[_0x2bfc95(0x1c3)][_0x2bfc95(0x1c2)](_0x387e99=>_0x387e99['path']+':\x20'+_0x387e99['message']);return _0x2bfc95(0x1d0)+_0x595e24[_0x2bfc95(0x1cf)]('\x0a');}function extractLoadedServiceManifests(_0x4409e2,_0x49f997){const _0x47b715=a68_0x48b0;if(!isServiceRegistryLike(_0x4409e2)){const _0x52c16f=_0x4409e2,{manifest:_0x3c9f40,errors:_0x386cd6}=adaptServiceTreeManifestForLegacyFramework(_0x52c16f),_0x6c0f29=validateServiceTreeManifest(_0x3c9f40),_0x41eae7=mergeValidationErrors(_0x6c0f29,_0x386cd6);return[{'manifest':_0x52c16f,'report':_0x41eae7,'normalizedManifest':_0x41eae7['ok']?normalizeServiceTreeManifest(_0x3c9f40):undefined,'sourceHash':_0x49f997}];}return _0x4409e2[_0x47b715(0x206)]['map']((_0x3a7f04,_0x34cc64)=>{const _0x383f46=_0x47b715,_0x1c814f=isObjectRecord(_0x3a7f04)?_0x3a7f04[_0x383f46(0x1f3)]:undefined,{manifest:_0x52a03f,errors:_0x4311ae}=adaptServiceTreeManifestForLegacyFramework(_0x1c814f),_0x2e4319=validateServiceTreeManifest(_0x52a03f),_0x1efef4=mergeValidationErrors(_0x2e4319,_0x4311ae),_0x15f474=isObjectRecord(_0x3a7f04)&&typeof _0x3a7f04[_0x383f46(0x1f6)]===_0x383f46(0x1f5)?_0x3a7f04[_0x383f46(0x1f6)]:undefined;return{'manifest':_0x1c814f,'report':_0x1efef4,'normalizedManifest':_0x1efef4['ok']?normalizeServiceTreeManifest(_0x52a03f):undefined,'sourceHash':sha256(JSON[_0x383f46(0x1c4)](_0x1c814f,null,0x2)+'\x0a'),'registryIndex':_0x34cc64,'registryServiceCode':_0x15f474};});}function mergeValidationErrors(_0x228fb4,_0x17a7c6){const _0x4ebf78=a68_0x48b0,_0x2aadde=_0x228fb4[_0x4ebf78(0x1c3)]['map'](_0x20b1ae=>_0x20b1ae[_0x4ebf78(0x1ec)]==='bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.'?{..._0x20b1ae,'message':_0x4ebf78(0x20d)}:_0x20b1ae),_0x278574=[..._0x17a7c6,..._0x2aadde];return{'ok':_0x278574[_0x4ebf78(0x1fa)]===0x0,'errors':_0x278574,'warnings':_0x228fb4[_0x4ebf78(0x1eb)]};}function aggregateValidationReports(_0x4a9fe6){const _0x67614a=a68_0x48b0,_0x3c81ce=_0x4a9fe6[_0x67614a(0x1c5)](_0x896561=>_0x896561[_0x67614a(0x1cb)]===undefined?_0x896561[_0x67614a(0x1ee)][_0x67614a(0x1c3)]:_0x896561['report'][_0x67614a(0x1c3)][_0x67614a(0x1c2)](_0x30aa51=>({..._0x30aa51,'path':prefixRegistryIssuePath(_0x896561[_0x67614a(0x1cb)],_0x30aa51['path'])}))),_0x2a6ddf=_0x4a9fe6[_0x67614a(0x1c5)](_0x4c75e7=>_0x4c75e7['registryIndex']===undefined?_0x4c75e7[_0x67614a(0x1ee)]['warnings']:_0x4c75e7[_0x67614a(0x1ee)]['warnings']['map'](_0x519940=>({..._0x519940,'path':prefixRegistryIssuePath(_0x4c75e7[_0x67614a(0x1cb)],_0x519940[_0x67614a(0x1da)])})));return{'ok':_0x3c81ce[_0x67614a(0x1fa)]===0x0,'errors':_0x3c81ce,'warnings':_0x2a6ddf};}function prefixRegistryIssuePath(_0x1da37a,_0xedbfd2){const _0x77058e=a68_0x48b0;if(_0xedbfd2==='$')return _0x77058e(0x1d3)+_0x1da37a+_0x77058e(0x1d4);if(_0xedbfd2[_0x77058e(0x1c6)]('$.'))return _0x77058e(0x1d3)+_0x1da37a+'].manifest'+_0xedbfd2[_0x77058e(0x1cc)](0x1);if(_0xedbfd2[_0x77058e(0x1c6)]('$['))return _0x77058e(0x1d3)+_0x1da37a+_0x77058e(0x1d4)+_0xedbfd2[_0x77058e(0x1cc)](0x1);return _0x77058e(0x1d3)+_0x1da37a+'].manifest.'+_0xedbfd2;}function isServiceRegistryLike(_0x5d8a0c){const _0x19a6d5=a68_0x48b0;return isObjectRecord(_0x5d8a0c)&&_0x5d8a0c['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x5d8a0c[_0x19a6d5(0x206)]);}function isObjectRecord(_0x163b4e){const _0x5ec812=a68_0x48b0;return Boolean(_0x163b4e)&&typeof _0x163b4e===_0x5ec812(0x20c)&&!Array['isArray'](_0x163b4e);}function emptyServiceRegistryInspection(_0x42f98d,_0x403276,_0x31d6d7){return{'registryPath':_0x42f98d,'exists':_0x31d6d7,'status':_0x403276,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1957b3){const _0x5045fb=a68_0x48b0,_0x4d4504=_0x1957b3['normalizedManifest'],_0x2f006a=_0x4d4504[_0x5045fb(0x1c0)][_0x5045fb(0x1c2)](_0x1d57a1=>({'path':_0x1d57a1[_0x5045fb(0x1e6)],'description':_0x1d57a1['description'],'risk':_0x1d57a1['risk'],'targetKind':_0x1d57a1[_0x5045fb(0x1d6)][_0x5045fb(0x1cd)],'targetCommand':_0x1d57a1['target'][_0x5045fb(0x1ce)]}));return{'serviceCode':_0x1957b3[_0x5045fb(0x1f6)],'name':_0x4d4504[_0x5045fb(0x1fb)]['name'],'description':_0x4d4504[_0x5045fb(0x1fb)][_0x5045fb(0x1dd)],'version':_0x1957b3[_0x5045fb(0x1ea)],'importedAt':_0x1957b3['importedAt'],'source':_0x1957b3[_0x5045fb(0x1fd)],'commandCount':_0x2f006a['length'],'commands':_0x2f006a};}function sha256(_0xabc42c){const _0xa71222=a68_0x48b0;return createHash('sha256')[_0xa71222(0x20a)](_0xabc42c)[_0xa71222(0x1f4)](_0xa71222(0x1f8));}
|
|
1
|
+
const a68_0x975965=a68_0x2154;(function(_0x2d5e56,_0x21a752){const _0x5ba33d=a68_0x2154,_0x40f1cf=_0x2d5e56();while(!![]){try{const _0x1025e3=parseInt(_0x5ba33d(0x1b9))/0x1+parseInt(_0x5ba33d(0x1da))/0x2+-parseInt(_0x5ba33d(0x1e6))/0x3*(parseInt(_0x5ba33d(0x1a2))/0x4)+-parseInt(_0x5ba33d(0x1b1))/0x5+-parseInt(_0x5ba33d(0x1ce))/0x6+parseInt(_0x5ba33d(0x1df))/0x7*(-parseInt(_0x5ba33d(0x1b7))/0x8)+parseInt(_0x5ba33d(0x1bc))/0x9;if(_0x1025e3===_0x21a752)break;else _0x40f1cf['push'](_0x40f1cf['shift']());}catch(_0x2f9ab0){_0x40f1cf['push'](_0x40f1cf['shift']());}}}(a68_0x184c,0xa1509));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';function a68_0x184c(){const _0x146809=['registryIndex','now','utf8','ENOENT','1398030rfxDfX','startsWith','warnings','flatMap','Local\x20service\x20not\x20found:\x20','63lkVMYR','filePath','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','Remove\x20or\x20migrate\x20','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','homeDir','join','21WqdCVc','find','validation','reduce','source','Invalid\x20service\x20registry\x20JSON:\x20','report','Service\x20manifest\x20validation\x20failed:\x0a','object','stringify','service.json','localeCompare','missing','name','411556qZzLjb','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','push','string','updatedAt','findIndex','homeDirName','slice','.tmp','bff\x20target\x20requires\x20bffCode,\x20bffId,\x20or\x20scriptName.','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','version','message','errors','command','2694705RbpBFb','digest','code','Service\x20manifest\x20file\x20not\x20found:\x20','target','commandCount','931096LsBMfg','bff\x20target\x20requires\x20functionName.','184916BdeDeh','parse','services\x20must\x20be\x20an\x20array','22691124KTytWd','manifest','isArray','serviceCode','].manifest.','Unsupported\x20schemaVersion:\x20','splice','path','$.services[','Invalid\x20service\x20manifest\x20JSON:\x20','].manifest','importedAt','services','map','hex','normalizedManifest','length','sourceHash','2626650EQfqUo','description','toISOString','empty','service','schemaVersion','invalid','trim'];a68_0x184c=function(){return _0x146809;};return a68_0x184c();}import{adaptServiceTreeManifestForLegacyFramework}from'../../commands/service/function-name-adapter.js';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a68_0x975965(0x1f0);export function getServiceRegistryPath(_0x322625={}){const _0x4cff22=a68_0x975965;return resolve(_0x322625[_0x4cff22(0x1e4)]??homedir(),PRODUCT_CONFIG[_0x4cff22(0x1a8)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x3ec916={}){const _0x1b8513=a68_0x975965,_0x26ac93=getServiceRegistryPath(_0x3ec916);if(!existsSync(_0x26ac93))return emptyServiceRegistry();try{const _0x170deb=readFileSync(_0x26ac93,_0x1b8513(0x1d8));if(!_0x170deb[_0x1b8513(0x1d5)]())return emptyServiceRegistry();const _0x46d840=JSON[_0x1b8513(0x1ba)](_0x170deb);if(_0x46d840['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x1b8513(0x1e8)]('Unsupported\x20service\x20registry\x20schemaVersion:\x20'+String(_0x46d840[_0x1b8513(0x1d3)]),_0x1b8513(0x1e2)+_0x26ac93+'.');if(!Array[_0x1b8513(0x1be)](_0x46d840['services']))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x46d840['updatedAt'],'services':_0x46d840[_0x1b8513(0x1c8)]};}catch(_0x3541c6){if(_0x3541c6 instanceof Error&&_0x3541c6[_0x1b8513(0x1a1)]==='CliError')throw _0x3541c6;throw CliErrors[_0x1b8513(0x1e8)](_0x1b8513(0x1eb)+_0x26ac93,'Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.');}}export function writeServiceRegistry(_0x1e0ee3,_0x3406dd={}){const _0x5b04d7=a68_0x975965,_0x5d59e9=getServiceRegistryPath(_0x3406dd),_0x4124bd=dirname(_0x5d59e9);!existsSync(_0x4124bd)&&mkdirSync(_0x4124bd,{'recursive':!![]});const _0x14353b=_0x5d59e9+_0x5b04d7(0x1aa);try{writeFileSync(_0x14353b,JSON[_0x5b04d7(0x1ef)](_0x1e0ee3,null,0x2)+'\x0a',{'encoding':_0x5b04d7(0x1d8),'mode':0x180}),renameSync(_0x14353b,_0x5d59e9);}catch(_0xe440e7){try{unlinkSync(_0x14353b);}catch{}if(_0xe440e7?.['code']===_0x5b04d7(0x1d9))throw CliErrors[_0x5b04d7(0x1e8)]('Cannot\x20write\x20service\x20registry:\x20'+_0x5d59e9);throw _0xe440e7;}return _0x5d59e9;}export function loadServiceManifestFromFile(_0x24aa6b){const _0x38f971=a68_0x975965,_0x428ee4=resolve(_0x24aa6b);if(!existsSync(_0x428ee4))throw CliErrors[_0x38f971(0x1e8)](_0x38f971(0x1b4)+_0x24aa6b);let _0x236c72;const _0x286dbe=readFileSync(_0x428ee4,_0x38f971(0x1d8));try{_0x236c72=JSON[_0x38f971(0x1ba)](_0x286dbe);}catch{throw CliErrors['validation'](_0x38f971(0x1c5)+_0x24aa6b,_0x38f971(0x1a3));}const _0x1f6060=sha256(_0x286dbe),_0x6126dc=extractLoadedServiceManifests(_0x236c72,_0x1f6060),_0x40b15b=aggregateValidationReports(_0x6126dc),_0x20fe28=_0x6126dc[0x0];return{'filePath':_0x428ee4,'hash':_0x1f6060,'kind':isServiceRegistryLike(_0x236c72)?'registry':_0x38f971(0x1bd),'manifest':_0x20fe28?.[_0x38f971(0x1bd)]??_0x236c72,'report':_0x40b15b,'normalizedManifest':_0x6126dc[_0x38f971(0x1cc)]===0x1?_0x20fe28?.[_0x38f971(0x1cb)]:undefined,'manifests':_0x6126dc};}export function importServiceManifest(_0x56d151,_0x2cf253={}){const _0x59682f=a68_0x975965,_0x208f9b=loadServiceManifestFromFile(_0x56d151);if(!_0x208f9b[_0x59682f(0x1ec)]['ok'])throw CliErrors[_0x59682f(0x1e8)](formatValidationFailure(_0x208f9b[_0x59682f(0x1ec)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x208f9b['manifests'][_0x59682f(0x1cc)]===0x0)throw CliErrors[_0x59682f(0x1e8)](_0x59682f(0x1ac),_0x59682f(0x1e3));const _0x14cdf3=readServiceRegistry(_0x2cf253),_0x28a5a8=(_0x2cf253['now']??(()=>new Date()))()[_0x59682f(0x1d0)](),_0x3a8eca=[];let _0x429904=0x0,_0x1202e6=0x0;for(const _0x43ab1d of _0x208f9b['manifests']){if(!_0x43ab1d[_0x59682f(0x1cb)])continue;const _0x5dd78b=_0x43ab1d['normalizedManifest'][_0x59682f(0x1d2)][_0x59682f(0x1b3)],_0x2e3f26={'serviceCode':_0x5dd78b,'version':_0x43ab1d[_0x59682f(0x1cb)][_0x59682f(0x1ad)],'importedAt':_0x28a5a8,'source':{'type':'file','path':_0x208f9b[_0x59682f(0x1e0)],'hash':_0x43ab1d[_0x59682f(0x1cd)]},'manifest':_0x43ab1d[_0x59682f(0x1bd)],'normalizedManifest':_0x43ab1d[_0x59682f(0x1cb)]},_0x52c41c=_0x14cdf3[_0x59682f(0x1c8)][_0x59682f(0x1a7)](_0x3e20ba=>_0x3e20ba[_0x59682f(0x1bf)]===_0x5dd78b);_0x52c41c>=0x0?(_0x14cdf3[_0x59682f(0x1c8)][_0x52c41c]=_0x2e3f26,_0x1202e6++):(_0x14cdf3['services'][_0x59682f(0x1a4)](_0x2e3f26),_0x429904++),_0x3a8eca[_0x59682f(0x1a4)](_0x2e3f26);}_0x14cdf3[_0x59682f(0x1c8)]['sort']((_0x144f67,_0x532538)=>_0x144f67[_0x59682f(0x1bf)][_0x59682f(0x1f1)](_0x532538['serviceCode'])),_0x14cdf3[_0x59682f(0x1a6)]=_0x28a5a8;const _0x258d02=writeServiceRegistry(_0x14cdf3,_0x2cf253);return{'registryPath':_0x258d02,'entry':_0x3a8eca[0x0],'replaced':_0x3a8eca[_0x59682f(0x1cc)]===0x1?_0x1202e6===0x1:_0x1202e6>0x0,'entries':_0x3a8eca,'imported':_0x429904,'updated':_0x1202e6,'serviceCount':_0x14cdf3[_0x59682f(0x1c8)][_0x59682f(0x1cc)]};}function a68_0x2154(_0x2f2579,_0x36363b){_0x2f2579=_0x2f2579-0x1a1;const _0x184c34=a68_0x184c();let _0x2154bf=_0x184c34[_0x2f2579];return _0x2154bf;}export function exportServiceManifest(_0x405605,_0x4a5dd1,_0x4014cf={}){const _0x87b30d=a68_0x975965,_0x36f105=getServiceRegistryPath(_0x4014cf),_0x2de32c=getLocalServiceEntry(_0x405605,_0x4014cf);if(!_0x2de32c)throw CliErrors[_0x87b30d(0x1e8)]('Local\x20service\x20not\x20found:\x20'+_0x405605,_0x87b30d(0x1e1));const _0x50596a=resolve(_0x4a5dd1),_0x335834=dirname(_0x50596a);return!existsSync(_0x335834)&&mkdirSync(_0x335834,{'recursive':!![]}),writeFileSync(_0x50596a,JSON['stringify'](_0x2de32c[_0x87b30d(0x1bd)],null,0x2)+'\x0a',{'encoding':_0x87b30d(0x1d8),'mode':0x180}),{'registryPath':_0x36f105,'filePath':_0x50596a,'entry':_0x2de32c};}export function removeServiceManifest(_0x1edd89,_0x57d1a7={}){const _0x3d74b0=a68_0x975965,_0x486096=readServiceRegistry(_0x57d1a7),_0x32b95b=_0x1edd89[_0x3d74b0(0x1d5)](),_0x41befb=_0x486096[_0x3d74b0(0x1c8)][_0x3d74b0(0x1a7)](_0x2d8a5a=>_0x2d8a5a[_0x3d74b0(0x1bf)]===_0x32b95b);if(_0x41befb<0x0)throw CliErrors[_0x3d74b0(0x1e8)](_0x3d74b0(0x1de)+_0x32b95b,_0x3d74b0(0x1e1));const [_0x978588]=_0x486096[_0x3d74b0(0x1c8)][_0x3d74b0(0x1c2)](_0x41befb,0x1),_0x5f13d4=(_0x57d1a7[_0x3d74b0(0x1d7)]??(()=>new Date()))()[_0x3d74b0(0x1d0)]();_0x486096[_0x3d74b0(0x1a6)]=_0x5f13d4;const _0x46e5c4=writeServiceRegistry(_0x486096,_0x57d1a7);return{'registryPath':_0x46e5c4,'entry':_0x978588,'serviceCount':_0x486096[_0x3d74b0(0x1c8)][_0x3d74b0(0x1cc)]};}export function listLocalServices(_0x37f4b0={}){const _0x1ab823=a68_0x975965;return readServiceRegistry(_0x37f4b0)[_0x1ab823(0x1c8)];}export function getLocalServiceEntry(_0x6e1075,_0x545891={}){const _0x50bfd7=a68_0x975965;return readServiceRegistry(_0x545891)['services'][_0x50bfd7(0x1e7)](_0x432843=>_0x432843[_0x50bfd7(0x1bf)]===_0x6e1075[_0x50bfd7(0x1d5)]());}export function listLocalServiceTrees(_0x15a3f0={}){const _0x3eac39=a68_0x975965;return readServiceRegistry(_0x15a3f0)[_0x3eac39(0x1c8)][_0x3eac39(0x1c9)](_0x4c0233=>_0x4c0233['normalizedManifest']);}export function inspectServiceRegistry(_0x3ea7b6={}){const _0xbb9e94=a68_0x975965,_0x265131=getServiceRegistryPath(_0x3ea7b6);if(!existsSync(_0x265131))return emptyServiceRegistryInspection(_0x265131,_0xbb9e94(0x1f2),![]);try{const _0x403b3d=readFileSync(_0x265131,_0xbb9e94(0x1d8));if(!_0x403b3d[_0xbb9e94(0x1d5)]())return emptyServiceRegistryInspection(_0x265131,_0xbb9e94(0x1d1),!![]);const _0x3833d9=JSON['parse'](_0x403b3d);if(_0x3833d9[_0xbb9e94(0x1d3)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x265131,_0xbb9e94(0x1d4),!![]),'schemaVersion':_0x3833d9[_0xbb9e94(0x1d3)],'message':_0xbb9e94(0x1c1)+String(_0x3833d9[_0xbb9e94(0x1d3)])};if(!Array[_0xbb9e94(0x1be)](_0x3833d9['services']))return{...emptyServiceRegistryInspection(_0x265131,_0xbb9e94(0x1d4),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3833d9[_0xbb9e94(0x1a6)],'message':_0xbb9e94(0x1bb)};const _0x291f1d=_0x3833d9[_0xbb9e94(0x1c8)]['map'](summarizeLocalServiceEntry);return{'registryPath':_0x265131,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x3833d9[_0xbb9e94(0x1a6)],'serviceCount':_0x291f1d[_0xbb9e94(0x1cc)],'commandCount':_0x291f1d[_0xbb9e94(0x1e9)]((_0x1bb709,_0x183bcf)=>_0x1bb709+_0x183bcf[_0xbb9e94(0x1b6)],0x0),'services':_0x291f1d};}catch(_0x363572){return{...emptyServiceRegistryInspection(_0x265131,_0xbb9e94(0x1d4),!![]),'message':_0x363572 instanceof Error?_0x363572['message']:String(_0x363572)};}}export function formatValidationFailure(_0x219a9c){const _0x4faae3=a68_0x975965,_0x20058e=_0x219a9c[_0x4faae3(0x1af)][_0x4faae3(0x1c9)](_0xa01df0=>_0xa01df0['path']+':\x20'+_0xa01df0['message']);return _0x4faae3(0x1ed)+_0x20058e[_0x4faae3(0x1e5)]('\x0a');}function extractLoadedServiceManifests(_0x389961,_0x425b83){const _0x42174b=a68_0x975965;if(!isServiceRegistryLike(_0x389961)){const _0x2ef475=_0x389961,{manifest:_0x5c2442,errors:_0x26c1dc}=adaptServiceTreeManifestForLegacyFramework(_0x2ef475),_0x59e109=validateServiceTreeManifest(_0x5c2442),_0x5eb85e=mergeValidationErrors(_0x59e109,_0x26c1dc);return[{'manifest':_0x2ef475,'report':_0x5eb85e,'normalizedManifest':_0x5eb85e['ok']?normalizeServiceTreeManifest(_0x5c2442):undefined,'sourceHash':_0x425b83}];}return _0x389961[_0x42174b(0x1c8)][_0x42174b(0x1c9)]((_0x265d33,_0x48ce24)=>{const _0x11595d=_0x42174b,_0x44c6c4=isObjectRecord(_0x265d33)?_0x265d33[_0x11595d(0x1bd)]:undefined,{manifest:_0x52cbb9,errors:_0x262916}=adaptServiceTreeManifestForLegacyFramework(_0x44c6c4),_0x52b357=validateServiceTreeManifest(_0x52cbb9),_0x2135cd=mergeValidationErrors(_0x52b357,_0x262916),_0x1cc313=isObjectRecord(_0x265d33)&&typeof _0x265d33[_0x11595d(0x1bf)]===_0x11595d(0x1a5)?_0x265d33[_0x11595d(0x1bf)]:undefined;return{'manifest':_0x44c6c4,'report':_0x2135cd,'normalizedManifest':_0x2135cd['ok']?normalizeServiceTreeManifest(_0x52cbb9):undefined,'sourceHash':sha256(JSON[_0x11595d(0x1ef)](_0x44c6c4,null,0x2)+'\x0a'),'registryIndex':_0x48ce24,'registryServiceCode':_0x1cc313};});}function mergeValidationErrors(_0x214922,_0x357de6){const _0x4eaa25=a68_0x975965,_0x16b232=_0x214922[_0x4eaa25(0x1af)][_0x4eaa25(0x1c9)](_0x46fe6d=>_0x46fe6d[_0x4eaa25(0x1ae)]===_0x4eaa25(0x1ab)?{..._0x46fe6d,'message':_0x4eaa25(0x1b8)}:_0x46fe6d),_0x1c4f84=[..._0x357de6,..._0x16b232];return{'ok':_0x1c4f84[_0x4eaa25(0x1cc)]===0x0,'errors':_0x1c4f84,'warnings':_0x214922[_0x4eaa25(0x1dc)]};}function aggregateValidationReports(_0x4d31ad){const _0x79994f=a68_0x975965,_0x661a86=_0x4d31ad[_0x79994f(0x1dd)](_0x2a392d=>_0x2a392d[_0x79994f(0x1d6)]===undefined?_0x2a392d[_0x79994f(0x1ec)]['errors']:_0x2a392d['report'][_0x79994f(0x1af)][_0x79994f(0x1c9)](_0x21739c=>({..._0x21739c,'path':prefixRegistryIssuePath(_0x2a392d[_0x79994f(0x1d6)],_0x21739c['path'])}))),_0xd98403=_0x4d31ad[_0x79994f(0x1dd)](_0x1f80c4=>_0x1f80c4[_0x79994f(0x1d6)]===undefined?_0x1f80c4['report'][_0x79994f(0x1dc)]:_0x1f80c4[_0x79994f(0x1ec)][_0x79994f(0x1dc)][_0x79994f(0x1c9)](_0x3ced24=>({..._0x3ced24,'path':prefixRegistryIssuePath(_0x1f80c4[_0x79994f(0x1d6)],_0x3ced24[_0x79994f(0x1c3)])})));return{'ok':_0x661a86['length']===0x0,'errors':_0x661a86,'warnings':_0xd98403};}function prefixRegistryIssuePath(_0x34b3bc,_0x21f3f5){const _0xcb36db=a68_0x975965;if(_0x21f3f5==='$')return _0xcb36db(0x1c4)+_0x34b3bc+_0xcb36db(0x1c6);if(_0x21f3f5[_0xcb36db(0x1db)]('$.'))return _0xcb36db(0x1c4)+_0x34b3bc+'].manifest'+_0x21f3f5['slice'](0x1);if(_0x21f3f5['startsWith']('$['))return _0xcb36db(0x1c4)+_0x34b3bc+_0xcb36db(0x1c6)+_0x21f3f5[_0xcb36db(0x1a9)](0x1);return _0xcb36db(0x1c4)+_0x34b3bc+_0xcb36db(0x1c0)+_0x21f3f5;}function isServiceRegistryLike(_0x9d5835){const _0x522d40=a68_0x975965;return isObjectRecord(_0x9d5835)&&_0x9d5835[_0x522d40(0x1d3)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x522d40(0x1be)](_0x9d5835[_0x522d40(0x1c8)]);}function isObjectRecord(_0x429a70){const _0x22f527=a68_0x975965;return Boolean(_0x429a70)&&typeof _0x429a70===_0x22f527(0x1ee)&&!Array['isArray'](_0x429a70);}function emptyServiceRegistryInspection(_0x95fd8c,_0x2fd6b9,_0x1682ac){return{'registryPath':_0x95fd8c,'exists':_0x1682ac,'status':_0x2fd6b9,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x38e351){const _0x44cc4c=a68_0x975965,_0x178196=_0x38e351['normalizedManifest'],_0x301958=_0x178196['commands'][_0x44cc4c(0x1c9)](_0x5a7bec=>({'path':_0x5a7bec['cliPath'],'description':_0x5a7bec[_0x44cc4c(0x1cf)],'risk':_0x5a7bec['risk'],'targetKind':_0x5a7bec[_0x44cc4c(0x1b5)]['kind'],'targetCommand':_0x5a7bec['target'][_0x44cc4c(0x1b0)]}));return{'serviceCode':_0x38e351[_0x44cc4c(0x1bf)],'name':_0x178196[_0x44cc4c(0x1d2)][_0x44cc4c(0x1a1)],'description':_0x178196['service'][_0x44cc4c(0x1cf)],'version':_0x38e351[_0x44cc4c(0x1ad)],'importedAt':_0x38e351[_0x44cc4c(0x1c7)],'source':_0x38e351[_0x44cc4c(0x1ea)],'commandCount':_0x301958['length'],'commands':_0x301958};}function sha256(_0x3b5e3c){const _0x4aae14=a68_0x975965;return createHash('sha256')['update'](_0x3b5e3c)[_0x4aae14(0x1b2)](_0x4aae14(0x1ca));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x1dd5e4=a69_0x7159;(function(_0x2cb225,_0x332883){const _0x546d35=a69_0x7159,_0xcfed41=_0x2cb225();while(!![]){try{const _0x56f8ee=parseInt(_0x546d35(0x8f))/0x1+-parseInt(_0x546d35(0x89))/0x2+-parseInt(_0x546d35(0x97))/0x3+parseInt(_0x546d35(0x75))/0x4+parseInt(_0x546d35(0x90))/0x5+-parseInt(_0x546d35(0x83))/0x6*(-parseInt(_0x546d35(0x8b))/0x7)+parseInt(_0x546d35(0x7b))/0x8;if(_0x56f8ee===_0x332883)break;else _0xcfed41['push'](_0xcfed41['shift']());}catch(_0xa4ba12){_0xcfed41['push'](_0xcfed41['shift']());}}}(a69_0x20e5,0xc99bd));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';export const createCommand={'service':a69_0x1dd5e4(0x88),'command':a69_0x1dd5e4(0x93),'description':a69_0x1dd5e4(0x84),'risk':a69_0x1dd5e4(0x91),'requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0xcec918){const _0x3d32db=a69_0x1dd5e4,_0xb31f43=buildSkillCreatePlan(_0xcec918[_0x3d32db(0x8a)](_0x3d32db(0x8e)),_0xcec918['str'](_0x3d32db(0x82)),_0xcec918['str']('target'));return{'method':_0x3d32db(0x8d),'url':_0xb31f43[_0x3d32db(0x86)],'body':{'skillName':_0xb31f43[_0x3d32db(0x95)]['skillName'],'type':_0xb31f43[_0x3d32db(0x95)][_0x3d32db(0x82)],'selfContained':!![],'files':_0xb31f43[_0x3d32db(0x95)][_0x3d32db(0x76)][_0x3d32db(0x80)](_0x1d7abd=>_0x1d7abd[_0x3d32db(0x92)])},'description':_0x3d32db(0x85)};},async 'execute'(_0x55c99b){const _0x51e48d=a69_0x1dd5e4,_0x3246e2=buildSkillCreatePlan(_0x55c99b[_0x51e48d(0x8a)](_0x51e48d(0x8e)),_0x55c99b[_0x51e48d(0x8a)](_0x51e48d(0x82)),_0x55c99b[_0x51e48d(0x8a)](_0x51e48d(0x96)));return writeSkillDraft(_0x3246e2,_0x55c99b[_0x51e48d(0x7c)](_0x51e48d(0x77))),{'ok':!![],'data':{'skillName':_0x3246e2[_0x51e48d(0x95)][_0x51e48d(0x79)],'type':_0x3246e2[_0x51e48d(0x95)][_0x51e48d(0x82)],'dir':_0x3246e2[_0x51e48d(0x86)],'files':_0x3246e2[_0x51e48d(0x95)][_0x51e48d(0x76)][_0x51e48d(0x80)](_0x307e6b=>_0x307e6b[_0x51e48d(0x92)])},'message':_0x51e48d(0x87)+_0x3246e2[_0x51e48d(0x95)][_0x51e48d(0x79)]};}};function a69_0x20e5(){const _0x2d9767=['336NlmtfH','content','WRITE','name','1036148RzTOcO','4076110ceyGWQ','read','path','create','Omitting\x20--type\x20is\x20deprecated;\x20defaulting\x20to\x20write\x20for\x20compatibility.\x20Pass\x20--type\x20read\x20or\x20--type\x20write\x20explicitly.','rendered','target','4702050HRHgEL','trim','4003772YLjdTH','files','force','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','skillName','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','6476624iPkatq','bool','Refusing\x20to\x20overwrite\x20symlink:\x20','isDirectory','isSymbolicLink','map','validation','type','27672eGvFpd','Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','skillDir','Created\x20local\x20Skill\x20draft\x20','skill','2980256GacQWe','str'];a69_0x20e5=function(){return _0x2d9767;};return a69_0x20e5();}function a69_0x7159(_0x8265e7,_0x4e1152){_0x8265e7=_0x8265e7-0x75;const _0x20e581=a69_0x20e5();let _0x71590b=_0x20e581[_0x8265e7];return _0x71590b;}function buildSkillCreatePlan(_0x2e7531,_0x2c7d2f,_0x8116a1){const _0x2f32b8=a69_0x1dd5e4,_0xd8fa7f=_0x2c7d2f['trim'](),_0x4ee046=renderSkillTemplate({'skillName':_0x2e7531,'type':_0xd8fa7f});!_0xd8fa7f&&writeCliSideChannelLine(_0x2f32b8(0x94));const _0x287da0=resolve(normalizeSkillTarget(_0x8116a1));return{'rendered':_0x4ee046,'targetRoot':_0x287da0,'skillDir':resolve(_0x287da0,_0x4ee046['skillName'])};}function normalizeSkillTarget(_0x1ec848){const _0xcc8c31=a69_0x1dd5e4;return(_0x1ec848||DEFAULT_SKILL_TARGET)[_0xcc8c31(0x98)]()||DEFAULT_SKILL_TARGET;}function writeSkillDraft(_0xcb6581,_0x424781){const _0x43a5ed=a69_0x1dd5e4;if(existsSync(_0xcb6581['skillDir'])){const _0x1c48c3=lstatSync(_0xcb6581[_0x43a5ed(0x86)]);if(!_0x1c48c3[_0x43a5ed(0x7e)]()||_0x1c48c3['isSymbolicLink']())throw CliErrors['validation'](_0x43a5ed(0x7a)+_0xcb6581[_0x43a5ed(0x86)]);if(!_0x424781)throw CliErrors['validation']('Skill\x20directory\x20already\x20exists:\x20'+_0xcb6581[_0x43a5ed(0x86)],_0x43a5ed(0x78));}for(const _0x41f116 of _0xcb6581[_0x43a5ed(0x95)][_0x43a5ed(0x76)]){const _0x5d3fa5=resolve(_0xcb6581[_0x43a5ed(0x86)],_0x41f116[_0x43a5ed(0x92)]),_0x310d6a=dirname(_0x5d3fa5);mkdirSync(_0x310d6a,{'recursive':!![]});if(existsSync(_0x5d3fa5)&&lstatSync(_0x5d3fa5)[_0x43a5ed(0x7f)]())throw CliErrors[_0x43a5ed(0x81)](_0x43a5ed(0x7d)+_0x5d3fa5);writeFileSync(_0x5d3fa5,_0x41f116[_0x43a5ed(0x8c)],'utf8');}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x575e3f=a70_0x3f94;(function(_0x566993,_0x1f7bb3){const _0x9598de=a70_0x3f94,_0x85dad7=_0x566993();while(!![]){try{const _0x4937e9=parseInt(_0x9598de(0x1d6))/0x1*(parseInt(_0x9598de(0x1e4))/0x2)+-parseInt(_0x9598de(0x1d3))/0x3*(-parseInt(_0x9598de(0x1d0))/0x4)+-parseInt(_0x9598de(0x1ca))/0x5+parseInt(_0x9598de(0x1e0))/0x6*(-parseInt(_0x9598de(0x1e6))/0x7)+parseInt(_0x9598de(0x1ee))/0x8+parseInt(_0x9598de(0x1f7))/0x9*(-parseInt(_0x9598de(0x1de))/0xa)+-parseInt(_0x9598de(0x1d4))/0xb;if(_0x4937e9===_0x1f7bb3)break;else _0x85dad7['push'](_0x85dad7['shift']());}catch(_0x31c816){_0x85dad7['push'](_0x85dad7['shift']());}}}(a70_0x2c50,0x2abb5));import{getRuntimeSkillVersionDiagram,putRuntimeSkillVersionDiagram,validateRuntimeSkillVersionDiagram}from'../../../core/api-client.js';import{CliErrors}from'../../../errors.js';import{readRequiredSkillDiagram}from'../diagram.js';function a70_0x2c50(){const _0x1309d0=['write','expectedDiagramRevision','created','appCode','30LTrbDd','diagram-show','12uBxeIn','diagram-push','Validate\x20a\x20Mermaid\x20diagram\x20replacement\x20for\x20one\x20exact\x20Skill\x20version','scope','218KYydBT','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.','416899JLspcC','str','skillCode','\x20is\x20unchanged.','Skill\x20diagram\x20for\x20','read','--skill-code,\x20--version,\x20and\x20--scope\x20personal|company\x20are\x20required.','diagram-file','1589008ksqJpy','Found\x20Skill\x20diagram\x20for\x20','validation','isInteger',';\x20first\x20write\x20expects\x20revision\x20','--expected-diagram-revision\x20must\x20be\x20a\x20non-negative\x20integer.','diagram-validate','--source-fingerprint\x20must\x20be\x20lowercase\x20sha256:<64\x20hex\x20characters>.','action','430398oaJTZI','Skill\x20diagram\x20validation\x20passed\x20for\x20','company','Create\x20or\x20replace\x20a\x20Mermaid\x20diagram\x20for\x20a\x20specific\x20Skill\x20version','202435OiCZzF','\x20Skill\x20diagram\x20for\x20','version','trim','unchanged','source-fingerprint','4HRzUTV','test','expected-diagram-revision','48135XBTZUa','692131frxVgY','skill','2994Aihfay','num','skill-code',';\x20next\x20write\x20expects\x20revision\x20'];a70_0x2c50=function(){return _0x1309d0;};return a70_0x2c50();}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 readDiagramTarget(_0x14bf6e){const _0x498e72=a70_0x3f94,_0x321c22=_0x14bf6e[_0x498e72(0x1e7)](_0x498e72(0x1d8))['trim'](),_0x41bce8=_0x14bf6e[_0x498e72(0x1e7)](_0x498e72(0x1cc))[_0x498e72(0x1cd)](),_0x5c38a9=_0x14bf6e[_0x498e72(0x1e7)]('scope');if(!_0x321c22||!_0x41bce8||_0x5c38a9!=='personal'&&_0x5c38a9!==_0x498e72(0x1f9))throw CliErrors[_0x498e72(0x1f0)](_0x498e72(0x1ec));return{'skillCode':_0x321c22,'version':_0x41bce8,'scope':_0x5c38a9};}async function readDiagramWriteInput(_0x35c478){const _0x39a397=a70_0x3f94,_0x9f53b9=_0x35c478[_0x39a397(0x1d7)](_0x39a397(0x1d2)),_0x28e1a9=_0x35c478['str'](_0x39a397(0x1cf))[_0x39a397(0x1cd)]();if(!Number[_0x39a397(0x1f1)](_0x9f53b9)||_0x9f53b9<0x0)throw CliErrors[_0x39a397(0x1f0)](_0x39a397(0x1f3));if(!/^sha256:[0-9a-f]{64}$/[_0x39a397(0x1d1)](_0x28e1a9))throw CliErrors[_0x39a397(0x1f0)](_0x39a397(0x1f5));return{'expectedDiagramRevision':_0x9f53b9,'sourceFingerprint':_0x28e1a9,'diagram':await readRequiredSkillDiagram(_0x35c478['str'](_0x39a397(0x1ed)))};}export const diagramValidateCommand={'service':a70_0x575e3f(0x1d5),'command':a70_0x575e3f(0x1f4),'description':a70_0x575e3f(0x1e2),'risk':a70_0x575e3f(0x1eb),'flags':WRITE_FLAGS,async 'execute'(_0x3c762c){const _0x174055=a70_0x575e3f,_0x2e6ccc=readDiagramTarget(_0x3c762c),_0x31fb6c=await validateRuntimeSkillVersionDiagram(_0x3c762c['appCode'],_0x2e6ccc[_0x174055(0x1e8)],_0x2e6ccc[_0x174055(0x1cc)],_0x2e6ccc['scope'],await readDiagramWriteInput(_0x3c762c));return{'ok':!![],'data':_0x31fb6c,'message':_0x174055(0x1f8)+_0x2e6ccc[_0x174055(0x1e8)]+'@'+_0x2e6ccc[_0x174055(0x1cc)]+'.'};}};function a70_0x3f94(_0x3cf27d,_0x26361f){_0x3cf27d=_0x3cf27d-0x1c9;const _0x2c503a=a70_0x2c50();let _0x3f944b=_0x2c503a[_0x3cf27d];return _0x3f944b;}export const diagramPushCommand={'service':a70_0x575e3f(0x1d5),'command':a70_0x575e3f(0x1e1),'description':a70_0x575e3f(0x1c9),'risk':a70_0x575e3f(0x1da),'confirmationDescription':a70_0x575e3f(0x1e5),'flags':WRITE_FLAGS,async 'execute'(_0x3929ad){const _0x7cca73=a70_0x575e3f,_0x568b61=readDiagramTarget(_0x3929ad),_0x1ce514=await putRuntimeSkillVersionDiagram(_0x3929ad[_0x7cca73(0x1dd)],_0x568b61['skillCode'],_0x568b61[_0x7cca73(0x1cc)],_0x568b61[_0x7cca73(0x1e3)],await readDiagramWriteInput(_0x3929ad));return{'ok':!![],'data':_0x1ce514,'message':_0x1ce514[_0x7cca73(0x1f6)]===_0x7cca73(0x1ce)?_0x7cca73(0x1ea)+_0x568b61['skillCode']+'@'+_0x568b61[_0x7cca73(0x1cc)]+_0x7cca73(0x1e9):(_0x1ce514['action']===_0x7cca73(0x1dc)?'Created':'Updated')+_0x7cca73(0x1cb)+_0x568b61['skillCode']+'@'+_0x568b61[_0x7cca73(0x1cc)]+'.'};}};export const diagramShowCommand={'service':a70_0x575e3f(0x1d5),'command':a70_0x575e3f(0x1df),'description':'Show\x20the\x20current\x20Mermaid\x20diagram\x20for\x20one\x20exact\x20Skill\x20version','risk':a70_0x575e3f(0x1eb),'flags':TARGET_FLAGS,async 'execute'(_0x116f70){const _0x49b5e5=a70_0x575e3f,_0x2340d9=readDiagramTarget(_0x116f70),_0x105a87=await getRuntimeSkillVersionDiagram(_0x116f70[_0x49b5e5(0x1dd)],_0x2340d9[_0x49b5e5(0x1e8)],_0x2340d9[_0x49b5e5(0x1cc)],_0x2340d9['scope']);return{'ok':!![],'data':_0x105a87,'message':_0x105a87['found']?_0x49b5e5(0x1ef)+_0x2340d9[_0x49b5e5(0x1e8)]+'@'+_0x2340d9[_0x49b5e5(0x1cc)]+_0x49b5e5(0x1d9)+_0x105a87['expectedDiagramRevision']+'.':'No\x20Skill\x20diagram\x20is\x20stored\x20for\x20'+_0x2340d9['skillCode']+'@'+_0x2340d9['version']+_0x49b5e5(0x1f2)+_0x105a87[_0x49b5e5(0x1db)]+'.'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x30e4f7=a71_0x4bea;(function(_0x192102,_0x1127a6){const _0x15e163=a71_0x4bea,_0x236c38=_0x192102();while(!![]){try{const _0x5b4d9a=parseInt(_0x15e163(0x103))/0x1+-parseInt(_0x15e163(0xf9))/0x2*(-parseInt(_0x15e163(0xe9))/0x3)+-parseInt(_0x15e163(0xf0))/0x4+parseInt(_0x15e163(0x104))/0x5*(-parseInt(_0x15e163(0xe6))/0x6)+parseInt(_0x15e163(0xdc))/0x7+parseInt(_0x15e163(0xfd))/0x8*(-parseInt(_0x15e163(0xef))/0x9)+parseInt(_0x15e163(0xde))/0xa;if(_0x5b4d9a===_0x1127a6)break;else _0x236c38['push'](_0x236c38['shift']());}catch(_0xdb6f26){_0x236c38['push'](_0x236c38['shift']());}}}(a71_0x5575,0x5db7a));import{CliErrors}from'../../../errors.js';function a71_0x5575(){const _0x2ead6a=['reduce','../../../core/api-client.js','skipped','min','version','9AEWeSY','767624cpEYVh','production','length','accessKey','company','skillCode','filter','project','envName','3320QsUIbh','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','personal','removed','5011144DUvbjE','code','trim','\x20personal\x20and\x20','appCode','includes','229304EhlKfj','84235HygTXL','all','install','93534wkBlAM','unchanged','11913940AVCAoR','action','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','bool','map','Installed\x20','global','skill','270meSNbJ','updated','scope','951rBBhXm'];a71_0x5575=function(){return _0x2ead6a;};return a71_0x5575();}import{CODE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';function a71_0x4bea(_0xd1b64,_0x3b77d9){_0xd1b64=_0xd1b64-0xda;const _0x557555=a71_0x5575();let _0x4bea6e=_0x557555[_0xd1b64];return _0x4bea6e;}import{summarizeRuntimeSkill}from'../summary.js';const PACKAGE_DOWNLOAD_CONCURRENCY=0x4;export const installCommand={'service':a71_0x30e4f7(0xe5),'command':a71_0x30e4f7(0xdb),'description':a71_0x30e4f7(0xfa),'risk':'read','requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x161fc8){return syncRuntimeSkills(_0x161fc8);}};async function syncRuntimeSkills(_0x45598c){const _0xc9a8d1=a71_0x30e4f7,{downloadRuntimeSkillPackage:_0x23f5d7,listRuntimeSkills:_0x3cda76}=await import(_0xc9a8d1(0xeb)),{linkEffectiveRuntimeSkills:_0xfd0d5a,materializeRuntimeSkill:_0x2c24ae,pruneStaleRuntimeSkillCache:_0x570495,pruneStaleRuntimeSkillLinks:_0x19cc37,resolveRuntimeSkillInstallTarget:_0x4377c2,reuseMaterializedRuntimeSkill:_0x19601e}=await import('../../../skills/runtime-skill-sync.js'),_0x537994=_0x45598c['str'](_0xc9a8d1(0xfe)),_0x51e0dd=normalizeSyncScopes(_0x45598c['str']('scope')),_0x2ef03b=_0x45598c[_0xc9a8d1(0xf8)]??_0xc9a8d1(0xf1),_0x17bfec=_0x45598c[_0xc9a8d1(0xf3)],_0x5da046=_0x45598c[_0xc9a8d1(0xe1)]('force');if(!_0x17bfec)throw CliErrors['authRequired'](_0xc9a8d1(0xe0));const _0x24476b=_0x4377c2(_0x45598c[_0xc9a8d1(0x101)],_0x45598c[_0xc9a8d1(0xe1)](_0xc9a8d1(0xf7))?_0xc9a8d1(0xf7):_0xc9a8d1(0xe4)),_0x1e3b98=_0x4377c2(_0x45598c['appCode'],_0x24476b[_0xc9a8d1(0xe8)]===_0xc9a8d1(0xf7)?_0xc9a8d1(0xe4):_0xc9a8d1(0xf7)),_0x4db15a=await _0x3cda76({'appCode':_0x45598c[_0xc9a8d1(0x101)],'scope':_0x51e0dd[_0xc9a8d1(0xf2)]===0x1?_0x51e0dd[0x0]:_0xc9a8d1(0xda),'code':_0x537994['trim']()||undefined,'installableOnly':!![]}),_0x2043e1=_0x51e0dd[_0xc9a8d1(0x102)](_0xc9a8d1(0xfb))?_0x4db15a[_0xc9a8d1(0xfb)]:[],_0x189d3d=_0x51e0dd[_0xc9a8d1(0x102)]('company')?_0x4db15a[_0xc9a8d1(0xf4)]:[],_0x264248=new Set([..._0x2043e1[_0xc9a8d1(0xe2)](_0x478ad2=>_0x478ad2['skillCode']?.[_0xc9a8d1(0xff)]())['filter'](_0x43e950=>Boolean(_0x43e950)),..._0x189d3d[_0xc9a8d1(0xe2)](_0x5e5ec9=>_0x5e5ec9[_0xc9a8d1(0xf5)]?.['trim']())[_0xc9a8d1(0xf6)](_0x2dcd12=>Boolean(_0x2dcd12))]),_0xd76e1e=_0x537994['trim']()?[_0x537994[_0xc9a8d1(0xff)]()]:undefined,_0x2194d7=_0x51e0dd[_0xc9a8d1(0xf2)]===0x2&&_0x51e0dd[_0xc9a8d1(0x102)]('personal')&&_0x51e0dd[_0xc9a8d1(0x102)]('company'),_0x20fc36=_0x2194d7?_0x19cc37(_0x24476b,_0x264248,_0xd76e1e):[],_0x1f02f7=_0x570495({'env':_0x2ef03b,'accessKey':_0x17bfec,'appCode':_0x45598c['appCode'],'activeSkillCodes':_0x264248,'pruneSkillCodes':_0xd76e1e,'scopes':_0x51e0dd,'protectedLinkRoots':_0x1e3b98['skillRoots']}),_0x3b912c=[..._0x2043e1[_0xc9a8d1(0xe2)](_0x5f2e8d=>({'skill':_0x5f2e8d,'scope':'personal'})),..._0x189d3d[_0xc9a8d1(0xe2)](_0x110956=>({'skill':_0x110956,'scope':'company'}))],_0x11c725=await mapConcurrent(_0x3b912c,PACKAGE_DOWNLOAD_CONCURRENCY,async({skill:_0x3124de,scope:_0x497e23})=>{const _0x3ec8a9=_0xc9a8d1,_0x11e2c5=_0x19601e(_0x3124de,_0x497e23,{'env':_0x2ef03b,'accessKey':_0x17bfec,'appCode':_0x45598c[_0x3ec8a9(0x101)]});if(_0x11e2c5)return _0x11e2c5;return _0x2c24ae(_0x3124de,_0x497e23,{'env':_0x2ef03b,'accessKey':_0x17bfec,'appCode':_0x45598c[_0x3ec8a9(0x101)],'force':_0x5da046,'packageBytes':await downloadSkillPackage(_0x3124de,_0x497e23,_0x45598c[_0x3ec8a9(0x101)],_0x23f5d7)});}),_0x332935=_0xfd0d5a(_0x11c725,_0x24476b),_0x52581d=countLinkActions(_0x332935);return{'ok':!![],'data':{'appCode':_0x45598c['appCode'],..._0x24476b[_0xc9a8d1(0xe8)]===_0xc9a8d1(0xf7)?{'installTarget':{'scope':_0x24476b[_0xc9a8d1(0xe8)],'skillRoots':[..._0x24476b['skillRoots']]}}:{},'personal':_0x2043e1[_0xc9a8d1(0xf2)],'company':_0x189d3d[_0xc9a8d1(0xf2)],'materialized':_0x11c725['length'],'links':{'total':_0x332935['length'],'created':_0x52581d['created']??0x0,'updated':_0x52581d[_0xc9a8d1(0xe7)]??0x0,'unchanged':_0x52581d[_0xc9a8d1(0xdd)]??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x20fc36[_0xc9a8d1(0xf6)](_0x2f92cc=>_0x2f92cc['action']==='removed')[_0xc9a8d1(0xf2)],'cacheDirs':_0x1f02f7[_0xc9a8d1(0xf6)](_0x4c3c79=>_0x4c3c79[_0xc9a8d1(0xdf)]===_0xc9a8d1(0xfc))[_0xc9a8d1(0xf2)],'skipped':[..._0x20fc36,..._0x1f02f7][_0xc9a8d1(0xf6)](_0x494928=>_0x494928[_0xc9a8d1(0xdf)]===_0xc9a8d1(0xec))[_0xc9a8d1(0xf2)]},'skills':{'personal':_0x2043e1[_0xc9a8d1(0xe2)](summarizeRuntimeSkill),'company':_0x189d3d[_0xc9a8d1(0xe2)](summarizeRuntimeSkill)}},'message':_0xc9a8d1(0xe3)+_0x2043e1[_0xc9a8d1(0xf2)]+_0xc9a8d1(0x100)+_0x189d3d[_0xc9a8d1(0xf2)]+'\x20company\x20Skill(s).'};}async function mapConcurrent(_0x15b862,_0x4e6cb8,_0x31d3b8){const _0x530e7b=a71_0x30e4f7,_0x5885d1=new Array(_0x15b862['length']);let _0x297a1b=0x0;const _0x4d79cd=Array['from']({'length':Math[_0x530e7b(0xed)](_0x4e6cb8,_0x15b862[_0x530e7b(0xf2)])},async()=>{const _0xf6c520=_0x530e7b;while(_0x297a1b<_0x15b862[_0xf6c520(0xf2)]){const _0x56b602=_0x297a1b;_0x297a1b+=0x1,_0x5885d1[_0x56b602]=await _0x31d3b8(_0x15b862[_0x56b602]);}});return await Promise[_0x530e7b(0xda)](_0x4d79cd),_0x5885d1;}async function downloadSkillPackage(_0xdffc0c,_0x52adfd,_0x5c2a5b,_0x3595ca){const _0x23c539=a71_0x30e4f7,_0x419894=_0xdffc0c[_0x23c539(0xee)]?.[_0x23c539(0xff)]();return _0x419894?_0x3595ca(_0x52adfd,_0xdffc0c[_0x23c539(0xf5)],_0x5c2a5b,_0x419894):_0x3595ca(_0x52adfd,_0xdffc0c[_0x23c539(0xf5)],_0x5c2a5b);}function countLinkActions(_0x28000e){const _0x1e1d3a=a71_0x30e4f7;return _0x28000e[_0x1e1d3a(0xea)]((_0x3760e8,_0x3afc04)=>{const _0x327840=_0x1e1d3a;return _0x3760e8[_0x3afc04[_0x327840(0xdf)]]=(_0x3760e8[_0x3afc04[_0x327840(0xdf)]]??0x0)+0x1,_0x3760e8;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a72_0x6acea9=a72_0x3f33;function a72_0x3f33(_0x197f76,_0x55e24e){_0x197f76=_0x197f76-0x104;const _0x1ccd0a=a72_0x1ccd();let _0x3f3353=_0x1ccd0a[_0x197f76];return _0x3f3353;}(function(_0x285c6b,_0x229c05){const _0x9b69d9=a72_0x3f33,_0x40836b=_0x285c6b();while(!![]){try{const _0x42ef11=-parseInt(_0x9b69d9(0x111))/0x1+parseInt(_0x9b69d9(0x125))/0x2*(parseInt(_0x9b69d9(0x11e))/0x3)+parseInt(_0x9b69d9(0x124))/0x4*(parseInt(_0x9b69d9(0x10a))/0x5)+parseInt(_0x9b69d9(0x10b))/0x6+-parseInt(_0x9b69d9(0x119))/0x7*(-parseInt(_0x9b69d9(0x10f))/0x8)+-parseInt(_0x9b69d9(0x123))/0x9+-parseInt(_0x9b69d9(0x122))/0xa*(parseInt(_0x9b69d9(0x109))/0xb);if(_0x42ef11===_0x229c05)break;else _0x40836b['push'](_0x40836b['shift']());}catch(_0x23b04e){_0x40836b['push'](_0x40836b['shift']());}}}(a72_0x1ccd,0xb8545));function a72_0x1ccd(){const _0x49ce61=['local','../../../core/api-client.js','str','read','personal','filter','251706CagnuP','project','company','length','trim','1011663RPTZpg','appCode','\x20remote\x20Skill(s).','authRequired','748460wFoijx','1608516AcaCEL','1972SKMVSl','6lwWQTE','envName','\x20local\x20Skill(s).','bool','scope','remote','209rgZvEz','11015ijutAt','1648104Nttgkc','code','map','Listed\x20','88pxMppV','skill','412153bqOfGp','List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache'];a72_0x1ccd=function(){return _0x49ce61;};return a72_0x1ccd();}import{CliErrors}from'../../../errors.js';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':a72_0x6acea9(0x110),'command':'list','description':a72_0x6acea9(0x112),'risk':a72_0x6acea9(0x116),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG,PROJECT_TARGET_FLAG],async 'execute'(_0x586496){const _0xd36770=a72_0x6acea9,_0x18dea1=_0x586496[_0xd36770(0x115)](_0xd36770(0x10c)),_0x4584ae=normalizeListScope(_0x586496['str']('scope'));if(_0x586496[_0xd36770(0x106)](_0xd36770(0x113))){const _0x3acc39=_0x586496['accessKey'];if(!_0x3acc39)throw CliErrors[_0xd36770(0x121)]();const {listLocalRuntimeSkills:_0x521016,resolveRuntimeSkillInstallTarget:_0x45406f}=await import('../../../skills/runtime-skill-sync.js'),_0x4f6d2d=_0x45406f(_0x586496['appCode'],_0x586496[_0xd36770(0x106)](_0xd36770(0x11a))?_0xd36770(0x11a):'global'),_0x23e031=_0x521016({'env':_0x586496[_0xd36770(0x104)]??'production','accessKey':_0x3acc39,'appCode':_0x586496[_0xd36770(0x11f)],'scopes':listScopeToRuntimeScopes(_0x4584ae),'code':_0x18dea1[_0xd36770(0x11d)]()||undefined},_0x4f6d2d),_0x1de7c6=groupLocalRuntimeSkills(_0x23e031);return{'ok':!![],'data':{'appCode':_0x586496[_0xd36770(0x11f)],'source':_0xd36770(0x113),..._0x4f6d2d[_0xd36770(0x107)]==='project'?{'installScope':_0x4f6d2d[_0xd36770(0x107)]}:{},'scope':_0x4584ae,'total':_0x23e031['length'],'personal':_0x1de7c6[_0xd36770(0x117)]['length'],'company':_0x1de7c6[_0xd36770(0x11b)][_0xd36770(0x11c)],'items':_0x23e031['map'](summarizeLocalRuntimeSkill),'skills':{'personal':_0x1de7c6[_0xd36770(0x117)]['map'](summarizeLocalRuntimeSkill),'company':_0x1de7c6[_0xd36770(0x11b)][_0xd36770(0x10d)](summarizeLocalRuntimeSkill)}},'message':_0xd36770(0x10e)+_0x23e031[_0xd36770(0x11c)]+_0xd36770(0x105)};}const {listRuntimeSkills:_0x20306f}=await import(_0xd36770(0x114)),_0x556e94=await _0x20306f({'appCode':_0x586496[_0xd36770(0x11f)],'scope':listScopeToRemoteScope(_0x4584ae),'code':_0x18dea1[_0xd36770(0x11d)]()||undefined}),_0x9f5ead=shouldListScope(_0x4584ae,_0xd36770(0x117))?_0x556e94[_0xd36770(0x117)]??[]:[],_0x460474=shouldListScope(_0x4584ae,'company')?_0x556e94[_0xd36770(0x11b)]??[]:[],_0x468a39=[..._0x9f5ead,..._0x460474];return{'ok':!![],'data':{'appCode':_0x586496[_0xd36770(0x11f)],'source':_0xd36770(0x108),'scope':_0x4584ae,'total':_0x468a39['length'],'personal':_0x9f5ead['length'],'company':_0x460474[_0xd36770(0x11c)],'items':_0x468a39[_0xd36770(0x10d)](summarizeRuntimeSkill),'skills':{'personal':_0x9f5ead['map'](summarizeRuntimeSkill),'company':_0x460474[_0xd36770(0x10d)](summarizeRuntimeSkill)}},'message':_0xd36770(0x10e)+_0x468a39[_0xd36770(0x11c)]+_0xd36770(0x120)};}};function groupLocalRuntimeSkills(_0x569f0c){const _0x5db1da=a72_0x6acea9;return{'personal':_0x569f0c[_0x5db1da(0x118)](_0x26c8ce=>_0x26c8ce['scope']==='personal'),'company':_0x569f0c[_0x5db1da(0x118)](_0x5a1411=>_0x5a1411[_0x5db1da(0x107)]===_0x5db1da(0x11b)),'builtin':_0x569f0c['filter'](_0x394e36=>_0x394e36[_0x5db1da(0x107)]==='builtin')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x2616c8=a73_0x45ed;(function(_0x44bc59,_0x1df816){const _0x51758f=a73_0x45ed,_0x219652=_0x44bc59();while(!![]){try{const _0x4156da=-parseInt(_0x51758f(0x15a))/0x1*(parseInt(_0x51758f(0x157))/0x2)+parseInt(_0x51758f(0x15b))/0x3*(parseInt(_0x51758f(0x153))/0x4)+parseInt(_0x51758f(0x159))/0x5*(parseInt(_0x51758f(0x151))/0x6)+-parseInt(_0x51758f(0x154))/0x7*(parseInt(_0x51758f(0x15e))/0x8)+parseInt(_0x51758f(0x14f))/0x9+-parseInt(_0x51758f(0x156))/0xa+parseInt(_0x51758f(0x152))/0xb*(-parseInt(_0x51758f(0x158))/0xc);if(_0x4156da===_0x1df816)break;else _0x219652['push'](_0x219652['shift']());}catch(_0x5b0d11){_0x219652['push'](_0x219652['shift']());}}}(a73_0x1db8,0x91627));function a73_0x1db8(){const _0x16bf11=['write','184iinVdh','push','8369802zaQdDi','skill','882tTjzOo','99htVdpL','1426888RDnmUv','234423YIrkCm','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope,\x20or\x20submit\x20a\x20company-scope\x20version\x20for\x20review','8613350mLUJRK','5276aRuXft','100944ruRcVv','36315HeaoRF','290KOHENI','9hkuOnf','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.'];a73_0x1db8=function(){return _0x16bf11;};return a73_0x1db8();}function a73_0x45ed(_0x199cbb,_0x139542){_0x199cbb=_0x199cbb-0x14e;const _0x1db8ce=a73_0x1db8();let _0x45ed04=_0x1db8ce[_0x199cbb];return _0x45ed04;}import{CONFIRM_WARNINGS_FLAG,DIAGRAM_FILE_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':a73_0x2616c8(0x150),'command':a73_0x2616c8(0x14e),'description':a73_0x2616c8(0x155),'risk':a73_0x2616c8(0x15d),'confirmationDescription':a73_0x2616c8(0x15c),'flags':[DIR_FLAG,DIAGRAM_FILE_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a74_0x176b5e=a74_0x3599;function a74_0x3599(_0x45ec61,_0x123ac2){_0x45ec61=_0x45ec61-0x188;const _0x2348c0=a74_0x2348();let _0x359972=_0x2348c0[_0x45ec61];return _0x359972;}function a74_0x2348(){const _0x377405=['strict','dir','skill','type','validate','read','str','errors','1000140vxIFlb','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','6kgIZzG','12246773hSusos','1694860rYcBle','597805CeVzHZ','16376472dJFPKa','6193632XuGSxf','warnings','bool','1348731Yqrpio','Skill\x20validation\x20passed.'];a74_0x2348=function(){return _0x377405;};return a74_0x2348();}(function(_0xd0ea0b,_0x24c5aa){const _0x476723=a74_0x3599,_0x3c4fdb=_0xd0ea0b();while(!![]){try{const _0x50e988=parseInt(_0x476723(0x197))/0x1+-parseInt(_0x476723(0x194))/0x2*(parseInt(_0x476723(0x188))/0x3)+parseInt(_0x476723(0x199))/0x4+-parseInt(_0x476723(0x196))/0x5+parseInt(_0x476723(0x192))/0x6+-parseInt(_0x476723(0x195))/0x7+parseInt(_0x476723(0x198))/0x8;if(_0x50e988===_0x24c5aa)break;else _0x3c4fdb['push'](_0x3c4fdb['shift']());}catch(_0x1c4268){_0x3c4fdb['push'](_0x3c4fdb['shift']());}}}(a74_0x2348,0xe1460));import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';export const validateCommand={'service':a74_0x176b5e(0x18c),'command':a74_0x176b5e(0x18e),'description':a74_0x176b5e(0x193),'risk':a74_0x176b5e(0x18f),'requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x2913d6){const _0x2fffb4=a74_0x176b5e,_0x324693=_0x2913d6[_0x2fffb4(0x19b)](_0x2fffb4(0x18a)),_0x3844bd=validateSkillDirectory(_0x2913d6[_0x2fffb4(0x190)](_0x2fffb4(0x18b)),{'strict':_0x324693});return throwIfSkillValidationFailed(_0x3844bd,_0x324693),{'ok':!![],'data':{'dir':_0x3844bd[_0x2fffb4(0x18b)],'type':_0x3844bd[_0x2fffb4(0x18d)],'errors':_0x3844bd[_0x2fffb4(0x191)],'warnings':_0x3844bd[_0x2fffb4(0x19a)]},'message':_0x2fffb4(0x189)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa68eaa,_0x2be36f){const _0x2d2e5f=a75_0x8685,_0x2361bd=_0xa68eaa();while(!![]){try{const _0xed8c5=-parseInt(_0x2d2e5f(0xd9))/0x1+-parseInt(_0x2d2e5f(0xe9))/0x2+-parseInt(_0x2d2e5f(0xe3))/0x3+parseInt(_0x2d2e5f(0xde))/0x4+-parseInt(_0x2d2e5f(0xe5))/0x5*(-parseInt(_0x2d2e5f(0xdf))/0x6)+parseInt(_0x2d2e5f(0xdd))/0x7+-parseInt(_0x2d2e5f(0xe4))/0x8;if(_0xed8c5===_0x2be36f)break;else _0x2361bd['push'](_0x2361bd['shift']());}catch(_0x39ce3d){_0x2361bd['push'](_0x2361bd['shift']());}}}(a75_0x2af5,0xa39b4));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{resolve}from'node:path';function a75_0x8685(_0x3369fd,_0x275b03){_0x3369fd=_0x3369fd-0xd9;const _0x2af50a=a75_0x2af5();let _0x868535=_0x2af50a[_0x3369fd];return _0x868535;}import{JSDOM}from'jsdom';import{CliErrors}from'../../errors.js';let mermaidApiPromise;export async function readRequiredSkillDiagram(_0x1a4061){const _0x3b5343=a75_0x8685;return(await readRequiredSkillDiagramInput(_0x1a4061))[_0x3b5343(0xdb)];}function a75_0x2af5(){const _0x319d83=['6QHmEcx','Fix\x20the\x20Mermaid\x20syntax\x20reported\x20by\x20your\x20editor\x20or\x20preview\x20tool,\x20then\x20retry\x20with\x20the\x20same\x20file.','default','Mermaid\x20syntax\x20validation\x20failed.','111462NFHCtP','2667624ueVPhd','1132735iqAwzk','isFile','parse','document','1825208kEPnuw','window','--diagram-file\x20is\x20required\x20when\x20publishing\x20a\x20Skill\x20version.','replace','utf8','Mermaid\x20flowchart\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','validation','4407WGdDCW','Mermaid\x20flowchart\x20file\x20not\x20found:\x20','diagram','trim','6206732IvmEhQ','3378108MTHhpb'];a75_0x2af5=function(){return _0x319d83;};return a75_0x2af5();}export async function readRequiredSkillDiagramInput(_0x3ed00c){const _0x5ba6c7=a75_0x8685,_0x1130e8=_0x3ed00c[_0x5ba6c7(0xdc)]();if(!_0x1130e8)throw CliErrors[_0x5ba6c7(0xef)](_0x5ba6c7(0xeb),'Generate\x20a\x20Mermaid\x20flowchart\x20and\x20pass\x20--diagram-file\x20<path>,\x20or\x20use\x20--diagram-file\x20-\x20for\x20standard\x20input.');let _0x2aa077,_0x2f01a9;if(_0x1130e8==='-')try{_0x2aa077=readFileSync(0x0,_0x5ba6c7(0xed));}catch{throw CliErrors[_0x5ba6c7(0xef)]('Unable\x20to\x20read\x20Mermaid\x20flowchart\x20from\x20standard\x20input.');}else{const _0x55d014=resolve(_0x1130e8);if(!existsSync(_0x55d014))throw CliErrors[_0x5ba6c7(0xef)](_0x5ba6c7(0xda)+_0x55d014);if(!statSync(_0x55d014)[_0x5ba6c7(0xe6)]())throw CliErrors['validation'](_0x5ba6c7(0xee)+_0x55d014);_0x2f01a9=realpathSync(_0x55d014),_0x2aa077=readFileSync(_0x2f01a9,'utf8');}return{'diagram':{'schemaVersion':0x1,'mermaid':await validateAndCanonicalizeMermaid(_0x2aa077)},'sourceFilePath':_0x2f01a9};}export async function validateAndCanonicalizeMermaid(_0x3d522b){const _0x500e74=a75_0x8685,_0x4f3f83=_0x3d522b[_0x500e74(0xec)](/\r\n/g,'\x0a')[_0x500e74(0xec)](/\r/g,'\x0a')[_0x500e74(0xec)](/\n+$/,'')+'\x0a';try{const _0x160783=await loadMermaidApi();await _0x160783[_0x500e74(0xe7)](_0x4f3f83);}catch{throw diagramValidationError();}return _0x4f3f83;}function loadMermaidApi(){return mermaidApiPromise??=((async()=>{const _0x380ac8=a75_0x8685;if(!('window'in globalThis)||!(_0x380ac8(0xe8)in globalThis)){const _0xf7f723=new JSDOM('');Object['defineProperties'](globalThis,{'window':{'configurable':!![],'value':_0xf7f723[_0x380ac8(0xea)]},'document':{'configurable':!![],'value':_0xf7f723['window'][_0x380ac8(0xe8)]}});}return(await import('mermaid'))[_0x380ac8(0xe1)];})()),mermaidApiPromise;}function diagramValidationError(){const _0x1f5c24=a75_0x8685;return CliErrors[_0x1f5c24(0xef)](_0x1f5c24(0xe2),_0x1f5c24(0xe0));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x3a55e9=a76_0xc32c;(function(_0x5bf302,_0x18f635){const _0x241535=a76_0xc32c,_0x24249b=_0x5bf302();while(!![]){try{const _0x479de6=parseInt(_0x241535(0x183))/0x1*(-parseInt(_0x241535(0x173))/0x2)+-parseInt(_0x241535(0x172))/0x3+-parseInt(_0x241535(0x187))/0x4*(-parseInt(_0x241535(0x16b))/0x5)+parseInt(_0x241535(0x188))/0x6+-parseInt(_0x241535(0x189))/0x7+parseInt(_0x241535(0x179))/0x8+-parseInt(_0x241535(0x176))/0x9*(-parseInt(_0x241535(0x18c))/0xa);if(_0x479de6===_0x18f635)break;else _0x24249b['push'](_0x24249b['shift']());}catch(_0x383255){_0x24249b['push'](_0x24249b['shift']());}}}(a76_0x29c4,0xbf5c5));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':a76_0x3a55e9(0x17b),'type':a76_0x3a55e9(0x17f),'description':a76_0x3a55e9(0x16c)};export const SCOPE_FLAG={'name':a76_0x3a55e9(0x18b),'type':a76_0x3a55e9(0x17f),'description':a76_0x3a55e9(0x16a),'enum':[a76_0x3a55e9(0x18f),a76_0x3a55e9(0x178),a76_0x3a55e9(0x17c)]};export const PUSH_SCOPE_FLAG={'name':a76_0x3a55e9(0x18b),'type':a76_0x3a55e9(0x17f),'description':a76_0x3a55e9(0x18d),'default':a76_0x3a55e9(0x178),'enum':[a76_0x3a55e9(0x178),a76_0x3a55e9(0x17c)]};export const LIST_SCOPE_FLAG={'name':a76_0x3a55e9(0x18b),'type':a76_0x3a55e9(0x17f),'description':a76_0x3a55e9(0x16e),'enum':['all','personal',a76_0x3a55e9(0x17c)]};export const LOCAL_FLAG={'name':a76_0x3a55e9(0x185),'type':'boolean','description':a76_0x3a55e9(0x16f)};export const DIR_FLAG={'name':'dir','type':a76_0x3a55e9(0x17f),'required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};export const DIAGRAM_FILE_FLAG={'name':a76_0x3a55e9(0x18a),'type':'string','required':!![],'description':'UTF-8\x20Mermaid\x20flowchart\x20file;\x20the\x20selected\x20file\x20is\x20excluded\x20from\x20the\x20Skill\x20package;\x20use\x20-\x20for\x20stdin'};export const DIAGRAM_SKILL_CODE_FLAG={'name':a76_0x3a55e9(0x182),'type':a76_0x3a55e9(0x17f),'required':!![],'description':a76_0x3a55e9(0x171)};export const DIAGRAM_VERSION_FLAG={'name':'version','type':a76_0x3a55e9(0x17f),'required':!![],'description':a76_0x3a55e9(0x186)};export const DIAGRAM_SCOPE_FLAG={'name':a76_0x3a55e9(0x18b),'type':a76_0x3a55e9(0x17f),'required':!![],'enum':[a76_0x3a55e9(0x178),a76_0x3a55e9(0x17c)],'description':a76_0x3a55e9(0x167)};export const SOURCE_FINGERPRINT_FLAG={'name':'source-fingerprint','type':a76_0x3a55e9(0x17f),'required':!![],'description':'Server-reported\x20SkillVersion\x20source\x20fingerprint','pattern':{'regex':/^sha256:[0-9a-f]{64}$/,'description':'a\x20lowercase\x20sha256:<64\x20hex\x20characters>\x20fingerprint'}};export const EXPECTED_DIAGRAM_REVISION_FLAG={'name':a76_0x3a55e9(0x175),'type':a76_0x3a55e9(0x16d),'required':!![],'description':a76_0x3a55e9(0x174)};export const CREATE_NAME_FLAG={'name':a76_0x3a55e9(0x17e),'type':a76_0x3a55e9(0x17f),'required':!![],'description':'Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','pattern':{'regex':SKILL_NAME_PATTERN,'description':a76_0x3a55e9(0x168)}};export const TYPE_FLAG={'name':a76_0x3a55e9(0x184),'type':a76_0x3a55e9(0x17f),'description':a76_0x3a55e9(0x170),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':'target','type':a76_0x3a55e9(0x17f),'description':a76_0x3a55e9(0x177),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a76_0x3a55e9(0x169),'type':'boolean','description':a76_0x3a55e9(0x17d)};function a76_0xc32c(_0x57d4b7,_0x3fcaf6){_0x57d4b7=_0x57d4b7-0x167;const _0x29c49f=a76_0x29c4();let _0xc32c06=_0x29c49f[_0x57d4b7];return _0xc32c06;}export const PROJECT_TARGET_FLAG={'name':'project','type':a76_0x3a55e9(0x18e),'description':'Use\x20the\x20current\x20project\x27s\x20.agents/skills\x20instead\x20of\x20user-level\x20Agent\x20Skill\x20directories'};export const CONFIRM_WARNINGS_FLAG={'name':a76_0x3a55e9(0x180),'type':a76_0x3a55e9(0x18e),'description':a76_0x3a55e9(0x17a)};export const STRICT_FLAG={'name':'strict','type':'boolean','description':a76_0x3a55e9(0x181)};function a76_0x29c4(){const _0x575fc0=['boolean','all','Exact\x20Skill\x20scope:\x20personal\x20or\x20company','lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens','force','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','65DwAabw','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','number','Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','Skill\x20template\x20type:\x20pass\x20read\x20or\x20write\x20explicitly\x20(omission\x20is\x20deprecated)','Exact\x20Skill\x20code\x20whose\x20version\x20diagram\x20is\x20being\x20managed','2288619KuYQaM','2WhtqnC','Expected\x20current\x20diagram\x20revision;\x20use\x200\x20for\x20the\x20first\x20diagram','expected-diagram-revision','1729989GsVcrI','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','personal','9772120cYuhvU','Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings','code','company','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','name','string','confirm-warnings','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','skill-code','892454Iuiwnc','type','local','Exact\x20Skill\x20version\x20whose\x20diagram\x20is\x20being\x20managed','86644GOjQpL','2770374VRtlxO','8789802SLOgQW','diagram-file','scope','90LwhGxb','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review'];a76_0x29c4=function(){return _0x575fc0;};return a76_0x29c4();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x229e6e,_0x281fb1){const _0x3ef7be=a77_0x5d27,_0x58a3ea=_0x229e6e();while(!![]){try{const _0x356fdc=parseInt(_0x3ef7be(0x80))/0x1+-parseInt(_0x3ef7be(0x84))/0x2*(-parseInt(_0x3ef7be(0x82))/0x3)+parseInt(_0x3ef7be(0x81))/0x4*(parseInt(_0x3ef7be(0x7c))/0x5)+-parseInt(_0x3ef7be(0x85))/0x6+parseInt(_0x3ef7be(0x7e))/0x7+parseInt(_0x3ef7be(0x7d))/0x8+-parseInt(_0x3ef7be(0x7f))/0x9*(parseInt(_0x3ef7be(0x83))/0xa);if(_0x356fdc===_0x281fb1)break;else _0x58a3ea['push'](_0x58a3ea['shift']());}catch(_0x3d29c5){_0x58a3ea['push'](_0x58a3ea['shift']());}}}(a77_0x166e,0xe6f78));import{createCommand}from'./commands/create.js';import{diagramPushCommand,diagramShowCommand,diagramValidateCommand}from'./commands/diagram.js';function a77_0x166e(){const _0x28ff6a=['370887qmHIMa','3103210jNBiHk','2BVFWVZ','10938288WPjOHY','2016295xdkaCK','7252416svbtTo','12288017byNbDr','18jnJSZi','200859ycdpPv','4ojkxFk'];a77_0x166e=function(){return _0x28ff6a;};return a77_0x166e();}import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';function a77_0x5d27(_0x5e7ce5,_0x28ed46){_0x5e7ce5=_0x5e7ce5-0x7c;const _0x166e38=a77_0x166e();let _0x5d27bb=_0x166e38[_0x5e7ce5];return _0x5d27bb;}import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand,diagramValidateCommand,diagramPushCommand,diagramShowCommand];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a78_0x58f1(_0x44ca4c,_0x447186){_0x44ca4c=_0x44ca4c-0x184;var _0x471165=a78_0x4711();var _0x58f1e0=_0x471165[_0x44ca4c];return _0x58f1e0;}(function(_0x2c1e91,_0x42f81c){var _0x44f6c7=a78_0x58f1,_0x502aef=_0x2c1e91();while(!![]){try{var _0x3dc430=parseInt(_0x44f6c7(0x186))/0x1+-parseInt(_0x44f6c7(0x188))/0x2+parseInt(_0x44f6c7(0x189))/0x3+-parseInt(_0x44f6c7(0x18d))/0x4+parseInt(_0x44f6c7(0x18b))/0x5*(parseInt(_0x44f6c7(0x184))/0x6)+parseInt(_0x44f6c7(0x190))/0x7*(-parseInt(_0x44f6c7(0x18a))/0x8)+parseInt(_0x44f6c7(0x185))/0x9*(-parseInt(_0x44f6c7(0x187))/0xa);if(_0x3dc430===_0x42f81c)break;else _0x502aef['push'](_0x502aef['shift']());}catch(_0x12dd1d){_0x502aef['push'](_0x502aef['shift']());}}}(a78_0x4711,0x311c8));function a78_0x4711(){var _0x1e1d40=['1580736lLePhF','some','length','877268nymPVC','object','isArray','path','ossPath','files','30eYMmvP','45ToUcDJ','311600tTOVPz','195740zBuLAp','323590fnEMFg','1081824ApoLYD','8NpRLFM','309125LLoAFx','string'];a78_0x4711=function(){return _0x1e1d40;};return a78_0x4711();}export function isPackageBackedManifest(_0x5fc6ee){var _0x25c971=a78_0x58f1;return!!_0x5fc6ee&&typeof _0x5fc6ee===_0x25c971(0x191)&&!Array[_0x25c971(0x192)](_0x5fc6ee)&&typeof _0x5fc6ee['ossPath']===_0x25c971(0x18c)&&_0x5fc6ee[_0x25c971(0x194)][_0x25c971(0x18f)]>0x0&&Array[_0x25c971(0x192)](_0x5fc6ee[_0x25c971(0x195)]);}export function isMultiFileManifest(_0x32c031){var _0x1f4056=a78_0x58f1;return!!_0x32c031&&typeof _0x32c031==='object'&&!Array[_0x1f4056(0x192)](_0x32c031)&&Array[_0x1f4056(0x192)](_0x32c031['files'])&&_0x32c031['files'][_0x1f4056(0x18e)](_0x2610de=>_0x2610de[_0x1f4056(0x193)]!=='SKILL.md');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x54b5bc,_0x21e294){const _0x450195=a79_0x2975,_0x56aaf4=_0x54b5bc();while(!![]){try{const _0x87ab4e=-parseInt(_0x450195(0xa7))/0x1+parseInt(_0x450195(0xa2))/0x2*(parseInt(_0x450195(0xae))/0x3)+parseInt(_0x450195(0xc0))/0x4+parseInt(_0x450195(0xde))/0x5*(parseInt(_0x450195(0xd7))/0x6)+parseInt(_0x450195(0xd8))/0x7*(parseInt(_0x450195(0xac))/0x8)+-parseInt(_0x450195(0xb0))/0x9+-parseInt(_0x450195(0xb3))/0xa;if(_0x87ab4e===_0x21e294)break;else _0x56aaf4['push'](_0x56aaf4['shift']());}catch(_0x263e5f){_0x56aaf4['push'](_0x56aaf4['shift']());}}}(a79_0x5d51,0x1a549));function a79_0x5d51(){const _0x2f3f1e=['POST','personal','version','resolvedSlug','NAMESPACE_ONLY','files','skillCode','\x20has\x20scope=\x22','warnings','659708WuJSBZ','Created\x20personal\x20Skill\x20','metadata','resolvedVersion','validation','/api/cli/v1/skills/','\x20for\x20review','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','Submitted\x20company\x20Skill\x20','confirm-warnings','payload','appCode','../../core/api-client.js','frontmatterDisplayName','input','identical','(unknown)','/publish/validate','str','../../skills/runtime-skill-sync.js','authRequired','errors','Updated\x20personal\x20Skill\x20','1244172LzGWkY','539zqVjZF','company','scope','Company','status','unknown','5JyDmRi','\x20is\x20already\x20published\x20and\x20content\x20is\x20identical','publishInput','2OrDNgi','submitted','diagramValidated','Personal','valid','125508cBNjPO','bool','PRIVATE','appcode','accessKey','18616XLIekO','dir','203226yQYLLh','existing','206469ZonxtQ','diagram-file','savedSkill','3629120McRHsf','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','remoteForPreflight','\x20Skill\x20'];a79_0x5d51=function(){return _0x2f3f1e;};return a79_0x5d51();}import{CliErrors}from'../../errors.js';import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';function a79_0x2975(_0x5a8c01,_0x4ff7e5){_0x5a8c01=_0x5a8c01-0xa2;const _0x5d519e=a79_0x5d51();let _0x2975e4=_0x5d519e[_0x5a8c01];return _0x2975e4;}import{summarizeRuntimeSkill}from'./summary.js';import{readRequiredSkillDiagramInput}from'./diagram.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0xb3d4ca){const _0x5acb16=a79_0x2975,{getRuntimeSkillByCode:_0xe354ef,validateRuntimeSkillPublish:_0x3034e9}=await import(_0x5acb16(0xcc)),{readPushDirectory:_0x15ac05,resolvePushDirectoryIdentity:_0x558f6e}=await import(_0x5acb16(0xd3));if(!_0xb3d4ca[_0x5acb16(0xab)])throw CliErrors[_0x5acb16(0xd4)]();const _0x36db12=resolvePushScope(_0xb3d4ca),_0x5d3d45=validateSkillDirectory(_0xb3d4ca[_0x5acb16(0xd2)](_0x5acb16(0xad)));throwIfSkillValidationFailed(_0x5d3d45);const {diagram:_0x3a6e1f,sourceFilePath:_0x5bf985}=await readRequiredSkillDiagramInput(_0xb3d4ca[_0x5acb16(0xd2)]('diagram-file')),_0x380e81=diagramPackageExclusion(_0x5bf985),_0x1d78ab=_0x558f6e(_0x5d3d45[_0x5acb16(0xad)],_0xb3d4ca[_0x5acb16(0xcb)],remoteFirstMetadataOptions()),_0x5ee890=await _0xe354ef(_0xb3d4ca[_0x5acb16(0xcb)],_0x1d78ab[_0x5acb16(0xbd)]);throwIfBuiltinPushTarget(_0x5ee890);if(_0x36db12===_0x5acb16(0xd9)){const _0x46541b=_0x15ac05(_0x5d3d45[_0x5acb16(0xad)],_0xb3d4ca['appCode'],{...remoteMissingCompanyReadOptions(),..._0x380e81}),_0x385769=await _0x3034e9(_0xb3d4ca['appCode'],withDiagram(_0x46541b[_0x5acb16(0xce)],_0x3a6e1f),{'visibility':_0x5acb16(0xbb)});return{'method':_0x5acb16(0xb7),'url':_0x5acb16(0xc5)+_0xb3d4ca['appCode']+_0x5acb16(0xd1),'body':{'skillCode':_0x46541b['skillCode'],'visibility':_0x5acb16(0xbb),'valid':_0x385769['valid'],'errors':_0x385769['errors'],'warnings':_0x385769[_0x5acb16(0xbf)],'resolvedSlug':_0x385769[_0x5acb16(0xba)],'resolvedVersion':_0x385769[_0x5acb16(0xc3)],'diagramValidated':_0x385769[_0x5acb16(0xa4)]},'description':_0x5acb16(0xb4)};}if(_0x5ee890&&_0x5ee890[_0x5acb16(0xda)]!==_0x5acb16(0xb8))throw CliErrors[_0x5acb16(0xc4)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x1d78ab[_0x5acb16(0xbd)]+_0x5acb16(0xbe)+(_0x5ee890[_0x5acb16(0xda)]??_0x5acb16(0xdd))+'\x22.');const _0x268cd5=_0x15ac05(_0x5d3d45[_0x5acb16(0xad)],_0xb3d4ca['appCode'],{..._0x5ee890?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x380e81}),_0x2c6d71=await _0x3034e9(_0xb3d4ca['appCode'],withDiagram(_0x268cd5[_0x5acb16(0xce)],_0x3a6e1f),{'visibility':_0x5acb16(0xa9)});return{'method':'POST','url':_0x5acb16(0xc5)+_0xb3d4ca['appCode']+_0x5acb16(0xd1),'body':{'skillCode':_0x268cd5[_0x5acb16(0xbd)],'visibility':_0x5acb16(0xa9),'valid':_0x2c6d71[_0x5acb16(0xa6)],'errors':_0x2c6d71[_0x5acb16(0xd5)],'warnings':_0x2c6d71[_0x5acb16(0xbf)],'resolvedSlug':_0x2c6d71[_0x5acb16(0xba)],'resolvedVersion':_0x2c6d71[_0x5acb16(0xc3)],'diagramValidated':_0x2c6d71[_0x5acb16(0xa4)]},'description':_0x5acb16(0xc7)};}export async function skillPushExecute(_0x5b41a8){const _0xdf3784=a79_0x2975,{createPersonalRuntimeSkill:_0x1e626b,downloadRuntimeSkillPackage:_0x36a7b5,getRuntimeSkillByCode:_0x4f4f46,publishCompanyRuntimeSkill:_0x593cd3,updatePersonalRuntimeSkill:_0x48cc51,validateRuntimeSkillPublish:_0x3ebdb4}=await import(_0xdf3784(0xcc)),{verifyRuntimeSkillPackage:_0x336dbe,verifyRuntimeSkillBundle:_0x52e58a,readPushDirectory:_0x1f4ea5,refreshPushDirectoryMetadataFromRemote:_0xe101e0,recordPushedRuntimeSkill:_0x2c67a5,resolvePushDirectoryIdentity:_0x1a8c2c}=await import(_0xdf3784(0xd3));if(!_0x5b41a8[_0xdf3784(0xab)])throw CliErrors[_0xdf3784(0xd4)]();const _0x2bd10c=resolvePushScope(_0x5b41a8),_0x5e7a51=_0x5b41a8['bool'](_0xdf3784(0xc9))||_0x5b41a8[_0xdf3784(0xa8)]('confirmWarnings'),_0x485f88=validateSkillDirectory(_0x5b41a8[_0xdf3784(0xd2)]('dir'));throwIfSkillValidationFailed(_0x485f88);const {diagram:_0x4158dc,sourceFilePath:_0x363ca7}=await readRequiredSkillDiagramInput(_0x5b41a8[_0xdf3784(0xd2)](_0xdf3784(0xb1))),_0x84812b=diagramPackageExclusion(_0x363ca7),_0x37f790=_0x485f88[_0xdf3784(0xad)];let _0x38872a;if(_0x2bd10c===_0xdf3784(0xd9)){const _0x358717=_0x1a8c2c(_0x37f790,_0x5b41a8[_0xdf3784(0xcb)],remoteFirstMetadataOptions()),_0x1ce785=await _0x4f4f46(_0x5b41a8[_0xdf3784(0xcb)],_0x358717['skillCode']);throwIfBuiltinPushTarget(_0x1ce785);if(_0x1ce785)_0xe101e0(_0x37f790,_0x1ce785,_0x5b41a8[_0xdf3784(0xcb)]);const _0x4ae2d2=_0x1f4ea5(_0x37f790,_0x5b41a8[_0xdf3784(0xcb)],{..._0x1ce785?{'targetScope':_0xdf3784(0xd9),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x84812b});_0x38872a={'scope':_0xdf3784(0xd9),'payload':_0x4ae2d2,'publishInput':withDiagram(_0x4ae2d2[_0xdf3784(0xce)],_0x4158dc),'remoteForPreflight':_0x1ce785,'warnings':[]};}else{const _0x19771e=_0x5b41a8[_0xdf3784(0xd2)](_0xdf3784(0xaa))['trim'](),_0xf38278=Boolean(_0x19771e),_0x453605=allowRetargetArgs(_0xf38278),_0x5147f5=_0x1a8c2c(_0x37f790,_0x5b41a8['appCode'],{...remoteFirstMetadataOptions(),..._0x453605[0x0]}),_0x1e9658=await _0x4f4f46(_0x5b41a8[_0xdf3784(0xcb)],_0x5147f5[_0xdf3784(0xbd)]);throwIfBuiltinPushTarget(_0x1e9658);if(_0x1e9658){if(_0x1e9658[_0xdf3784(0xda)]!=='personal'){if(_0xf38278)throw CliErrors[_0xdf3784(0xc4)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x5147f5[_0xdf3784(0xbd)]+'\x20has\x20scope=\x22'+(_0x1e9658[_0xdf3784(0xda)]??_0xdf3784(0xdd))+'\x22.');_0xe101e0(_0x37f790,_0x1e9658,_0x5b41a8['appCode']);}else!_0xf38278&&_0xe101e0(_0x37f790,_0x1e9658,_0x5b41a8[_0xdf3784(0xcb)]);}const _0x5242b2=_0x1f4ea5(_0x37f790,_0x5b41a8['appCode'],{..._0x1e9658?remotePersonalReadOptions(_0xf38278,_0x453605[0x0]):remoteMissingPersonalReadOptions(_0x453605[0x0]),..._0x84812b}),_0x4c86f0=_0x1e9658?.[_0xdf3784(0xda)]===_0xdf3784(0xb8)&&_0x1e9658[_0xdf3784(0xbd)]===_0x5242b2[_0xdf3784(0xbd)]?_0x1e9658:undefined,_0x1ddab0=_0xf38278&&_0x4c86f0?withRetargetExistingMetadata(_0x5242b2['input'],_0x4c86f0,{'preferInputSkillName':Boolean(_0x5242b2[_0xdf3784(0xcd)])}):_0x5242b2['input'],_0x438bcc=_0xf38278?buildRetargetWarning(_0x5147f5[_0xdf3784(0xc2)],_0x5b41a8['appCode']):[];_0x38872a={'scope':'personal','payload':_0x5242b2,'publishInput':withDiagram(_0x1ddab0,_0x4158dc),'remoteForPreflight':_0x4c86f0,'existing':_0x4c86f0,'warnings':[..._0x485f88[_0xdf3784(0xbf)],..._0x438bcc]};}const _0x324c79=await runRemoteContentPreflight({'scope':_0x38872a[_0xdf3784(0xda)],'remote':_0x38872a[_0xdf3784(0xb5)],'publishInput':_0x38872a[_0xdf3784(0xe0)],'skillCode':_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)],'appCode':_0x5b41a8['appCode'],'downloadRuntimeSkillPackage':_0x36a7b5,'verifyRuntimeSkillBundle':_0x52e58a});if(_0x324c79[_0xdf3784(0xdc)]===_0xdf3784(0xcf))return _0x38872a[_0xdf3784(0xda)]===_0xdf3784(0xd9)?_0x2c67a5(_0x37f790,_0x324c79[_0xdf3784(0xb2)],_0x5b41a8[_0xdf3784(0xcb)],{'scope':_0xdf3784(0xd9)}):_0x2c67a5(_0x37f790,_0x324c79['savedSkill'],_0x5b41a8[_0xdf3784(0xcb)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x324c79[_0xdf3784(0xb2)]),'scope':_0x38872a[_0xdf3784(0xda)],..._0x38872a['scope']==='personal'?{'warnings':_0x38872a[_0xdf3784(0xbf)]}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x38872a[_0xdf3784(0xda)])+_0xdf3784(0xb6)+_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)]+_0xdf3784(0xdf)};if(_0x38872a[_0xdf3784(0xda)]===_0xdf3784(0xd9)){const _0x46eff0=await _0x3ebdb4(_0x5b41a8['appCode'],_0x38872a[_0xdf3784(0xe0)],{'visibility':_0xdf3784(0xbb)});throwIfPublishValidationFailed(_0xdf3784(0xd9),_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)],_0x46eff0),throwIfUnconfirmedPublishWarnings(_0xdf3784(0xd9),_0x38872a[_0xdf3784(0xca)]['skillCode'],_0x46eff0[_0xdf3784(0xbf)],_0x5e7a51);const _0x10dd7=await _0x593cd3(_0x5b41a8[_0xdf3784(0xcb)],_0x38872a[_0xdf3784(0xe0)],{'confirmWarnings':_0x5e7a51});return _0x2c67a5(_0x37f790,{..._0x10dd7,'files':_0x38872a[_0xdf3784(0xe0)][_0xdf3784(0xbc)]},_0x5b41a8['appCode'],{'scope':_0xdf3784(0xd9)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x10dd7),'scope':_0xdf3784(0xd9),'reviewState':_0xdf3784(0xa3),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x46eff0['warnings']}},'message':_0xdf3784(0xc8)+_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)]+'\x20version\x20'+(_0x10dd7[_0xdf3784(0xb9)]??_0xdf3784(0xd0))+_0xdf3784(0xc6)};}const _0x5aa970=await _0x3ebdb4(_0x5b41a8[_0xdf3784(0xcb)],_0x38872a[_0xdf3784(0xe0)],{'visibility':_0xdf3784(0xa9)});throwIfPublishValidationFailed(_0xdf3784(0xb8),_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)],_0x5aa970),throwIfUnconfirmedPublishWarnings(_0xdf3784(0xb8),_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)],_0x5aa970[_0xdf3784(0xbf)],_0x5e7a51);const _0x26b9ae={'confirmWarnings':_0x5e7a51},_0x372e75=_0x38872a[_0xdf3784(0xaf)]?await _0x48cc51(_0x38872a[_0xdf3784(0xca)]['skillCode'],_0x5b41a8[_0xdf3784(0xcb)],_0x38872a[_0xdf3784(0xe0)],_0x26b9ae):await _0x1e626b(_0x5b41a8[_0xdf3784(0xcb)],_0x38872a['publishInput'],_0x26b9ae);let _0xb13f66=_0x372e75;if(isMultiFileManifest(_0x38872a['publishInput'][_0xdf3784(0xbc)])){const _0x4b796d=await _0x36a7b5(_0xdf3784(0xb8),_0x372e75[_0xdf3784(0xbd)]||_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)],_0x5b41a8[_0xdf3784(0xcb)]);_0x52e58a(_0x38872a[_0xdf3784(0xe0)]['files'],_0x4b796d),_0xb13f66={..._0x372e75,'files':_0x38872a[_0xdf3784(0xe0)][_0xdf3784(0xbc)]};}else{if(isPackageBackedManifest(_0x372e75[_0xdf3784(0xbc)])){const _0x5b112e=await _0x36a7b5('personal',_0x372e75['skillCode']||_0x38872a['payload'][_0xdf3784(0xbd)],_0x5b41a8[_0xdf3784(0xcb)]);_0x336dbe(_0x372e75['files'],_0x5b112e);}}return _0x2c67a5(_0x37f790,_0xb13f66,_0x5b41a8[_0xdf3784(0xcb)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x372e75),'warnings':_0x38872a[_0xdf3784(0xbf)],'validation':{'warnings':_0x5aa970['warnings']},'diagramBound':!![]},'message':_0x38872a[_0xdf3784(0xaf)]?_0xdf3784(0xd6)+_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)]:_0xdf3784(0xc1)+_0x38872a[_0xdf3784(0xca)][_0xdf3784(0xbd)]};}function scopeLabel(_0x1275da){const _0x384080=a79_0x2975;return _0x1275da===_0x384080(0xd9)?_0x384080(0xdb):_0x384080(0xa5);}function withDiagram(_0x3bc9fc,_0x2f2411){return{..._0x3bc9fc,'diagram':_0x2f2411};}function diagramPackageExclusion(_0x48fb1e){return _0x48fb1e?{'excludedFilePaths':[_0x48fb1e]}:{};}
|
|
1
|
+
(function(_0x1eee1d,_0x21f99a){const _0x2277a6=a79_0x3e12,_0x4bad25=_0x1eee1d();while(!![]){try{const _0x75df6e=parseInt(_0x2277a6(0x18b))/0x1+-parseInt(_0x2277a6(0x16d))/0x2*(-parseInt(_0x2277a6(0x171))/0x3)+-parseInt(_0x2277a6(0x162))/0x4+parseInt(_0x2277a6(0x176))/0x5+parseInt(_0x2277a6(0x17f))/0x6+-parseInt(_0x2277a6(0x168))/0x7+parseInt(_0x2277a6(0x185))/0x8*(-parseInt(_0x2277a6(0x161))/0x9);if(_0x75df6e===_0x21f99a)break;else _0x4bad25['push'](_0x4bad25['shift']());}catch(_0x385f85){_0x4bad25['push'](_0x4bad25['shift']());}}}(a79_0x1903,0xe00bb));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_0x3e12(_0x527265,_0x39d35d){_0x527265=_0x527265-0x150;const _0x190382=a79_0x1903();let _0x3e12cc=_0x190382[_0x527265];return _0x3e12cc;}import{readRequiredSkillDiagramInput}from'./diagram.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x460abe){const _0x28da17=a79_0x3e12,{getRuntimeSkillByCode:_0x2d741b,validateRuntimeSkillPublish:_0x472200}=await import('../../core/api-client.js'),{readPushDirectory:_0x42c957,resolvePushDirectoryIdentity:_0x1dd9a0}=await import(_0x28da17(0x16a));if(!_0x460abe[_0x28da17(0x172)])throw CliErrors[_0x28da17(0x157)]();const _0x5c8bb9=resolvePushScope(_0x460abe),_0x136eed=validateSkillDirectory(_0x460abe['str']('dir'));throwIfSkillValidationFailed(_0x136eed);const {diagram:_0xa0e3c7,sourceFilePath:_0x74ddda}=await readRequiredSkillDiagramInput(_0x460abe[_0x28da17(0x188)](_0x28da17(0x15f))),_0x284e54=diagramPackageExclusion(_0x74ddda),_0x5df625=_0x1dd9a0(_0x136eed['dir'],_0x460abe['appCode'],remoteFirstMetadataOptions()),_0x5e5b29=await _0x2d741b(_0x460abe[_0x28da17(0x170)],_0x5df625['skillCode']);throwIfBuiltinPushTarget(_0x5e5b29);if(_0x5c8bb9===_0x28da17(0x16b)){const _0x461047=_0x42c957(_0x136eed[_0x28da17(0x15b)],_0x460abe[_0x28da17(0x170)],{...remoteMissingCompanyReadOptions(),..._0x284e54}),_0x14008d=await _0x472200(_0x460abe['appCode'],withDiagram(_0x461047[_0x28da17(0x163)],_0xa0e3c7),{'visibility':_0x28da17(0x152)});return{'method':_0x28da17(0x158),'url':'/api/cli/v1/skills/'+_0x460abe['appCode']+_0x28da17(0x17b),'body':{'skillCode':_0x461047[_0x28da17(0x187)],'visibility':'NAMESPACE_ONLY','valid':_0x14008d[_0x28da17(0x175)],'errors':_0x14008d[_0x28da17(0x167)],'warnings':_0x14008d['warnings'],'resolvedSlug':_0x14008d[_0x28da17(0x165)],'resolvedVersion':_0x14008d[_0x28da17(0x16e)],'diagramValidated':_0x14008d['diagramValidated']},'description':_0x28da17(0x166)};}if(_0x5e5b29&&_0x5e5b29[_0x28da17(0x173)]!=='personal')throw CliErrors['validation'](_0x28da17(0x178)+_0x5df625[_0x28da17(0x187)]+'\x20has\x20scope=\x22'+(_0x5e5b29[_0x28da17(0x173)]??_0x28da17(0x18c))+'\x22.');const _0x267189=_0x42c957(_0x136eed[_0x28da17(0x15b)],_0x460abe[_0x28da17(0x170)],{..._0x5e5b29?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions(),..._0x284e54}),_0x25dde4=await _0x472200(_0x460abe[_0x28da17(0x170)],withDiagram(_0x267189[_0x28da17(0x163)],_0xa0e3c7),{'visibility':'PRIVATE'});return{'method':_0x28da17(0x158),'url':'/api/cli/v1/skills/'+_0x460abe[_0x28da17(0x170)]+_0x28da17(0x17b),'body':{'skillCode':_0x267189['skillCode'],'visibility':_0x28da17(0x169),'valid':_0x25dde4[_0x28da17(0x175)],'errors':_0x25dde4[_0x28da17(0x167)],'warnings':_0x25dde4[_0x28da17(0x17d)],'resolvedSlug':_0x25dde4[_0x28da17(0x165)],'resolvedVersion':_0x25dde4['resolvedVersion'],'diagramValidated':_0x25dde4[_0x28da17(0x17a)]},'description':_0x28da17(0x17e)};}function a79_0x1903(){const _0xb190f3=['version','confirmWarnings','1644810TnBnzF','unknown','savedSkill','payload','NAMESPACE_ONLY','metadata','status','Created\x20personal\x20Skill\x20','../../core/api-client.js','authRequired','POST','bool','files','dir','remoteForPreflight','personal','Submitted\x20company\x20Skill\x20','diagram-file','(unknown)','8374401uwuBTa','4089440sLBFiw','input','Updated\x20personal\x20Skill\x20','resolvedSlug','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','errors','11144756nTxFpX','PRIVATE','../../skills/runtime-skill-sync.js','company','publishInput','2adhefd','resolvedVersion','Personal','appCode','4461657OMLapB','accessKey','scope','\x20has\x20scope=\x22','valid','1046985dMFubw','frontmatterDisplayName','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','\x20for\x20review','diagramValidated','/publish/validate','confirm-warnings','warnings','Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','6727332kbUVJx','identical','submitted','trim','Company','\x20version\x20','8aAKFvt','existing','skillCode','str'];a79_0x1903=function(){return _0xb190f3;};return a79_0x1903();}export async function skillPushExecute(_0x240216){const _0x4d9ba5=a79_0x3e12,{createPersonalRuntimeSkill:_0x5c901e,downloadRuntimeSkillPackage:_0x3b12b3,getRuntimeSkillByCode:_0x2edc1c,publishCompanyRuntimeSkill:_0x2e1979,updatePersonalRuntimeSkill:_0x3d6e2b,validateRuntimeSkillPublish:_0x35498c}=await import(_0x4d9ba5(0x156)),{verifyRuntimeSkillPackage:_0x1d68d3,verifyRuntimeSkillBundle:_0x3cc527,readPushDirectory:_0xfdad93,refreshPushDirectoryMetadataFromRemote:_0x4bac90,recordPushedRuntimeSkill:_0x252775,resolvePushDirectoryIdentity:_0x41fa0d}=await import(_0x4d9ba5(0x16a));if(!_0x240216[_0x4d9ba5(0x172)])throw CliErrors[_0x4d9ba5(0x157)]();const _0x5b336c=resolvePushScope(_0x240216),_0x5d397d=_0x240216[_0x4d9ba5(0x159)](_0x4d9ba5(0x17c))||_0x240216[_0x4d9ba5(0x159)](_0x4d9ba5(0x18a)),_0x7a8e40=validateSkillDirectory(_0x240216['str'](_0x4d9ba5(0x15b)));throwIfSkillValidationFailed(_0x7a8e40);const {diagram:_0x3bb1d8,sourceFilePath:_0x4a70ea}=await readRequiredSkillDiagramInput(_0x240216[_0x4d9ba5(0x188)]('diagram-file')),_0x3c73ba=diagramPackageExclusion(_0x4a70ea),_0x1250eb=_0x7a8e40[_0x4d9ba5(0x15b)];let _0x93f89d;if(_0x5b336c===_0x4d9ba5(0x16b)){const _0x5d8c2f=_0x41fa0d(_0x1250eb,_0x240216[_0x4d9ba5(0x170)],remoteFirstMetadataOptions()),_0x514313=await _0x2edc1c(_0x240216['appCode'],_0x5d8c2f[_0x4d9ba5(0x187)]);throwIfBuiltinPushTarget(_0x514313);if(_0x514313)_0x4bac90(_0x1250eb,_0x514313,_0x240216[_0x4d9ba5(0x170)]);const _0x2ee0b6=_0xfdad93(_0x1250eb,_0x240216[_0x4d9ba5(0x170)],{..._0x514313?{'targetScope':_0x4d9ba5(0x16b),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions(),..._0x3c73ba});_0x93f89d={'scope':_0x4d9ba5(0x16b),'payload':_0x2ee0b6,'publishInput':withDiagram(_0x2ee0b6[_0x4d9ba5(0x163)],_0x3bb1d8),'remoteForPreflight':_0x514313,'warnings':[]};}else{const _0x2e16f6=_0x240216[_0x4d9ba5(0x188)]('appcode')[_0x4d9ba5(0x182)](),_0x3229c0=Boolean(_0x2e16f6),_0x19e969=allowRetargetArgs(_0x3229c0),_0x1facf7=_0x41fa0d(_0x1250eb,_0x240216[_0x4d9ba5(0x170)],{...remoteFirstMetadataOptions(),..._0x19e969[0x0]}),_0x337388=await _0x2edc1c(_0x240216[_0x4d9ba5(0x170)],_0x1facf7[_0x4d9ba5(0x187)]);throwIfBuiltinPushTarget(_0x337388);if(_0x337388){if(_0x337388[_0x4d9ba5(0x173)]!==_0x4d9ba5(0x15d)){if(_0x3229c0)throw CliErrors['validation'](_0x4d9ba5(0x178)+_0x1facf7['skillCode']+_0x4d9ba5(0x174)+(_0x337388[_0x4d9ba5(0x173)]??'unknown')+'\x22.');_0x4bac90(_0x1250eb,_0x337388,_0x240216[_0x4d9ba5(0x170)]);}else!_0x3229c0&&_0x4bac90(_0x1250eb,_0x337388,_0x240216['appCode']);}const _0x488db3=_0xfdad93(_0x1250eb,_0x240216['appCode'],{..._0x337388?remotePersonalReadOptions(_0x3229c0,_0x19e969[0x0]):remoteMissingPersonalReadOptions(_0x19e969[0x0]),..._0x3c73ba}),_0x448eea=_0x337388?.[_0x4d9ba5(0x173)]===_0x4d9ba5(0x15d)&&_0x337388['skillCode']===_0x488db3[_0x4d9ba5(0x187)]?_0x337388:undefined,_0x154e20=_0x3229c0&&_0x448eea?withRetargetExistingMetadata(_0x488db3[_0x4d9ba5(0x163)],_0x448eea,{'preferInputSkillName':Boolean(_0x488db3[_0x4d9ba5(0x177)])}):_0x488db3[_0x4d9ba5(0x163)],_0x460d34=_0x3229c0?buildRetargetWarning(_0x1facf7[_0x4d9ba5(0x153)],_0x240216[_0x4d9ba5(0x170)]):[];_0x93f89d={'scope':_0x4d9ba5(0x15d),'payload':_0x488db3,'publishInput':withDiagram(_0x154e20,_0x3bb1d8),'remoteForPreflight':_0x448eea,'existing':_0x448eea,'warnings':[..._0x7a8e40[_0x4d9ba5(0x17d)],..._0x460d34]};}const _0x4dea59=await runRemoteContentPreflight({'scope':_0x93f89d[_0x4d9ba5(0x173)],'remote':_0x93f89d[_0x4d9ba5(0x15c)],'publishInput':_0x93f89d[_0x4d9ba5(0x16c)],'skillCode':_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)],'appCode':_0x240216[_0x4d9ba5(0x170)],'downloadRuntimeSkillPackage':_0x3b12b3,'verifyRuntimeSkillBundle':_0x3cc527});if(_0x4dea59[_0x4d9ba5(0x154)]===_0x4d9ba5(0x180))return _0x93f89d[_0x4d9ba5(0x173)]===_0x4d9ba5(0x16b)?_0x252775(_0x1250eb,_0x4dea59[_0x4d9ba5(0x150)],_0x240216[_0x4d9ba5(0x170)],{'scope':_0x4d9ba5(0x16b)}):_0x252775(_0x1250eb,_0x4dea59[_0x4d9ba5(0x150)],_0x240216[_0x4d9ba5(0x170)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x4dea59[_0x4d9ba5(0x150)]),'scope':_0x93f89d['scope'],..._0x93f89d[_0x4d9ba5(0x173)]===_0x4d9ba5(0x15d)?{'warnings':_0x93f89d[_0x4d9ba5(0x17d)]}:{},'alreadyPublished':!![],'contentIdentical':!![],'diagramSubmitted':![]},'message':scopeLabel(_0x93f89d[_0x4d9ba5(0x173)])+'\x20Skill\x20'+_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x93f89d[_0x4d9ba5(0x173)]===_0x4d9ba5(0x16b)){const _0x1a4a59=await _0x35498c(_0x240216[_0x4d9ba5(0x170)],_0x93f89d[_0x4d9ba5(0x16c)],{'visibility':_0x4d9ba5(0x152)});throwIfPublishValidationFailed(_0x4d9ba5(0x16b),_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)],_0x1a4a59),throwIfUnconfirmedPublishWarnings(_0x4d9ba5(0x16b),_0x93f89d['payload']['skillCode'],_0x1a4a59['warnings'],_0x5d397d);const _0xdb7f49=await _0x2e1979(_0x240216['appCode'],_0x93f89d[_0x4d9ba5(0x16c)],{'confirmWarnings':_0x5d397d});return _0x252775(_0x1250eb,{..._0xdb7f49,'files':_0x93f89d[_0x4d9ba5(0x16c)][_0x4d9ba5(0x15a)]},_0x240216[_0x4d9ba5(0x170)],{'scope':_0x4d9ba5(0x16b)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0xdb7f49),'scope':_0x4d9ba5(0x16b),'reviewState':_0x4d9ba5(0x181),'submittedForReview':!![],'diagramBound':!![],'validation':{'warnings':_0x1a4a59[_0x4d9ba5(0x17d)]}},'message':_0x4d9ba5(0x15e)+_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)]+_0x4d9ba5(0x184)+(_0xdb7f49[_0x4d9ba5(0x189)]??_0x4d9ba5(0x160))+_0x4d9ba5(0x179)};}const _0x430f07=await _0x35498c(_0x240216[_0x4d9ba5(0x170)],_0x93f89d[_0x4d9ba5(0x16c)],{'visibility':_0x4d9ba5(0x169)});throwIfPublishValidationFailed(_0x4d9ba5(0x15d),_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)],_0x430f07),throwIfUnconfirmedPublishWarnings('personal',_0x93f89d['payload'][_0x4d9ba5(0x187)],_0x430f07[_0x4d9ba5(0x17d)],_0x5d397d);const _0xc1de4b={'confirmWarnings':_0x5d397d},_0xff25f9=_0x93f89d[_0x4d9ba5(0x186)]?await _0x3d6e2b(_0x93f89d['payload'][_0x4d9ba5(0x187)],_0x240216[_0x4d9ba5(0x170)],_0x93f89d['publishInput'],_0xc1de4b):await _0x5c901e(_0x240216[_0x4d9ba5(0x170)],_0x93f89d[_0x4d9ba5(0x16c)],_0xc1de4b);let _0x38aa5b=_0xff25f9;if(isMultiFileManifest(_0x93f89d['publishInput']['files'])){const _0x37f4aa=await _0x3b12b3(_0x4d9ba5(0x15d),_0xff25f9[_0x4d9ba5(0x187)]||_0x93f89d[_0x4d9ba5(0x151)]['skillCode'],_0x240216['appCode']);_0x3cc527(_0x93f89d[_0x4d9ba5(0x16c)][_0x4d9ba5(0x15a)],_0x37f4aa),_0x38aa5b={..._0xff25f9,'files':_0x93f89d[_0x4d9ba5(0x16c)]['files']};}else{if(isPackageBackedManifest(_0xff25f9[_0x4d9ba5(0x15a)])){const _0xc54852=await _0x3b12b3(_0x4d9ba5(0x15d),_0xff25f9[_0x4d9ba5(0x187)]||_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)],_0x240216[_0x4d9ba5(0x170)]);_0x1d68d3(_0xff25f9[_0x4d9ba5(0x15a)],_0xc54852);}}return _0x252775(_0x1250eb,_0x38aa5b,_0x240216[_0x4d9ba5(0x170)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0xff25f9),'warnings':_0x93f89d[_0x4d9ba5(0x17d)],'validation':{'warnings':_0x430f07[_0x4d9ba5(0x17d)]},'diagramBound':!![]},'message':_0x93f89d[_0x4d9ba5(0x186)]?_0x4d9ba5(0x164)+_0x93f89d[_0x4d9ba5(0x151)][_0x4d9ba5(0x187)]:_0x4d9ba5(0x155)+_0x93f89d[_0x4d9ba5(0x151)]['skillCode']};}function scopeLabel(_0x77c296){const _0x416b45=a79_0x3e12;return _0x77c296===_0x416b45(0x16b)?_0x416b45(0x183):_0x416b45(0x16f);}function withDiagram(_0x4cf433,_0x2f85fa){return{..._0x4cf433,'diagram':_0x2f85fa};}function diagramPackageExclusion(_0x4c9bec){return _0x4c9bec?{'excludedFilePaths':[_0x4c9bec]}:{};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b0df2,_0x30ac61){const _0x3d1e54=a80_0x26fb,_0xc6eda4=_0x2b0df2();while(!![]){try{const _0x274165=parseInt(_0x3d1e54(0x12a))/0x1+-parseInt(_0x3d1e54(0x10c))/0x2+parseInt(_0x3d1e54(0x10a))/0x3*(parseInt(_0x3d1e54(0x117))/0x4)+-parseInt(_0x3d1e54(0x11c))/0x5*(-parseInt(_0x3d1e54(0x11b))/0x6)+parseInt(_0x3d1e54(0x106))/0x7*(-parseInt(_0x3d1e54(0x11a))/0x8)+-parseInt(_0x3d1e54(0x113))/0x9+parseInt(_0x3d1e54(0x122))/0xa*(parseInt(_0x3d1e54(0x12c))/0xb);if(_0x274165===_0x30ac61)break;else _0xc6eda4['push'](_0xc6eda4['shift']());}catch(_0x11399d){_0xc6eda4['push'](_0xc6eda4['shift']());}}}(a80_0x4d4c,0x9b204));import{CliErrors}from'../../errors.js';export function resolvePushScope(_0x3c69a1){const _0x4bb502=a80_0x26fb,_0x3d5421=_0x3c69a1['str'](_0x4bb502(0x126))||_0x4bb502(0x129);if(_0x3d5421==='personal'||_0x3d5421===_0x4bb502(0x12d))return _0x3d5421;throw CliErrors['validation']('skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22'+_0x3d5421+'\x22.');}export function allowRetargetArgs(_0x225795){return _0x225795?[{'allowAppCodeRetarget':!![]}]:[];}function a80_0x4d4c(){const _0x2e6e4f=['lovrabet.skill.json','scope','Review\x20each\x20warning\x20before\x20continuing.','(unknown)','personal','442056LVEfCp','appCode','715zJwpAV','company','remote','71183gPjIOx','\x20Skill\x20push\x20validation\x20failed\x20for\x20','warning','Personal','9387Anhcqk','errors','2196992dBYjni','valid','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','join','files','verifyRuntimeSkillBundle','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','7608996yiURGj','validation','publishInput','\x20cannot\x20be\x20pushed.','4fTftwz','skillCode','length','488wzzKbF','67170VEVjvb','310XGfgvk','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','Builtin\x20Skill\x20','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','warnings','Company','316980rtqjGJ','not-applicable','\x20after\x20successful\x20push.'];a80_0x4d4c=function(){return _0x2e6e4f;};return a80_0x4d4c();}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x3a1add=a80_0x26fb;return{'targetScope':_0x3a1add(0x12d),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x53512e={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x53512e};}export function remotePersonalReadOptions(_0x3c4ad3,_0x4f4cb8={}){return{'ignoreInvalidMetadata':!![],..._0x3c4ad3?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x4f4cb8};}export function throwIfBuiltinPushTarget(_0x5a8a4e){const _0x19c5fa=a80_0x26fb;if(_0x5a8a4e?.[_0x19c5fa(0x126)]!=='builtin')return;throw CliErrors['validation'](_0x19c5fa(0x11e)+(_0x5a8a4e[_0x19c5fa(0x118)]??_0x19c5fa(0x128))+_0x19c5fa(0x116),'Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.');}function a80_0x26fb(_0x9ea471,_0x1b2f42){_0x9ea471=_0x9ea471-0x105;const _0x4d4c3e=a80_0x4d4c();let _0x26fb34=_0x4d4c3e[_0x9ea471];return _0x26fb34;}export function throwIfPublishValidationFailed(_0x597725,_0x1d238a,_0xa9259){const _0x58f6d4=a80_0x26fb;if(_0xa9259[_0x58f6d4(0x10b)][_0x58f6d4(0x119)]===0x0&&(_0xa9259[_0x58f6d4(0x10d)]||_0xa9259[_0x58f6d4(0x120)][_0x58f6d4(0x119)]>0x0))return;const _0x5dec59=_0xa9259[_0x58f6d4(0x10b)]['length']>0x0?_0xa9259['errors'][_0x58f6d4(0x10f)](';\x20'):'SkillHub\x20validation\x20returned\x20invalid.',_0x405990=_0x597725==='company'?_0x58f6d4(0x121):_0x58f6d4(0x109);throw CliErrors[_0x58f6d4(0x114)](_0x405990+_0x58f6d4(0x107)+_0x1d238a+'.',_0x5dec59);}export function throwIfUnconfirmedPublishWarnings(_0x33fa7a,_0x3cd32c,_0x571a4d,_0x34b09b){const _0x599ce6=a80_0x26fb;if(_0x571a4d[_0x599ce6(0x119)]===0x0||_0x34b09b)return;const _0x4bf2c0=_0x33fa7a===_0x599ce6(0x12d)?_0x599ce6(0x121):_0x599ce6(0x109);throw CliErrors[_0x599ce6(0x114)](_0x4bf2c0+_0x599ce6(0x11f)+_0x3cd32c+'.',[_0x599ce6(0x127),'Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.',_0x599ce6(0x11d),'Warnings:\x20'+_0x571a4d['join'](';\x20')][_0x599ce6(0x10f)]('\x20'));}export function buildRetargetWarning(_0x3cf0e5,_0xa33f9e){const _0x4cd8de=a80_0x26fb;if(!_0x3cf0e5?.[_0x4cd8de(0x12b)]||_0x3cf0e5[_0x4cd8de(0x12b)]===_0xa33f9e)return[];return[{'level':_0x4cd8de(0x108),'ruleId':'skill-metadata-appcode-retargeted','file':_0x4cd8de(0x125),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x3cf0e5['appCode']+_0x4cd8de(0x10e)+_0xa33f9e+_0x4cd8de(0x124),'suggestion':_0x4cd8de(0x112)}];}export async function runRemoteContentPreflight(_0x2197f8){const _0x3bf8cb=a80_0x26fb;if(!_0x2197f8[_0x3bf8cb(0x105)]||_0x2197f8[_0x3bf8cb(0x105)][_0x3bf8cb(0x126)]!==_0x2197f8['scope']||!_0x2197f8[_0x3bf8cb(0x115)][_0x3bf8cb(0x110)])return{'status':_0x3bf8cb(0x123)};const _0x340d22=_0x2197f8[_0x3bf8cb(0x105)][_0x3bf8cb(0x118)]||_0x2197f8[_0x3bf8cb(0x118)];if(!_0x340d22)return{'status':_0x3bf8cb(0x123)};const _0x5d0996=await _0x2197f8['downloadRuntimeSkillPackage'](_0x2197f8['scope'],_0x340d22,_0x2197f8[_0x3bf8cb(0x12b)],_0x2197f8[_0x3bf8cb(0x105)]['version']);try{_0x2197f8[_0x3bf8cb(0x111)](_0x2197f8[_0x3bf8cb(0x115)][_0x3bf8cb(0x110)],_0x5d0996);}catch{return{'status':'different'};}return{'status':'identical','savedSkill':{..._0x2197f8[_0x3bf8cb(0x105)],'content':_0x2197f8[_0x3bf8cb(0x115)]['content'],'files':_0x2197f8['publishInput'][_0x3bf8cb(0x110)]}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a81_0x47d9(){const _0x4fe4ae=['warning','\x20after\x20successful\x20push.','1460360qbpsNl','2HLdirD','322365yshEzo','9970392ElRZHZ','8bHYSpA','description','preferInputSkillName','lovrabet.skill.json','1048kiMORr','1264802LMBfqj','33CSkdex','6395YPAyAb','tags','3980502ISeHxB','skill-metadata-appcode-retargeted','66207kUxiFE','skillName','version','sourceSessionId','6RrQCzQ'];a81_0x47d9=function(){return _0x4fe4ae;};return a81_0x47d9();}function a81_0x4950(_0x4a63d0,_0x394f28){_0x4a63d0=_0x4a63d0-0x141;const _0x47d909=a81_0x47d9();let _0x49506a=_0x47d909[_0x4a63d0];return _0x49506a;}(function(_0x399ef4,_0x4ea05b){const _0x18ca96=a81_0x4950,_0x9d67da=_0x399ef4();while(!![]){try{const _0x43aa98=-parseInt(_0x18ca96(0x143))/0x1+parseInt(_0x18ca96(0x14b))/0x2*(parseInt(_0x18ca96(0x14c))/0x3)+parseInt(_0x18ca96(0x152))/0x4*(parseInt(_0x18ca96(0x155))/0x5)+parseInt(_0x18ca96(0x147))/0x6*(-parseInt(_0x18ca96(0x153))/0x7)+-parseInt(_0x18ca96(0x14e))/0x8*(-parseInt(_0x18ca96(0x141))/0x9)+-parseInt(_0x18ca96(0x14a))/0xa*(-parseInt(_0x18ca96(0x154))/0xb)+-parseInt(_0x18ca96(0x14d))/0xc;if(_0x43aa98===_0x4ea05b)break;else _0x9d67da['push'](_0x9d67da['shift']());}catch(_0x4cfff0){_0x9d67da['push'](_0x9d67da['shift']());}}}(a81_0x47d9,0x3bdbc));export function withRetargetExistingMetadata(_0x33f525,_0x5ba1cd,_0xc6b76a={}){const _0x702e1a=a81_0x4950,_0x12c758=_0xc6b76a[_0x702e1a(0x150)]?_0x33f525['skillName']??_0x5ba1cd['skillName']:_0x5ba1cd[_0x702e1a(0x144)]??_0x33f525[_0x702e1a(0x144)];return{..._0x33f525,'skillName':_0x12c758,'description':_0x5ba1cd[_0x702e1a(0x14f)]??_0x33f525['description'],'tags':Array['isArray'](_0x5ba1cd[_0x702e1a(0x156)])?_0x5ba1cd['tags']:_0x33f525[_0x702e1a(0x156)],'version':_0x5ba1cd[_0x702e1a(0x145)]??_0x33f525[_0x702e1a(0x145)],'sourceSessionId':_0x5ba1cd[_0x702e1a(0x146)]??_0x33f525[_0x702e1a(0x146)]};}export function buildRetargetWarning(_0x40fafc,_0x3172d3){const _0x2c07a3=a81_0x4950;if(!_0x40fafc?.['appCode']||_0x40fafc['appCode']===_0x3172d3)return[];return[{'level':_0x2c07a3(0x148),'ruleId':_0x2c07a3(0x142),'file':_0x2c07a3(0x151),'message':'Local\x20Skill\x20metadata\x20appCode\x20'+_0x40fafc['appCode']+'\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20'+_0x3172d3+_0x2c07a3(0x149),'suggestion':'Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.'}];}
|