@lovrabet/lovrabet-cli 2.1.11 → 2.1.12-beta.1
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/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a40_0x3d35e3=a40_0xfbc7;(function(_0x4f3817,_0x281e16){const _0x47ccbc=a40_0xfbc7,_0x41cfd2=_0x4f3817();while(!![]){try{const _0x5ab58c=parseInt(_0x47ccbc(0x191))/0x1*(-parseInt(_0x47ccbc(0x19e))/0x2)+parseInt(_0x47ccbc(0x170))/0x3*(parseInt(_0x47ccbc(0x175))/0x4)+-parseInt(_0x47ccbc(0x17a))/0x5+parseInt(_0x47ccbc(0x189))/0x6+parseInt(_0x47ccbc(0x193))/0x7+parseInt(_0x47ccbc(0x176))/0x8+parseInt(_0x47ccbc(0x172))/0x9;if(_0x5ab58c===_0x281e16)break;else _0x41cfd2['push'](_0x41cfd2['shift']());}catch(_0x1c18ce){_0x41cfd2['push'](_0x41cfd2['shift']());}}}(a40_0x2f9d,0x4fbbe));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';function a40_0xfbc7(_0x3f3a7d,_0x352bc4){_0x3f3a7d=_0x3f3a7d-0x16d;const _0x2f9dbc=a40_0x2f9d();let _0xfbc7c6=_0x2f9dbc[_0x3f3a7d];return _0xfbc7c6;}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';export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME=a40_0x3d35e3(0x1be);export function getServiceRegistryPath(_0x9da1c4={}){const _0x4332b6=a40_0x3d35e3;return resolve(_0x9da1c4[_0x4332b6(0x1a5)]??homedir(),PRODUCT_CONFIG[_0x4332b6(0x1a0)],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x26bc61={}){const _0x2a8499=a40_0x3d35e3,_0x4fcd1a=getServiceRegistryPath(_0x26bc61);if(!existsSync(_0x4fcd1a))return emptyServiceRegistry();try{const _0x5c15bd=readFileSync(_0x4fcd1a,_0x2a8499(0x1a7));if(!_0x5c15bd[_0x2a8499(0x1a1)]())return emptyServiceRegistry();const _0x8805e6=JSON[_0x2a8499(0x17b)](_0x5c15bd);if(_0x8805e6[_0x2a8499(0x1b1)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x2a8499(0x178)](_0x2a8499(0x1a2)+String(_0x8805e6[_0x2a8499(0x1b1)]),_0x2a8499(0x1b3)+_0x4fcd1a+'.');if(!Array['isArray'](_0x8805e6[_0x2a8499(0x1b7)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x8805e6[_0x2a8499(0x181)],'services':_0x8805e6[_0x2a8499(0x1b7)]};}catch(_0x5c6e4b){if(_0x5c6e4b instanceof Error&&_0x5c6e4b[_0x2a8499(0x177)]===_0x2a8499(0x187))throw _0x5c6e4b;throw CliErrors[_0x2a8499(0x178)](_0x2a8499(0x18c)+_0x4fcd1a,_0x2a8499(0x1b6));}}export function writeServiceRegistry(_0xb03b86,_0x559bea={}){const _0x2b7136=a40_0x3d35e3,_0x2ef63e=getServiceRegistryPath(_0x559bea),_0x59b6c7=dirname(_0x2ef63e);!existsSync(_0x59b6c7)&&mkdirSync(_0x59b6c7,{'recursive':!![]});const _0x1f4b14=_0x2ef63e+_0x2b7136(0x179);try{writeFileSync(_0x1f4b14,JSON[_0x2b7136(0x1ba)](_0xb03b86,null,0x2)+'\x0a',{'encoding':_0x2b7136(0x1a7),'mode':0x180}),renameSync(_0x1f4b14,_0x2ef63e);}catch(_0x31d374){try{unlinkSync(_0x1f4b14);}catch{}if(_0x31d374?.[_0x2b7136(0x184)]===_0x2b7136(0x1b5))throw CliErrors[_0x2b7136(0x178)](_0x2b7136(0x194)+_0x2ef63e);throw _0x31d374;}return _0x2ef63e;}export function loadServiceManifestFromFile(_0x5a9576){const _0x472857=a40_0x3d35e3,_0x1aefde=resolve(_0x5a9576);if(!existsSync(_0x1aefde))throw CliErrors[_0x472857(0x178)](_0x472857(0x17d)+_0x5a9576);let _0x29cb28;const _0x5d87a8=readFileSync(_0x1aefde,_0x472857(0x1a7));try{_0x29cb28=JSON['parse'](_0x5d87a8);}catch{throw CliErrors['validation']('Invalid\x20service\x20manifest\x20JSON:\x20'+_0x5a9576,_0x472857(0x1b8));}const _0x5597d6=sha256(_0x5d87a8),_0x204077=extractLoadedServiceManifests(_0x29cb28,_0x5597d6),_0x3e914c=aggregateValidationReports(_0x204077),_0x3701a9=_0x204077[0x0];return{'filePath':_0x1aefde,'hash':_0x5597d6,'kind':isServiceRegistryLike(_0x29cb28)?_0x472857(0x173):_0x472857(0x186),'manifest':_0x3701a9?.[_0x472857(0x186)]??_0x29cb28,'report':_0x3e914c,'normalizedManifest':_0x204077[_0x472857(0x1b2)]===0x1?_0x3701a9?.[_0x472857(0x16e)]:undefined,'manifests':_0x204077};}export function importServiceManifest(_0x2e3853,_0x30dc63={}){const _0x4d9ae0=a40_0x3d35e3,_0x4364ed=loadServiceManifestFromFile(_0x2e3853);if(!_0x4364ed[_0x4d9ae0(0x1a3)]['ok'])throw CliErrors[_0x4d9ae0(0x178)](formatValidationFailure(_0x4364ed[_0x4d9ae0(0x1a3)]),'Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.');if(_0x4364ed[_0x4d9ae0(0x199)][_0x4d9ae0(0x1b2)]===0x0)throw CliErrors[_0x4d9ae0(0x178)](_0x4d9ae0(0x196),_0x4d9ae0(0x1b0));const _0x4a3ee9=readServiceRegistry(_0x30dc63),_0x528561=(_0x30dc63[_0x4d9ae0(0x1ab)]??(()=>new Date()))()[_0x4d9ae0(0x19a)](),_0x224d72=[];let _0x2ccd1=0x0,_0x4f370e=0x0;for(const _0x34e88f of _0x4364ed[_0x4d9ae0(0x199)]){if(!_0x34e88f[_0x4d9ae0(0x16e)])continue;const _0xcffee6=_0x34e88f[_0x4d9ae0(0x16e)][_0x4d9ae0(0x1ad)][_0x4d9ae0(0x184)],_0x17a958={'serviceCode':_0xcffee6,'version':_0x34e88f['normalizedManifest'][_0x4d9ae0(0x17e)],'importedAt':_0x528561,'source':{'type':'file','path':_0x4364ed['filePath'],'hash':_0x34e88f[_0x4d9ae0(0x180)]},'manifest':_0x34e88f[_0x4d9ae0(0x186)],'normalizedManifest':_0x34e88f[_0x4d9ae0(0x16e)]},_0x48efd1=_0x4a3ee9['services'][_0x4d9ae0(0x17f)](_0x9a5b44=>_0x9a5b44['serviceCode']===_0xcffee6);_0x48efd1>=0x0?(_0x4a3ee9[_0x4d9ae0(0x1b7)][_0x48efd1]=_0x17a958,_0x4f370e++):(_0x4a3ee9[_0x4d9ae0(0x1b7)][_0x4d9ae0(0x192)](_0x17a958),_0x2ccd1++),_0x224d72[_0x4d9ae0(0x192)](_0x17a958);}_0x4a3ee9[_0x4d9ae0(0x1b7)]['sort']((_0x455862,_0x598ff2)=>_0x455862[_0x4d9ae0(0x19b)]['localeCompare'](_0x598ff2[_0x4d9ae0(0x19b)])),_0x4a3ee9[_0x4d9ae0(0x181)]=_0x528561;const _0x2497b4=writeServiceRegistry(_0x4a3ee9,_0x30dc63);return{'registryPath':_0x2497b4,'entry':_0x224d72[0x0],'replaced':_0x224d72[_0x4d9ae0(0x1b2)]===0x1?_0x4f370e===0x1:_0x4f370e>0x0,'entries':_0x224d72,'imported':_0x2ccd1,'updated':_0x4f370e,'serviceCount':_0x4a3ee9[_0x4d9ae0(0x1b7)][_0x4d9ae0(0x1b2)]};}export function exportServiceManifest(_0x36cd4f,_0x18b447,_0x11def5={}){const _0x58797c=a40_0x3d35e3,_0x49d1b6=getServiceRegistryPath(_0x11def5),_0x4f2f99=getLocalServiceEntry(_0x36cd4f,_0x11def5);if(!_0x4f2f99)throw CliErrors[_0x58797c(0x178)](_0x58797c(0x1c0)+_0x36cd4f,_0x58797c(0x171));const _0xc427ae=resolve(_0x18b447),_0x4829ff=dirname(_0xc427ae);return!existsSync(_0x4829ff)&&mkdirSync(_0x4829ff,{'recursive':!![]}),writeFileSync(_0xc427ae,JSON[_0x58797c(0x1ba)](_0x4f2f99[_0x58797c(0x186)],null,0x2)+'\x0a',{'encoding':_0x58797c(0x1a7),'mode':0x180}),{'registryPath':_0x49d1b6,'filePath':_0xc427ae,'entry':_0x4f2f99};}export function removeServiceManifest(_0x5a9ae5,_0xdbd585={}){const _0x5bbb73=a40_0x3d35e3,_0x1669be=readServiceRegistry(_0xdbd585),_0x6deb50=_0x5a9ae5[_0x5bbb73(0x1a1)](),_0x10f945=_0x1669be['services'][_0x5bbb73(0x17f)](_0x259bf7=>_0x259bf7[_0x5bbb73(0x19b)]===_0x6deb50);if(_0x10f945<0x0)throw CliErrors[_0x5bbb73(0x178)](_0x5bbb73(0x1c0)+_0x6deb50,_0x5bbb73(0x171));const [_0x367316]=_0x1669be[_0x5bbb73(0x1b7)]['splice'](_0x10f945,0x1),_0x1b8cd0=(_0xdbd585['now']??(()=>new Date()))()[_0x5bbb73(0x19a)]();_0x1669be[_0x5bbb73(0x181)]=_0x1b8cd0;const _0x2ae778=writeServiceRegistry(_0x1669be,_0xdbd585);return{'registryPath':_0x2ae778,'entry':_0x367316,'serviceCount':_0x1669be[_0x5bbb73(0x1b7)][_0x5bbb73(0x1b2)]};}export function listLocalServices(_0x1dbc8b={}){return readServiceRegistry(_0x1dbc8b)['services'];}export function getLocalServiceEntry(_0x348e74,_0x33547a={}){const _0x2725fa=a40_0x3d35e3;return readServiceRegistry(_0x33547a)['services'][_0x2725fa(0x190)](_0x3f98bc=>_0x3f98bc[_0x2725fa(0x19b)]===_0x348e74[_0x2725fa(0x1a1)]());}export function listLocalServiceTrees(_0x3e9a55={}){const _0x4a6b1c=a40_0x3d35e3;return readServiceRegistry(_0x3e9a55)[_0x4a6b1c(0x1b7)]['map'](_0x2356be=>_0x2356be['normalizedManifest']);}export function inspectServiceRegistry(_0x3f8ca8={}){const _0x12ff01=a40_0x3d35e3,_0x122c2a=getServiceRegistryPath(_0x3f8ca8);if(!existsSync(_0x122c2a))return emptyServiceRegistryInspection(_0x122c2a,_0x12ff01(0x18b),![]);try{const _0x187952=readFileSync(_0x122c2a,'utf8');if(!_0x187952[_0x12ff01(0x1a1)]())return emptyServiceRegistryInspection(_0x122c2a,_0x12ff01(0x183),!![]);const _0x268936=JSON['parse'](_0x187952);if(_0x268936[_0x12ff01(0x1b1)]!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x122c2a,_0x12ff01(0x16d),!![]),'schemaVersion':_0x268936[_0x12ff01(0x1b1)],'message':_0x12ff01(0x1bb)+String(_0x268936[_0x12ff01(0x1b1)])};if(!Array[_0x12ff01(0x1a9)](_0x268936[_0x12ff01(0x1b7)]))return{...emptyServiceRegistryInspection(_0x122c2a,_0x12ff01(0x16d),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x268936[_0x12ff01(0x181)],'message':_0x12ff01(0x1aa)};const _0x2fefba=_0x268936['services'][_0x12ff01(0x19f)](summarizeLocalServiceEntry);return{'registryPath':_0x122c2a,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x268936[_0x12ff01(0x181)],'serviceCount':_0x2fefba[_0x12ff01(0x1b2)],'commandCount':_0x2fefba[_0x12ff01(0x19c)]((_0x51177c,_0x12a432)=>_0x51177c+_0x12a432[_0x12ff01(0x18e)],0x0),'services':_0x2fefba};}catch(_0x415bf3){return{...emptyServiceRegistryInspection(_0x122c2a,'invalid',!![]),'message':_0x415bf3 instanceof Error?_0x415bf3[_0x12ff01(0x1bd)]:String(_0x415bf3)};}}export function formatValidationFailure(_0x50e94f){const _0x4b665b=a40_0x3d35e3,_0x2c71ad=_0x50e94f[_0x4b665b(0x1bf)][_0x4b665b(0x19f)](_0x1b9e55=>_0x1b9e55[_0x4b665b(0x1a6)]+':\x20'+_0x1b9e55[_0x4b665b(0x1bd)]);return _0x4b665b(0x19d)+_0x2c71ad['join']('\x0a');}function extractLoadedServiceManifests(_0x4044b0,_0xc7f7da){const _0x417e37=a40_0x3d35e3;if(!isServiceRegistryLike(_0x4044b0)){const _0x41361f=_0x4044b0,_0x380af3=validateServiceTreeManifest(_0x41361f);return[{'manifest':_0x41361f,'report':_0x380af3,'normalizedManifest':_0x380af3['ok']?normalizeServiceTreeManifest(_0x41361f):undefined,'sourceHash':_0xc7f7da}];}return _0x4044b0[_0x417e37(0x1b7)][_0x417e37(0x19f)]((_0x379bcf,_0x38e343)=>{const _0x190378=_0x417e37,_0x5a68a0=isObjectRecord(_0x379bcf)?_0x379bcf[_0x190378(0x186)]:undefined,_0x5be46a=validateServiceTreeManifest(_0x5a68a0),_0x12c2ab=isObjectRecord(_0x379bcf)&&typeof _0x379bcf[_0x190378(0x19b)]===_0x190378(0x1a4)?_0x379bcf[_0x190378(0x19b)]:undefined;return{'manifest':_0x5a68a0,'report':_0x5be46a,'normalizedManifest':_0x5be46a['ok']?normalizeServiceTreeManifest(_0x5a68a0):undefined,'sourceHash':sha256(JSON[_0x190378(0x1ba)](_0x5a68a0,null,0x2)+'\x0a'),'registryIndex':_0x38e343,'registryServiceCode':_0x12c2ab};});}function aggregateValidationReports(_0xc03a84){const _0x2479a2=a40_0x3d35e3,_0x56e0b5=_0xc03a84[_0x2479a2(0x1ae)](_0x318503=>_0x318503['registryIndex']===undefined?_0x318503[_0x2479a2(0x1a3)][_0x2479a2(0x1bf)]:_0x318503['report']['errors']['map'](_0x472d94=>({..._0x472d94,'path':prefixRegistryIssuePath(_0x318503[_0x2479a2(0x18d)],_0x472d94[_0x2479a2(0x1a6)])}))),_0x5ef368=_0xc03a84[_0x2479a2(0x1ae)](_0xa75096=>_0xa75096[_0x2479a2(0x18d)]===undefined?_0xa75096['report']['warnings']:_0xa75096[_0x2479a2(0x1a3)]['warnings'][_0x2479a2(0x19f)](_0x42924d=>({..._0x42924d,'path':prefixRegistryIssuePath(_0xa75096['registryIndex'],_0x42924d['path'])})));return{'ok':_0x56e0b5['length']===0x0,'errors':_0x56e0b5,'warnings':_0x5ef368};}function a40_0x2f9d(){const _0x1c83ef=['path','utf8','].manifest','isArray','services\x20must\x20be\x20an\x20array','now','command','service','flatMap','cliPath','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','schemaVersion','length','Remove\x20or\x20migrate\x20','startsWith','ENOENT','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','services','Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.','commands','stringify','Unsupported\x20schemaVersion:\x20','description','message','service.json','errors','Local\x20service\x20not\x20found:\x20','invalid','normalizedManifest','slice','30aemQNJ','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','3374307edtOpR','registry','source','9892lKgeZZ','1454736tMCziK','name','validation','.tmp','1529525bCnFlz','parse','update','Service\x20manifest\x20file\x20not\x20found:\x20','version','findIndex','sourceHash','updatedAt','kind','empty','code','].manifest.','manifest','CliError','hex','1715442xeQZsm','risk','missing','Invalid\x20service\x20registry\x20JSON:\x20','registryIndex','commandCount','$.services[','find','243999IOkWMl','push','63644elGHZn','Cannot\x20write\x20service\x20registry:\x20','target','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','importedAt','object','manifests','toISOString','serviceCode','reduce','Service\x20manifest\x20validation\x20failed:\x0a','2WNSiRt','map','homeDirName','trim','Unsupported\x20service\x20registry\x20schemaVersion:\x20','report','string','homeDir'];a40_0x2f9d=function(){return _0x1c83ef;};return a40_0x2f9d();}function prefixRegistryIssuePath(_0x46f780,_0x5356c1){const _0x5de6ba=a40_0x3d35e3;if(_0x5356c1==='$')return _0x5de6ba(0x18f)+_0x46f780+_0x5de6ba(0x1a8);if(_0x5356c1[_0x5de6ba(0x1b4)]('$.'))return _0x5de6ba(0x18f)+_0x46f780+_0x5de6ba(0x1a8)+_0x5356c1[_0x5de6ba(0x16f)](0x1);if(_0x5356c1['startsWith']('$['))return _0x5de6ba(0x18f)+_0x46f780+_0x5de6ba(0x1a8)+_0x5356c1[_0x5de6ba(0x16f)](0x1);return _0x5de6ba(0x18f)+_0x46f780+_0x5de6ba(0x185)+_0x5356c1;}function isServiceRegistryLike(_0x413b2d){const _0x489d20=a40_0x3d35e3;return isObjectRecord(_0x413b2d)&&_0x413b2d[_0x489d20(0x1b1)]===SERVICE_REGISTRY_SCHEMA_VERSION&&Array[_0x489d20(0x1a9)](_0x413b2d['services']);}function isObjectRecord(_0x22931a){const _0x3d9365=a40_0x3d35e3;return Boolean(_0x22931a)&&typeof _0x22931a===_0x3d9365(0x198)&&!Array[_0x3d9365(0x1a9)](_0x22931a);}function emptyServiceRegistryInspection(_0x4fa522,_0xe0928,_0x4c717f){return{'registryPath':_0x4fa522,'exists':_0x4c717f,'status':_0xe0928,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x4a077c){const _0xb7e875=a40_0x3d35e3,_0x5c559a=_0x4a077c[_0xb7e875(0x16e)],_0x51fa42=_0x5c559a[_0xb7e875(0x1b9)][_0xb7e875(0x19f)](_0x2ee7f6=>({'path':_0x2ee7f6[_0xb7e875(0x1af)],'description':_0x2ee7f6[_0xb7e875(0x1bc)],'risk':_0x2ee7f6[_0xb7e875(0x18a)],'targetKind':_0x2ee7f6[_0xb7e875(0x195)][_0xb7e875(0x182)],'targetCommand':_0x2ee7f6[_0xb7e875(0x195)][_0xb7e875(0x1ac)]}));return{'serviceCode':_0x4a077c[_0xb7e875(0x19b)],'name':_0x5c559a['service'][_0xb7e875(0x177)],'description':_0x5c559a['service'][_0xb7e875(0x1bc)],'version':_0x4a077c['version'],'importedAt':_0x4a077c[_0xb7e875(0x197)],'source':_0x4a077c[_0xb7e875(0x174)],'commandCount':_0x51fa42[_0xb7e875(0x1b2)],'commands':_0x51fa42};}function sha256(_0x3584a5){const _0x458c6a=a40_0x3d35e3;return createHash('sha256')[_0x458c6a(0x17c)](_0x3584a5)['digest'](_0x458c6a(0x188));}
|
|
1
|
+
(function(_0x4f26d0,_0x365b64){const _0x58b879=a40_0x33c9,_0xc96eb5=_0x4f26d0();while(!![]){try{const _0x5d083f=-parseInt(_0x58b879(0x1b9))/0x1*(-parseInt(_0x58b879(0x1af))/0x2)+parseInt(_0x58b879(0x1bc))/0x3*(-parseInt(_0x58b879(0x1a0))/0x4)+-parseInt(_0x58b879(0x19a))/0x5+-parseInt(_0x58b879(0x1ca))/0x6*(-parseInt(_0x58b879(0x1c6))/0x7)+-parseInt(_0x58b879(0x1bd))/0x8*(-parseInt(_0x58b879(0x19b))/0x9)+-parseInt(_0x58b879(0x1c7))/0xa+-parseInt(_0x58b879(0x1cb))/0xb;if(_0x5d083f===_0x365b64)break;else _0xc96eb5['push'](_0xc96eb5['shift']());}catch(_0x67ee2c){_0xc96eb5['push'](_0xc96eb5['shift']());}}}(a40_0x7ae5,0xc3424));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 a40_0x7ae5(){const _0x2d68c2=['Local\x20service\x20not\x20found:\x20','service','homeDir','digest','1203410InotaS','1625553MWkmss','hex','toISOString','Unsupported\x20schemaVersion:\x20','reduce','8AAwrXl','source','Cannot\x20write\x20service\x20registry:\x20','target','length','report','file','sort','Service\x20registry\x20has\x20no\x20services\x20to\x20import.','Invalid\x20service\x20manifest\x20JSON:\x20','sha256','parse','.tmp','version','CliError','3096494RnIzYJ','isArray','findIndex','registry','message','invalid','normalizedManifest','startsWith','path','validation','1DWMSHt','utf8','].manifest','847086OaRhLJ','32ndlYIJ','updatedAt','Fix\x20the\x20service\x20manifest\x20and\x20run\x20service\x20validate\x20again.','registryIndex','empty','update','$.services[','Add\x20at\x20least\x20one\x20service\x20manifest,\x20then\x20run\x20service\x20import\x20again.','stringify','12901zBiRfn','6489140ROoOTG','code','Run\x20lovrabet\x20service\x20list\x20to\x20see\x20imported\x20services.','3138yQqpjy','10785544jTCuxW','services','join','trim','manifests','kind','filePath','serviceCode','map','importedAt','Unsupported\x20service\x20registry\x20schemaVersion:\x20','push','errors','splice','flatMap','warnings','schemaVersion','commands','ENOENT','manifest','Fix\x20the\x20JSON\x20file\x20or\x20move\x20it\x20aside\x20and\x20import\x20services\x20again.','risk','description'];a40_0x7ae5=function(){return _0x2d68c2;};return a40_0x7ae5();}export const SERVICE_REGISTRY_SCHEMA_VERSION=0x1;export const SERVICE_REGISTRY_FILE_NAME='service.json';export function getServiceRegistryPath(_0x1d83e1={}){const _0x3906ec=a40_0x33c9;return resolve(_0x1d83e1[_0x3906ec(0x1e4)]??homedir(),PRODUCT_CONFIG['homeDirName'],SERVICE_REGISTRY_FILE_NAME);}export function emptyServiceRegistry(){return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'services':[]};}export function readServiceRegistry(_0x299929={}){const _0x24a89c=a40_0x33c9,_0x5db391=getServiceRegistryPath(_0x299929);if(!existsSync(_0x5db391))return emptyServiceRegistry();try{const _0x47e20c=readFileSync(_0x5db391,_0x24a89c(0x1ba));if(!_0x47e20c[_0x24a89c(0x1ce)]())return emptyServiceRegistry();const _0x52a804=JSON[_0x24a89c(0x1ab)](_0x47e20c);if(_0x52a804[_0x24a89c(0x1db)]!==SERVICE_REGISTRY_SCHEMA_VERSION)throw CliErrors[_0x24a89c(0x1b8)](_0x24a89c(0x1d5)+String(_0x52a804[_0x24a89c(0x1db)]),'Remove\x20or\x20migrate\x20'+_0x5db391+'.');if(!Array['isArray'](_0x52a804[_0x24a89c(0x1cc)]))return emptyServiceRegistry();return{'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x52a804[_0x24a89c(0x1be)],'services':_0x52a804[_0x24a89c(0x1cc)]};}catch(_0x29fea8){if(_0x29fea8 instanceof Error&&_0x29fea8['name']===_0x24a89c(0x1ae))throw _0x29fea8;throw CliErrors['validation']('Invalid\x20service\x20registry\x20JSON:\x20'+_0x5db391,_0x24a89c(0x1df));}}export function writeServiceRegistry(_0x1a7bb4,_0x3fd728={}){const _0x156ae1=a40_0x33c9,_0xc0caa0=getServiceRegistryPath(_0x3fd728),_0x1aafa7=dirname(_0xc0caa0);!existsSync(_0x1aafa7)&&mkdirSync(_0x1aafa7,{'recursive':!![]});const _0x23a73d=_0xc0caa0+_0x156ae1(0x1ac);try{writeFileSync(_0x23a73d,JSON['stringify'](_0x1a7bb4,null,0x2)+'\x0a',{'encoding':_0x156ae1(0x1ba),'mode':0x180}),renameSync(_0x23a73d,_0xc0caa0);}catch(_0x1f619e){try{unlinkSync(_0x23a73d);}catch{}if(_0x1f619e?.[_0x156ae1(0x1c8)]===_0x156ae1(0x1dd))throw CliErrors['validation'](_0x156ae1(0x1a2)+_0xc0caa0);throw _0x1f619e;}return _0xc0caa0;}export function loadServiceManifestFromFile(_0x5e0ac6){const _0x2e4112=a40_0x33c9,_0x3e19a6=resolve(_0x5e0ac6);if(!existsSync(_0x3e19a6))throw CliErrors[_0x2e4112(0x1b8)]('Service\x20manifest\x20file\x20not\x20found:\x20'+_0x5e0ac6);let _0x52586f;const _0x4935cb=readFileSync(_0x3e19a6,_0x2e4112(0x1ba));try{_0x52586f=JSON[_0x2e4112(0x1ab)](_0x4935cb);}catch{throw CliErrors[_0x2e4112(0x1b8)](_0x2e4112(0x1a9)+_0x5e0ac6,'Fix\x20the\x20JSON\x20syntax\x20and\x20run\x20service\x20validate\x20again.');}const _0x38a857=sha256(_0x4935cb),_0x2f0f79=extractLoadedServiceManifests(_0x52586f,_0x38a857),_0xb2d54a=aggregateValidationReports(_0x2f0f79),_0x1aaeaa=_0x2f0f79[0x0];return{'filePath':_0x3e19a6,'hash':_0x38a857,'kind':isServiceRegistryLike(_0x52586f)?_0x2e4112(0x1b2):_0x2e4112(0x1de),'manifest':_0x1aaeaa?.['manifest']??_0x52586f,'report':_0xb2d54a,'normalizedManifest':_0x2f0f79['length']===0x1?_0x1aaeaa?.[_0x2e4112(0x1b5)]:undefined,'manifests':_0x2f0f79};}export function importServiceManifest(_0x1a7e99,_0x3ec593={}){const _0x5f2adf=a40_0x33c9,_0x4aa1d6=loadServiceManifestFromFile(_0x1a7e99);if(!_0x4aa1d6[_0x5f2adf(0x1a5)]['ok'])throw CliErrors[_0x5f2adf(0x1b8)](formatValidationFailure(_0x4aa1d6[_0x5f2adf(0x1a5)]),_0x5f2adf(0x1bf));if(_0x4aa1d6['manifests'][_0x5f2adf(0x1a4)]===0x0)throw CliErrors[_0x5f2adf(0x1b8)](_0x5f2adf(0x1a8),_0x5f2adf(0x1c4));const _0x248d53=readServiceRegistry(_0x3ec593),_0x11143a=(_0x3ec593['now']??(()=>new Date()))()[_0x5f2adf(0x19d)](),_0x29bb3a=[];let _0x69b2fd=0x0,_0x32daf1=0x0;for(const _0x3b73ba of _0x4aa1d6[_0x5f2adf(0x1cf)]){if(!_0x3b73ba[_0x5f2adf(0x1b5)])continue;const _0x3b71de=_0x3b73ba[_0x5f2adf(0x1b5)][_0x5f2adf(0x1e3)][_0x5f2adf(0x1c8)],_0x5ecac1={'serviceCode':_0x3b71de,'version':_0x3b73ba[_0x5f2adf(0x1b5)]['version'],'importedAt':_0x11143a,'source':{'type':_0x5f2adf(0x1a6),'path':_0x4aa1d6[_0x5f2adf(0x1d1)],'hash':_0x3b73ba['sourceHash']},'manifest':_0x3b73ba[_0x5f2adf(0x1de)],'normalizedManifest':_0x3b73ba[_0x5f2adf(0x1b5)]},_0x437b43=_0x248d53[_0x5f2adf(0x1cc)][_0x5f2adf(0x1b1)](_0x20bb13=>_0x20bb13[_0x5f2adf(0x1d2)]===_0x3b71de);_0x437b43>=0x0?(_0x248d53['services'][_0x437b43]=_0x5ecac1,_0x32daf1++):(_0x248d53[_0x5f2adf(0x1cc)][_0x5f2adf(0x1d6)](_0x5ecac1),_0x69b2fd++),_0x29bb3a[_0x5f2adf(0x1d6)](_0x5ecac1);}_0x248d53[_0x5f2adf(0x1cc)][_0x5f2adf(0x1a7)]((_0x4ce7d7,_0x12b158)=>_0x4ce7d7[_0x5f2adf(0x1d2)]['localeCompare'](_0x12b158[_0x5f2adf(0x1d2)])),_0x248d53[_0x5f2adf(0x1be)]=_0x11143a;const _0xa65030=writeServiceRegistry(_0x248d53,_0x3ec593);return{'registryPath':_0xa65030,'entry':_0x29bb3a[0x0],'replaced':_0x29bb3a[_0x5f2adf(0x1a4)]===0x1?_0x32daf1===0x1:_0x32daf1>0x0,'entries':_0x29bb3a,'imported':_0x69b2fd,'updated':_0x32daf1,'serviceCount':_0x248d53[_0x5f2adf(0x1cc)]['length']};}export function exportServiceManifest(_0x3da79b,_0x457a26,_0x454792={}){const _0x15b58d=a40_0x33c9,_0x140b7d=getServiceRegistryPath(_0x454792),_0x4c95b9=getLocalServiceEntry(_0x3da79b,_0x454792);if(!_0x4c95b9)throw CliErrors['validation'](_0x15b58d(0x1e2)+_0x3da79b,_0x15b58d(0x1c9));const _0x38c98d=resolve(_0x457a26),_0x3646aa=dirname(_0x38c98d);return!existsSync(_0x3646aa)&&mkdirSync(_0x3646aa,{'recursive':!![]}),writeFileSync(_0x38c98d,JSON[_0x15b58d(0x1c5)](_0x4c95b9[_0x15b58d(0x1de)],null,0x2)+'\x0a',{'encoding':_0x15b58d(0x1ba),'mode':0x180}),{'registryPath':_0x140b7d,'filePath':_0x38c98d,'entry':_0x4c95b9};}function a40_0x33c9(_0x5b49d2,_0x141e77){_0x5b49d2=_0x5b49d2-0x199;const _0x7ae501=a40_0x7ae5();let _0x33c96c=_0x7ae501[_0x5b49d2];return _0x33c96c;}export function removeServiceManifest(_0x593ca6,_0x45a650={}){const _0x12e6c1=a40_0x33c9,_0x1d47d2=readServiceRegistry(_0x45a650),_0x5fd58e=_0x593ca6[_0x12e6c1(0x1ce)](),_0x5a4470=_0x1d47d2[_0x12e6c1(0x1cc)][_0x12e6c1(0x1b1)](_0x68312e=>_0x68312e[_0x12e6c1(0x1d2)]===_0x5fd58e);if(_0x5a4470<0x0)throw CliErrors['validation'](_0x12e6c1(0x1e2)+_0x5fd58e,_0x12e6c1(0x1c9));const [_0x2049f7]=_0x1d47d2[_0x12e6c1(0x1cc)][_0x12e6c1(0x1d8)](_0x5a4470,0x1),_0x27c159=(_0x45a650['now']??(()=>new Date()))()[_0x12e6c1(0x19d)]();_0x1d47d2['updatedAt']=_0x27c159;const _0x257cc5=writeServiceRegistry(_0x1d47d2,_0x45a650);return{'registryPath':_0x257cc5,'entry':_0x2049f7,'serviceCount':_0x1d47d2[_0x12e6c1(0x1cc)][_0x12e6c1(0x1a4)]};}export function listLocalServices(_0x252632={}){return readServiceRegistry(_0x252632)['services'];}export function getLocalServiceEntry(_0x3f5413,_0x2dcdd8={}){const _0x303700=a40_0x33c9;return readServiceRegistry(_0x2dcdd8)[_0x303700(0x1cc)]['find'](_0x1fd986=>_0x1fd986[_0x303700(0x1d2)]===_0x3f5413[_0x303700(0x1ce)]());}export function listLocalServiceTrees(_0x562d2c={}){const _0x5c93e7=a40_0x33c9;return readServiceRegistry(_0x562d2c)['services'][_0x5c93e7(0x1d3)](_0x50b479=>_0x50b479[_0x5c93e7(0x1b5)]);}export function inspectServiceRegistry(_0x1b3023={}){const _0x21d0d0=a40_0x33c9,_0x5041e2=getServiceRegistryPath(_0x1b3023);if(!existsSync(_0x5041e2))return emptyServiceRegistryInspection(_0x5041e2,'missing',![]);try{const _0x8b86fd=readFileSync(_0x5041e2,_0x21d0d0(0x1ba));if(!_0x8b86fd['trim']())return emptyServiceRegistryInspection(_0x5041e2,_0x21d0d0(0x1c1),!![]);const _0x18f931=JSON[_0x21d0d0(0x1ab)](_0x8b86fd);if(_0x18f931['schemaVersion']!==SERVICE_REGISTRY_SCHEMA_VERSION)return{...emptyServiceRegistryInspection(_0x5041e2,'invalid',!![]),'schemaVersion':_0x18f931[_0x21d0d0(0x1db)],'message':_0x21d0d0(0x19e)+String(_0x18f931[_0x21d0d0(0x1db)])};if(!Array[_0x21d0d0(0x1b0)](_0x18f931[_0x21d0d0(0x1cc)]))return{...emptyServiceRegistryInspection(_0x5041e2,_0x21d0d0(0x1b4),!![]),'schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x18f931[_0x21d0d0(0x1be)],'message':'services\x20must\x20be\x20an\x20array'};const _0x3bcbd2=_0x18f931[_0x21d0d0(0x1cc)][_0x21d0d0(0x1d3)](summarizeLocalServiceEntry);return{'registryPath':_0x5041e2,'exists':!![],'status':'ok','schemaVersion':SERVICE_REGISTRY_SCHEMA_VERSION,'updatedAt':_0x18f931[_0x21d0d0(0x1be)],'serviceCount':_0x3bcbd2[_0x21d0d0(0x1a4)],'commandCount':_0x3bcbd2[_0x21d0d0(0x19f)]((_0x3c45e4,_0x3bcc80)=>_0x3c45e4+_0x3bcc80['commandCount'],0x0),'services':_0x3bcbd2};}catch(_0x5234e2){return{...emptyServiceRegistryInspection(_0x5041e2,_0x21d0d0(0x1b4),!![]),'message':_0x5234e2 instanceof Error?_0x5234e2[_0x21d0d0(0x1b3)]:String(_0x5234e2)};}}export function formatValidationFailure(_0x32d700){const _0x21750d=a40_0x33c9,_0x58925f=_0x32d700[_0x21750d(0x1d7)]['map'](_0x24b6c2=>_0x24b6c2[_0x21750d(0x1b7)]+':\x20'+_0x24b6c2['message']);return'Service\x20manifest\x20validation\x20failed:\x0a'+_0x58925f[_0x21750d(0x1cd)]('\x0a');}function extractLoadedServiceManifests(_0x49573b,_0x58b9f8){const _0x4f0df2=a40_0x33c9;if(!isServiceRegistryLike(_0x49573b)){const _0x7f51d0=_0x49573b,_0x1d0aea=validateServiceTreeManifest(_0x7f51d0);return[{'manifest':_0x7f51d0,'report':_0x1d0aea,'normalizedManifest':_0x1d0aea['ok']?normalizeServiceTreeManifest(_0x7f51d0):undefined,'sourceHash':_0x58b9f8}];}return _0x49573b['services'][_0x4f0df2(0x1d3)]((_0x3d02f3,_0x100f24)=>{const _0x4a9d20=_0x4f0df2,_0x6fa2d5=isObjectRecord(_0x3d02f3)?_0x3d02f3['manifest']:undefined,_0x1a3b55=validateServiceTreeManifest(_0x6fa2d5),_0x33e837=isObjectRecord(_0x3d02f3)&&typeof _0x3d02f3[_0x4a9d20(0x1d2)]==='string'?_0x3d02f3[_0x4a9d20(0x1d2)]:undefined;return{'manifest':_0x6fa2d5,'report':_0x1a3b55,'normalizedManifest':_0x1a3b55['ok']?normalizeServiceTreeManifest(_0x6fa2d5):undefined,'sourceHash':sha256(JSON[_0x4a9d20(0x1c5)](_0x6fa2d5,null,0x2)+'\x0a'),'registryIndex':_0x100f24,'registryServiceCode':_0x33e837};});}function aggregateValidationReports(_0x1682e8){const _0xe0b3ca=a40_0x33c9,_0x2a0f93=_0x1682e8[_0xe0b3ca(0x1d9)](_0x3ee115=>_0x3ee115[_0xe0b3ca(0x1c0)]===undefined?_0x3ee115[_0xe0b3ca(0x1a5)]['errors']:_0x3ee115[_0xe0b3ca(0x1a5)][_0xe0b3ca(0x1d7)][_0xe0b3ca(0x1d3)](_0x4df44e=>({..._0x4df44e,'path':prefixRegistryIssuePath(_0x3ee115['registryIndex'],_0x4df44e[_0xe0b3ca(0x1b7)])}))),_0x25d9bc=_0x1682e8[_0xe0b3ca(0x1d9)](_0x2dfa6b=>_0x2dfa6b['registryIndex']===undefined?_0x2dfa6b['report'][_0xe0b3ca(0x1da)]:_0x2dfa6b[_0xe0b3ca(0x1a5)][_0xe0b3ca(0x1da)]['map'](_0x263607=>({..._0x263607,'path':prefixRegistryIssuePath(_0x2dfa6b['registryIndex'],_0x263607[_0xe0b3ca(0x1b7)])})));return{'ok':_0x2a0f93['length']===0x0,'errors':_0x2a0f93,'warnings':_0x25d9bc};}function prefixRegistryIssuePath(_0x2c9e49,_0x369a6a){const _0x4998fa=a40_0x33c9;if(_0x369a6a==='$')return'$.services['+_0x2c9e49+_0x4998fa(0x1bb);if(_0x369a6a[_0x4998fa(0x1b6)]('$.'))return _0x4998fa(0x1c3)+_0x2c9e49+_0x4998fa(0x1bb)+_0x369a6a['slice'](0x1);if(_0x369a6a['startsWith']('$['))return _0x4998fa(0x1c3)+_0x2c9e49+_0x4998fa(0x1bb)+_0x369a6a['slice'](0x1);return _0x4998fa(0x1c3)+_0x2c9e49+'].manifest.'+_0x369a6a;}function isServiceRegistryLike(_0x208f78){const _0x438de0=a40_0x33c9;return isObjectRecord(_0x208f78)&&_0x208f78['schemaVersion']===SERVICE_REGISTRY_SCHEMA_VERSION&&Array['isArray'](_0x208f78[_0x438de0(0x1cc)]);}function isObjectRecord(_0xb90917){return Boolean(_0xb90917)&&typeof _0xb90917==='object'&&!Array['isArray'](_0xb90917);}function emptyServiceRegistryInspection(_0x13704f,_0x4cccac,_0x11f179){return{'registryPath':_0x13704f,'exists':_0x11f179,'status':_0x4cccac,'serviceCount':0x0,'commandCount':0x0,'services':[]};}function summarizeLocalServiceEntry(_0x1415ec){const _0x1b8f70=a40_0x33c9,_0x18e663=_0x1415ec['normalizedManifest'],_0x5bdd93=_0x18e663[_0x1b8f70(0x1dc)][_0x1b8f70(0x1d3)](_0x1a6e73=>({'path':_0x1a6e73['cliPath'],'description':_0x1a6e73[_0x1b8f70(0x1e1)],'risk':_0x1a6e73[_0x1b8f70(0x1e0)],'targetKind':_0x1a6e73[_0x1b8f70(0x1a3)][_0x1b8f70(0x1d0)],'targetCommand':_0x1a6e73[_0x1b8f70(0x1a3)]['command']}));return{'serviceCode':_0x1415ec[_0x1b8f70(0x1d2)],'name':_0x18e663[_0x1b8f70(0x1e3)]['name'],'description':_0x18e663['service'][_0x1b8f70(0x1e1)],'version':_0x1415ec[_0x1b8f70(0x1ad)],'importedAt':_0x1415ec[_0x1b8f70(0x1d4)],'source':_0x1415ec[_0x1b8f70(0x1a1)],'commandCount':_0x5bdd93[_0x1b8f70(0x1a4)],'commands':_0x5bdd93};}function sha256(_0x357edf){const _0x2d24f8=a40_0x33c9;return createHash(_0x2d24f8(0x1aa))[_0x2d24f8(0x1c2)](_0x357edf)[_0x2d24f8(0x199)](_0x2d24f8(0x19c));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a41_0x2f1e8d=a41_0x35c3;(function(_0x549370,_0x4ea45a){const _0x552497=a41_0x35c3,_0x2ca9ad=_0x549370();while(!![]){try{const _0x4c29d7=parseInt(_0x552497(0x98))/0x1+-parseInt(_0x552497(0x8c))/0x2*(parseInt(_0x552497(0xa6))/0x3)+-parseInt(_0x552497(0x9b))/0x4+-parseInt(_0x552497(0x87))/0x5+-parseInt(_0x552497(0x95))/0x6+-parseInt(_0x552497(0xa3))/0x7*(parseInt(_0x552497(0x90))/0x8)+parseInt(_0x552497(0xa1))/0x9;if(_0x4c29d7===_0x4ea45a)break;else _0x2ca9ad['push'](_0x2ca9ad['shift']());}catch(_0x87ad10){_0x2ca9ad['push'](_0x2ca9ad['shift']());}}}(a41_0x4684,0xea319));import{existsSync,lstatSync,mkdirSync,writeFileSync}from'node:fs';function a41_0x4684(){const _0x33505b=['target','content','29373525xUnRuc','skillName','91euGOfB','Skill\x20path\x20already\x20exists\x20and\x20is\x20not\x20a\x20writable\x20directory:\x20','isSymbolicLink','10938CVrnPd','type','8446755BpnZeD','name','Create\x20a\x20local\x20runtime\x20Skill\x20draft\x20without\x20uploading\x20or\x20publishing\x20it.','map','trim','134VOixFv','bool','str','path','222032gcsuit','rendered','skillDir','Pass\x20--force\x20to\x20overwrite\x20generated\x20template\x20files.','validation','3253590toWtyJ','utf8','Created\x20local\x20Skill\x20draft\x20','838554LGZtWJ','create','files','1225288EOSrwM','Skill\x20directory\x20already\x20exists:\x20','force','Refusing\x20to\x20overwrite\x20symlink:\x20'];a41_0x4684=function(){return _0x33505b;};return a41_0x4684();}import{dirname,resolve}from'node:path';import{CliErrors}from'../../../errors.js';import{CREATE_NAME_FLAG,FORCE_FLAG,TARGET_FLAG,TYPE_FLAG}from'../flags.js';import{DEFAULT_SKILL_TARGET,renderSkillTemplate}from'../templates.js';export const createCommand={'service':'skill','command':a41_0x2f1e8d(0x99),'description':'Create\x20a\x20local\x20self-contained\x20runtime\x20Skill\x20draft','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[CREATE_NAME_FLAG,TYPE_FLAG,TARGET_FLAG,FORCE_FLAG],async 'dryRun'(_0xe8d73f){const _0x1b926a=a41_0x2f1e8d,_0x579914=buildSkillCreatePlan(_0xe8d73f['str']('name'),_0xe8d73f[_0x1b926a(0x8e)]('type'),_0xe8d73f[_0x1b926a(0x8e)](_0x1b926a(0x9f)));return{'method':'WRITE','url':_0x579914[_0x1b926a(0x92)],'body':{'skillName':_0x579914[_0x1b926a(0x91)][_0x1b926a(0xa2)],'type':_0x579914[_0x1b926a(0x91)][_0x1b926a(0x86)],'selfContained':!![],'files':_0x579914['rendered'][_0x1b926a(0x9a)][_0x1b926a(0x8a)](_0x241233=>_0x241233[_0x1b926a(0x8f)])},'description':_0x1b926a(0x89)};},async 'execute'(_0x1fae88){const _0x83cce9=a41_0x2f1e8d,_0x4fca4a=buildSkillCreatePlan(_0x1fae88[_0x83cce9(0x8e)](_0x83cce9(0x88)),_0x1fae88['str'](_0x83cce9(0x86)),_0x1fae88[_0x83cce9(0x8e)](_0x83cce9(0x9f)));return writeSkillDraft(_0x4fca4a,_0x1fae88[_0x83cce9(0x8d)](_0x83cce9(0x9d))),{'ok':!![],'data':{'skillName':_0x4fca4a[_0x83cce9(0x91)][_0x83cce9(0xa2)],'type':_0x4fca4a[_0x83cce9(0x91)][_0x83cce9(0x86)],'dir':_0x4fca4a['skillDir'],'files':_0x4fca4a[_0x83cce9(0x91)][_0x83cce9(0x9a)][_0x83cce9(0x8a)](_0x3f3426=>_0x3f3426['path'])},'message':_0x83cce9(0x97)+_0x4fca4a['rendered'][_0x83cce9(0xa2)]};}};function buildSkillCreatePlan(_0x9fe2d2,_0x89ff91,_0x182ea2){const _0x38eea5=a41_0x2f1e8d,_0x3e8642=renderSkillTemplate({'skillName':_0x9fe2d2,'type':_0x89ff91}),_0x41c0df=resolve(normalizeSkillTarget(_0x182ea2));return{'rendered':_0x3e8642,'targetRoot':_0x41c0df,'skillDir':resolve(_0x41c0df,_0x3e8642[_0x38eea5(0xa2)])};}function normalizeSkillTarget(_0x13e011){const _0x11dc0b=a41_0x2f1e8d;return(_0x13e011||DEFAULT_SKILL_TARGET)[_0x11dc0b(0x8b)]()||DEFAULT_SKILL_TARGET;}function a41_0x35c3(_0x3a080e,_0x33b899){_0x3a080e=_0x3a080e-0x86;const _0x4684b4=a41_0x4684();let _0x35c37a=_0x4684b4[_0x3a080e];return _0x35c37a;}function writeSkillDraft(_0x50b095,_0x1c4d20){const _0x153a80=a41_0x2f1e8d;if(existsSync(_0x50b095[_0x153a80(0x92)])){const _0x37bee1=lstatSync(_0x50b095[_0x153a80(0x92)]);if(!_0x37bee1['isDirectory']()||_0x37bee1['isSymbolicLink']())throw CliErrors[_0x153a80(0x94)](_0x153a80(0xa4)+_0x50b095['skillDir']);if(!_0x1c4d20)throw CliErrors[_0x153a80(0x94)](_0x153a80(0x9c)+_0x50b095[_0x153a80(0x92)],_0x153a80(0x93));}for(const _0xb74c61 of _0x50b095['rendered']['files']){const _0x1dae51=resolve(_0x50b095[_0x153a80(0x92)],_0xb74c61[_0x153a80(0x8f)]),_0x41c632=dirname(_0x1dae51);mkdirSync(_0x41c632,{'recursive':!![]});if(existsSync(_0x1dae51)&&lstatSync(_0x1dae51)[_0x153a80(0xa5)]())throw CliErrors[_0x153a80(0x94)](_0x153a80(0x9e)+_0x1dae51);writeFileSync(_0x1dae51,_0xb74c61[_0x153a80(0xa0)],_0x153a80(0x96));}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a42_0x3beb(_0x20529f,_0x174286){_0x20529f=_0x20529f-0x152;const _0x351178=a42_0x3511();let _0x3beb8d=_0x351178[_0x20529f];return _0x3beb8d;}const a42_0x4b9df5=a42_0x3beb;(function(_0x3c7f4a,_0x3befac){const _0x3bdccb=a42_0x3beb,_0x57d712=_0x3c7f4a();while(!![]){try{const _0x2fe724=-parseInt(_0x3bdccb(0x157))/0x1+-parseInt(_0x3bdccb(0x17b))/0x2+-parseInt(_0x3bdccb(0x173))/0x3+-parseInt(_0x3bdccb(0x15f))/0x4*(parseInt(_0x3bdccb(0x164))/0x5)+-parseInt(_0x3bdccb(0x177))/0x6+-parseInt(_0x3bdccb(0x158))/0x7*(parseInt(_0x3bdccb(0x17a))/0x8)+parseInt(_0x3bdccb(0x15d))/0x9;if(_0x2fe724===_0x3befac)break;else _0x57d712['push'](_0x57d712['shift']());}catch(_0x5ee778){_0x57d712['push'](_0x57d712['shift']());}}}(a42_0x3511,0xb25f1));import{CliErrors}from'../../../errors.js';function a42_0x3511(){const _0x4f8279=['force','version','created','code','filter','flatMap','\x20personal\x20and\x20','796659YBxGne','length','all','reduce','3926874GvpMPx','includes','Business\x20Skill\x20installation\x20requires\x20authentication.\x20Run\x20`lovrabet\x20auth\x20login`,\x20or\x20use\x20`lovrabet\x20cli-skill\x20install`\x20for\x20CLI\x20Built-in\x20Skill\x20setup.','2664BHmKPR','2082922QWEFWz','install','personal','../../../skills/runtime-skill-sync.js','appCode','push','186891zFwWrg','1267vvcdSI','Install\x20current-app\x20business\x20Skills\x20into\x20user-level\x20Agent\x20skill\x20directories','envName','action','write','29399760tupPVZ','skillCode','1309496DGINlF','removed','\x20company\x20Skill(s).','company','trim','5WOfnaw','scope','production','str','updated','authRequired','map','accessKey'];a42_0x3511=function(){return _0x4f8279;};return a42_0x3511();}import{CODE_FLAG,FORCE_FLAG,SCOPE_FLAG}from'../flags.js';import{normalizeSyncScopes}from'../scopes.js';import{summarizeRuntimeSkill}from'../summary.js';export const installCommand={'service':'skill','command':a42_0x4b9df5(0x152),'description':a42_0x4b9df5(0x159),'risk':a42_0x4b9df5(0x15c),'requiresAuth':!![],'requiresAppCode':!![],'hasFormat':![],'flags':[CODE_FLAG,SCOPE_FLAG,FORCE_FLAG],async 'execute'(_0x2d88e8){return syncRuntimeSkills(_0x2d88e8);}};async function syncRuntimeSkills(_0xe461ed){const _0x1721a9=a42_0x4b9df5,{downloadRuntimeSkillPackage:_0x5065fb,listRuntimeSkills:_0x3cbd70}=await import('../../../core/api-client.js'),{linkEffectiveRuntimeSkills:_0x2af181,materializeRuntimeSkill:_0x264ff6,pruneStaleRuntimeSkillCache:_0xf0c06f,pruneStaleRuntimeSkillLinks:_0x58449f}=await import(_0x1721a9(0x154)),_0xa21dc3=_0xe461ed[_0x1721a9(0x167)](_0x1721a9(0x16f)),_0x90f4b7=normalizeSyncScopes(_0xe461ed['str'](_0x1721a9(0x165))),_0x2e7c51=_0xe461ed[_0x1721a9(0x15a)]??_0x1721a9(0x166),_0x59601b=_0xe461ed[_0x1721a9(0x16b)],_0x4d9690=_0xe461ed['bool'](_0x1721a9(0x16c));if(!_0x59601b)throw CliErrors[_0x1721a9(0x169)](_0x1721a9(0x179));const _0xa452e8=await Promise[_0x1721a9(0x175)](_0x90f4b7['map'](_0xc38d8a=>_0x3cbd70({'appCode':_0xe461ed[_0x1721a9(0x155)],'scope':_0xc38d8a,'code':_0xa21dc3['trim']()||undefined}))),_0x25471c=_0x90f4b7[_0x1721a9(0x178)](_0x1721a9(0x153))?_0xa452e8[_0x1721a9(0x171)]((_0x45a507,_0x591565)=>_0x90f4b7[_0x591565]==='personal'?_0x45a507[_0x1721a9(0x153)]:[]):[],_0x4d0fdf=_0x90f4b7[_0x1721a9(0x178)](_0x1721a9(0x162))?_0xa452e8[_0x1721a9(0x171)]((_0x5d2603,_0x5534ed)=>_0x90f4b7[_0x5534ed]===_0x1721a9(0x162)?_0x5d2603[_0x1721a9(0x162)]:[]):[],_0x527b20=new Set([..._0x25471c[_0x1721a9(0x16a)](_0x849e7f=>_0x849e7f[_0x1721a9(0x15e)]?.['trim']())['filter'](_0x355036=>Boolean(_0x355036)),..._0x4d0fdf[_0x1721a9(0x16a)](_0x31aa51=>_0x31aa51['skillCode']?.[_0x1721a9(0x163)]())[_0x1721a9(0x170)](_0x52bb19=>Boolean(_0x52bb19))]),_0x24f6b8=_0xa21dc3[_0x1721a9(0x163)]()?[_0xa21dc3['trim']()]:undefined,_0x274756=_0x90f4b7[_0x1721a9(0x174)]===0x2&&_0x90f4b7[_0x1721a9(0x178)]('personal')&&_0x90f4b7[_0x1721a9(0x178)](_0x1721a9(0x162)),_0x18e182=_0x274756?_0x58449f(_0xe461ed[_0x1721a9(0x155)],_0x527b20,{},_0x24f6b8):[],_0x73bd5a=_0xf0c06f({'env':_0x2e7c51,'accessKey':_0x59601b,'appCode':_0xe461ed[_0x1721a9(0x155)],'activeSkillCodes':_0x527b20,'pruneSkillCodes':_0x24f6b8,'scopes':_0x90f4b7}),_0x4c3678=[];for(const _0x3d646c of _0x25471c){_0x4c3678['push'](_0x264ff6(_0x3d646c,_0x1721a9(0x153),{'env':_0x2e7c51,'accessKey':_0x59601b,'appCode':_0xe461ed['appCode'],'force':_0x4d9690,'packageBytes':await downloadSkillPackage(_0x3d646c,'personal',_0xe461ed['appCode'],_0x5065fb)}));}for(const _0x3029f5 of _0x4d0fdf){_0x4c3678[_0x1721a9(0x156)](_0x264ff6(_0x3029f5,_0x1721a9(0x162),{'env':_0x2e7c51,'accessKey':_0x59601b,'appCode':_0xe461ed[_0x1721a9(0x155)],'force':_0x4d9690,'packageBytes':await downloadSkillPackage(_0x3029f5,_0x1721a9(0x162),_0xe461ed[_0x1721a9(0x155)],_0x5065fb)}));}const _0x3e1b53=_0x2af181(_0x4c3678,_0xe461ed[_0x1721a9(0x155)]),_0x108724=countLinkActions(_0x3e1b53);return{'ok':!![],'data':{'appCode':_0xe461ed[_0x1721a9(0x155)],'personal':_0x25471c['length'],'company':_0x4d0fdf['length'],'materialized':_0x4c3678[_0x1721a9(0x174)],'links':{'total':_0x3e1b53[_0x1721a9(0x174)],'created':_0x108724[_0x1721a9(0x16e)]??0x0,'updated':_0x108724[_0x1721a9(0x168)]??0x0,'unchanged':_0x108724['unchanged']??0x0,'skipped':0x0,'conflicted':0x0},'pruned':{'links':_0x18e182[_0x1721a9(0x170)](_0x33f50b=>_0x33f50b[_0x1721a9(0x15b)]===_0x1721a9(0x160))[_0x1721a9(0x174)],'cacheDirs':_0x73bd5a[_0x1721a9(0x170)](_0x41f19b=>_0x41f19b[_0x1721a9(0x15b)]===_0x1721a9(0x160))['length'],'skipped':[..._0x18e182,..._0x73bd5a]['filter'](_0x5d8488=>_0x5d8488['action']==='skipped')[_0x1721a9(0x174)]},'skills':{'personal':_0x25471c[_0x1721a9(0x16a)](summarizeRuntimeSkill),'company':_0x4d0fdf['map'](summarizeRuntimeSkill)}},'message':'Installed\x20'+_0x25471c[_0x1721a9(0x174)]+_0x1721a9(0x172)+_0x4d0fdf['length']+_0x1721a9(0x161)};}async function downloadSkillPackage(_0x1678a7,_0x41b636,_0xf69431,_0x5586da){const _0x215c6d=a42_0x4b9df5,_0x38900f=_0x1678a7[_0x215c6d(0x16d)]?.[_0x215c6d(0x163)]();return _0x38900f?_0x5586da(_0x41b636,_0x1678a7['skillCode'],_0xf69431,_0x38900f):_0x5586da(_0x41b636,_0x1678a7['skillCode'],_0xf69431);}function countLinkActions(_0x3c6bc2){const _0x18f7f7=a42_0x4b9df5;return _0x3c6bc2[_0x18f7f7(0x176)]((_0x46a22c,_0x2b5ad7)=>{const _0x25d2b1=_0x18f7f7;return _0x46a22c[_0x2b5ad7['action']]=(_0x46a22c[_0x2b5ad7[_0x25d2b1(0x15b)]]??0x0)+0x1,_0x46a22c;},{});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a43_0x1d984b=a43_0x1f13;(function(_0x168b33,_0x288d41){const _0x1a2a9c=a43_0x1f13,_0x321535=_0x168b33();while(!![]){try{const _0x1992e7=-parseInt(_0x1a2a9c(0xa2))/0x1+-parseInt(_0x1a2a9c(0xb6))/0x2*(-parseInt(_0x1a2a9c(0xae))/0x3)+parseInt(_0x1a2a9c(0xb0))/0x4+parseInt(_0x1a2a9c(0xbe))/0x5*(-parseInt(_0x1a2a9c(0xad))/0x6)+-parseInt(_0x1a2a9c(0xa5))/0x7+parseInt(_0x1a2a9c(0xa7))/0x8*(parseInt(_0x1a2a9c(0xb3))/0x9)+parseInt(_0x1a2a9c(0xbd))/0xa*(-parseInt(_0x1a2a9c(0xa6))/0xb);if(_0x1992e7===_0x288d41)break;else _0x321535['push'](_0x321535['shift']());}catch(_0x54270f){_0x321535['push'](_0x321535['shift']());}}}(a43_0x4d86,0x2e219));import{CliErrors}from'../../../errors.js';import{CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG}from'../flags.js';import{listScopeToRemoteScope,listScopeToRuntimeScopes,normalizeListScope,shouldListScope}from'../scopes.js';import{summarizeLocalRuntimeSkill,summarizeRuntimeSkill}from'../summary.js';function a43_0x1f13(_0x3c6fb9,_0x270028){_0x3c6fb9=_0x3c6fb9-0xa2;const _0x4d86e1=a43_0x4d86();let _0x1f1377=_0x4d86e1[_0x3c6fb9];return _0x1f1377;}export const listCommand={'service':a43_0x1d984b(0xbf),'command':a43_0x1d984b(0xaf),'description':'List\x20runtime\x20Skills\x20from\x20remote\x20or\x20CLI-managed\x20local\x20cache','risk':a43_0x1d984b(0xb7),'flags':[CODE_FLAG,LIST_SCOPE_FLAG,LOCAL_FLAG],async 'execute'(_0x26fc2e){const _0x2b0fde=a43_0x1d984b,_0x927af=_0x26fc2e[_0x2b0fde(0xbc)](_0x2b0fde(0xb5)),_0x314f86=normalizeListScope(_0x26fc2e[_0x2b0fde(0xbc)](_0x2b0fde(0xa8)));if(_0x26fc2e[_0x2b0fde(0xac)](_0x2b0fde(0xc2))){const _0x110076=_0x26fc2e[_0x2b0fde(0xc1)];if(!_0x110076)throw CliErrors['authRequired']();const {listLocalRuntimeSkills:_0x5d7d3e}=await import(_0x2b0fde(0xa4)),_0x4367e4=_0x5d7d3e({'env':_0x26fc2e[_0x2b0fde(0xb8)]??_0x2b0fde(0xb9),'accessKey':_0x110076,'appCode':_0x26fc2e[_0x2b0fde(0xa3)],'scopes':listScopeToRuntimeScopes(_0x314f86),'code':_0x927af[_0x2b0fde(0xa9)]()||undefined}),_0x957053=groupLocalRuntimeSkills(_0x4367e4);return{'ok':!![],'data':{'appCode':_0x26fc2e[_0x2b0fde(0xa3)],'source':'local','scope':_0x314f86,'total':_0x4367e4[_0x2b0fde(0xc3)],'personal':_0x957053['personal'][_0x2b0fde(0xc3)],'company':_0x957053[_0x2b0fde(0xaa)][_0x2b0fde(0xc3)],'items':_0x4367e4['map'](summarizeLocalRuntimeSkill),'skills':{'personal':_0x957053[_0x2b0fde(0xb1)]['map'](summarizeLocalRuntimeSkill),'company':_0x957053[_0x2b0fde(0xaa)][_0x2b0fde(0xab)](summarizeLocalRuntimeSkill)}},'message':_0x2b0fde(0xb2)+_0x4367e4[_0x2b0fde(0xc3)]+_0x2b0fde(0xc0)};}const {listRuntimeSkills:_0x5dbe51}=await import(_0x2b0fde(0xb4)),_0x35aa81=await _0x5dbe51({'appCode':_0x26fc2e['appCode'],'scope':listScopeToRemoteScope(_0x314f86),'code':_0x927af[_0x2b0fde(0xa9)]()||undefined}),_0x316342=shouldListScope(_0x314f86,_0x2b0fde(0xb1))?_0x35aa81['personal']??[]:[],_0x45dba8=shouldListScope(_0x314f86,_0x2b0fde(0xaa))?_0x35aa81['company']??[]:[],_0x2dfd0e=[..._0x316342,..._0x45dba8];return{'ok':!![],'data':{'appCode':_0x26fc2e[_0x2b0fde(0xa3)],'source':'remote','scope':_0x314f86,'total':_0x2dfd0e[_0x2b0fde(0xc3)],'personal':_0x316342[_0x2b0fde(0xc3)],'company':_0x45dba8[_0x2b0fde(0xc3)],'items':_0x2dfd0e[_0x2b0fde(0xab)](summarizeRuntimeSkill),'skills':{'personal':_0x316342['map'](summarizeRuntimeSkill),'company':_0x45dba8[_0x2b0fde(0xab)](summarizeRuntimeSkill)}},'message':_0x2b0fde(0xb2)+_0x2dfd0e[_0x2b0fde(0xc3)]+_0x2b0fde(0xbb)};}};function a43_0x4d86(){const _0x39f1bd=['length','148665NcLzmo','appCode','../../../skills/runtime-skill-sync.js','1271431JTJJoO','1397bBUxna','56AVvSAf','scope','trim','company','map','bool','38154xDCvJJ','33147tFwZrF','list','256268TAhxpf','personal','Listed\x20','348669JkwYiW','../../../core/api-client.js','code','58hsRMFK','read','envName','production','filter','\x20remote\x20Skill(s).','str','2230PtSHxe','85mhZrvb','skill','\x20local\x20Skill(s).','accessKey','local'];a43_0x4d86=function(){return _0x39f1bd;};return a43_0x4d86();}function groupLocalRuntimeSkills(_0xb50e4){const _0x657061=a43_0x1d984b;return{'personal':_0xb50e4[_0x657061(0xba)](_0x3211b1=>_0x3211b1[_0x657061(0xa8)]===_0x657061(0xb1)),'company':_0xb50e4[_0x657061(0xba)](_0x423b9f=>_0x423b9f[_0x657061(0xa8)]===_0x657061(0xaa)),'builtin':_0xb50e4[_0x657061(0xba)](_0x568671=>_0x568671['scope']==='builtin')};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a44_0x234d57=a44_0xc5bc;function a44_0xc5bc(_0xa81e29,_0x2fccc4){_0xa81e29=_0xa81e29-0x1f1;const _0x77256c=a44_0x7725();let _0xc5bcda=_0x77256c[_0xa81e29];return _0xc5bcda;}(function(_0x3ebe24,_0x42f0da){const _0x53a02e=a44_0xc5bc,_0x204efe=_0x3ebe24();while(!![]){try{const _0xef7cec=parseInt(_0x53a02e(0x1f5))/0x1*(-parseInt(_0x53a02e(0x1f7))/0x2)+-parseInt(_0x53a02e(0x1f4))/0x3*(-parseInt(_0x53a02e(0x1fb))/0x4)+-parseInt(_0x53a02e(0x1fa))/0x5+parseInt(_0x53a02e(0x1fc))/0x6+-parseInt(_0x53a02e(0x1f8))/0x7*(-parseInt(_0x53a02e(0x1f2))/0x8)+parseInt(_0x53a02e(0x1fd))/0x9+-parseInt(_0x53a02e(0x1f1))/0xa;if(_0xef7cec===_0x42f0da)break;else _0x204efe['push'](_0x204efe['shift']());}catch(_0x23247f){_0x204efe['push'](_0x204efe['shift']());}}}(a44_0x7725,0x256f5));function a44_0x7725(){const _0x287be4=['1126984WYAXey','809160XKTQNi','507888hshXct','1384070OljRRZ','8BCqrqh','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20scope\x20or\x20submit\x20company\x20scope\x20for\x20review','3yWssis','97723BnpiAV','push','2lvdrDt','878101iUVein','write','1045090SqyELE'];a44_0x7725=function(){return _0x287be4;};return a44_0x7725();}import{CONFIRM_WARNINGS_FLAG,DIR_FLAG,PUSH_SCOPE_FLAG}from'../flags.js';import{skillPushDryRun,skillPushExecute}from'../push-execute.js';export const pushCommand={'service':'skill','command':a44_0x234d57(0x1f6),'description':a44_0x234d57(0x1f3),'risk':a44_0x234d57(0x1f9),'flags':[DIR_FLAG,PUSH_SCOPE_FLAG,CONFIRM_WARNINGS_FLAG],'dryRun':skillPushDryRun,'execute':skillPushExecute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a45_0x531cf4=a45_0x4f1b;(function(_0x2252fe,_0x2f1c98){const _0xe7a9a8=a45_0x4f1b,_0xec32ea=_0x2252fe();while(!![]){try{const _0x3cccde=-parseInt(_0xe7a9a8(0xaf))/0x1*(-parseInt(_0xe7a9a8(0xa9))/0x2)+-parseInt(_0xe7a9a8(0xac))/0x3+parseInt(_0xe7a9a8(0xa6))/0x4+parseInt(_0xe7a9a8(0xa4))/0x5+-parseInt(_0xe7a9a8(0xaa))/0x6*(parseInt(_0xe7a9a8(0xa0))/0x7)+-parseInt(_0xe7a9a8(0xae))/0x8+parseInt(_0xe7a9a8(0xad))/0x9;if(_0x3cccde===_0x2f1c98)break;else _0xec32ea['push'](_0xec32ea['shift']());}catch(_0x3cc286){_0xec32ea['push'](_0xec32ea['shift']());}}}(a45_0x2370,0x9f995));function a45_0x4f1b(_0x3a8484,_0x51487c){_0x3a8484=_0x3a8484-0x9f;const _0x237089=a45_0x2370();let _0x4f1b8d=_0x237089[_0x3a8484];return _0x4f1b8d;}import{DIR_FLAG,STRICT_FLAG}from'../flags.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'../validate.js';function a45_0x2370(){const _0x2f332d=['47574SrmgNy','Validate\x20a\x20local\x20Skill\x20directory\x20as\x20a\x20self-contained\x20delivery\x20package','769590tVhnlG','3267486cZRXKc','5426216cUQTQs','8670pLDcEG','type','bool','413lNPORp','validate','strict','skill','1547055AbFvCR','warnings','4252320YbbPml','dir','Skill\x20validation\x20passed.','74FoFRBS'];a45_0x2370=function(){return _0x2f332d;};return a45_0x2370();}export const validateCommand={'service':a45_0x531cf4(0xa3),'command':a45_0x531cf4(0xa1),'description':a45_0x531cf4(0xab),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[DIR_FLAG,STRICT_FLAG],async 'execute'(_0x473cc6){const _0x3e70a6=a45_0x531cf4,_0x17131b=_0x473cc6[_0x3e70a6(0x9f)](_0x3e70a6(0xa2)),_0x277aef=validateSkillDirectory(_0x473cc6['str'](_0x3e70a6(0xa7)),{'strict':_0x17131b});return throwIfSkillValidationFailed(_0x277aef,_0x17131b),{'ok':!![],'data':{'dir':_0x277aef[_0x3e70a6(0xa7)],'type':_0x277aef[_0x3e70a6(0xb0)],'errors':_0x277aef['errors'],'warnings':_0x277aef[_0x3e70a6(0xa5)]},'message':_0x3e70a6(0xa8)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a46_0x46ddd1=a46_0x1ca1;(function(_0x343c41,_0x43fe86){const _0x399397=a46_0x1ca1,_0x329fe1=_0x343c41();while(!![]){try{const _0x301c02=-parseInt(_0x399397(0xa4))/0x1*(-parseInt(_0x399397(0xaa))/0x2)+-parseInt(_0x399397(0xc5))/0x3+parseInt(_0x399397(0xc2))/0x4+parseInt(_0x399397(0xc1))/0x5*(parseInt(_0x399397(0xaf))/0x6)+parseInt(_0x399397(0xa5))/0x7*(-parseInt(_0x399397(0xc3))/0x8)+parseInt(_0x399397(0xbb))/0x9*(parseInt(_0x399397(0xb1))/0xa)+-parseInt(_0x399397(0xbe))/0xb;if(_0x301c02===_0x43fe86)break;else _0x329fe1['push'](_0x329fe1['shift']());}catch(_0x2cf55e){_0x329fe1['push'](_0x329fe1['shift']());}}}(a46_0x37cb,0xc7eea));import{DEFAULT_SKILL_TARGET,SKILL_NAME_PATTERN,SKILL_TYPES}from'./templates.js';export const CODE_FLAG={'name':'code','type':a46_0x46ddd1(0xb7),'description':a46_0x46ddd1(0xab)};export const SCOPE_FLAG={'name':a46_0x46ddd1(0xb6),'type':a46_0x46ddd1(0xb7),'description':a46_0x46ddd1(0xc0),'enum':[a46_0x46ddd1(0xa8),a46_0x46ddd1(0xae),a46_0x46ddd1(0xb8)]};export const PUSH_SCOPE_FLAG={'name':a46_0x46ddd1(0xb6),'type':'string','description':a46_0x46ddd1(0xa9),'default':a46_0x46ddd1(0xae),'enum':[a46_0x46ddd1(0xae),a46_0x46ddd1(0xb8)]};function a46_0x1ca1(_0x55f87e,_0x1a10bf){_0x55f87e=_0x55f87e-0xa4;const _0x37cb97=a46_0x37cb();let _0x1ca179=_0x37cb97[_0x55f87e];return _0x1ca179;}function a46_0x37cb(){const _0x2526cd=['Read\x20CLI-managed\x20local\x20Skill\x20cache\x20and\x20links\x20instead\x20of\x20remote\x20lists','1878777WgaqMj','1cheYfz','623sahwCr','Directory\x20that\x20will\x20contain\x20the\x20generated\x20Skill\x20directory','boolean','all','Skill\x20push\x20target\x20scope:\x20personal\x20saves\x20immediately,\x20company\x20submits\x20a\x20new\x20version\x20for\x20review','2012566sZQdRZ','Only\x20target\x20a\x20specific\x20runtime\x20Skill\x20code','Compatibility\x20flag;\x20no\x20extra\x20checks\x20are\x20enabled','name','personal','8009970oBNiNg','Overwrite\x20generated\x20or\x20CLI-managed\x20Skill\x20files\x20when\x20the\x20target\x20already\x20exists','90OkdFHT','force','target','Local\x20Skill\x20directory\x20containing\x20SKILL.md','confirm-warnings','scope','string','company','write','type','485397BowCWa','dir','Skill\x20template\x20type','15185379oSHDzs','strict','Skill\x20sync\x20scope:\x20all\x20(personal/company),\x20personal,\x20or\x20company','5DZsvGP','6420000MROtkD','144360HYqxOG'];a46_0x37cb=function(){return _0x2526cd;};return a46_0x37cb();}export const LIST_SCOPE_FLAG={'name':a46_0x46ddd1(0xb6),'type':a46_0x46ddd1(0xb7),'description':'Skill\x20list\x20scope:\x20all,\x20personal,\x20or\x20company','enum':['all',a46_0x46ddd1(0xae),a46_0x46ddd1(0xb8)]};export const LOCAL_FLAG={'name':'local','type':a46_0x46ddd1(0xa7),'description':a46_0x46ddd1(0xc4)};export const DIR_FLAG={'name':a46_0x46ddd1(0xbc),'type':a46_0x46ddd1(0xb7),'required':!![],'description':a46_0x46ddd1(0xb4)};export const CREATE_NAME_FLAG={'name':a46_0x46ddd1(0xad),'type':a46_0x46ddd1(0xb7),'required':!![],'description':'Skill\x20name\x20using\x20lowercase\x20letters,\x20numbers,\x20and\x20hyphens','pattern':{'regex':SKILL_NAME_PATTERN,'description':'lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens'}};export const TYPE_FLAG={'name':a46_0x46ddd1(0xba),'type':a46_0x46ddd1(0xb7),'description':a46_0x46ddd1(0xbd),'default':a46_0x46ddd1(0xb9),'enum':[...SKILL_TYPES]};export const TARGET_FLAG={'name':a46_0x46ddd1(0xb3),'type':a46_0x46ddd1(0xb7),'description':a46_0x46ddd1(0xa6),'default':DEFAULT_SKILL_TARGET};export const FORCE_FLAG={'name':a46_0x46ddd1(0xb2),'type':a46_0x46ddd1(0xa7),'description':a46_0x46ddd1(0xb0)};export const CONFIRM_WARNINGS_FLAG={'name':a46_0x46ddd1(0xb5),'type':a46_0x46ddd1(0xa7),'description':'Confirm\x20reviewed\x20personal\x20or\x20company\x20Skill\x20publish\x20warnings'};export const STRICT_FLAG={'name':a46_0x46ddd1(0xbf),'type':a46_0x46ddd1(0xa7),'description':a46_0x46ddd1(0xac)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a47_0x5aee(_0x26f9bd,_0x5b479f){_0x26f9bd=_0x26f9bd-0x1a5;const _0xacf921=a47_0xacf9();let _0x5aeeaa=_0xacf921[_0x26f9bd];return _0x5aeeaa;}(function(_0x1eae9f,_0x435f6f){const _0x236e9a=a47_0x5aee,_0x497f31=_0x1eae9f();while(!![]){try{const _0x417e31=-parseInt(_0x236e9a(0x1a7))/0x1*(parseInt(_0x236e9a(0x1ac))/0x2)+-parseInt(_0x236e9a(0x1ab))/0x3+-parseInt(_0x236e9a(0x1a9))/0x4*(-parseInt(_0x236e9a(0x1a8))/0x5)+-parseInt(_0x236e9a(0x1ae))/0x6+-parseInt(_0x236e9a(0x1aa))/0x7+parseInt(_0x236e9a(0x1a6))/0x8+parseInt(_0x236e9a(0x1a5))/0x9*(parseInt(_0x236e9a(0x1ad))/0xa);if(_0x417e31===_0x435f6f)break;else _0x497f31['push'](_0x497f31['shift']());}catch(_0x506b3f){_0x497f31['push'](_0x497f31['shift']());}}}(a47_0xacf9,0x9df8c));import{createCommand}from'./commands/create.js';import{installCommand}from'./commands/install.js';import{listCommand}from'./commands/list.js';import{pushCommand}from'./commands/push.js';import{validateCommand}from'./commands/validate.js';export const skillDefinitions=[installCommand,createCommand,validateCommand,listCommand,pushCommand];function a47_0xacf9(){const _0xc8aeb5=['8921872zgAPRc','24927XKvspz','5guRiVU','5101072QJutXW','8824515HBhmNb','231003LbZJGC','76EkGpeq','10Pbjiwa','238566mCtxVS','5230647jmwwTe'];a47_0xacf9=function(){return _0xc8aeb5;};return a47_0xacf9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x269b53,_0x37d9ed){var _0x4c6cbc=a48_0x9128,_0x590677=_0x269b53();while(!![]){try{var _0x1eba44=-parseInt(_0x4c6cbc(0x187))/0x1+-parseInt(_0x4c6cbc(0x180))/0x2+-parseInt(_0x4c6cbc(0x183))/0x3*(parseInt(_0x4c6cbc(0x179))/0x4)+parseInt(_0x4c6cbc(0x185))/0x5*(parseInt(_0x4c6cbc(0x182))/0x6)+-parseInt(_0x4c6cbc(0x181))/0x7*(-parseInt(_0x4c6cbc(0x188))/0x8)+parseInt(_0x4c6cbc(0x17a))/0x9+parseInt(_0x4c6cbc(0x184))/0xa;if(_0x1eba44===_0x37d9ed)break;else _0x590677['push'](_0x590677['shift']());}catch(_0x5e970e){_0x590677['push'](_0x590677['shift']());}}}(a48_0x4706,0x295b6));export function isPackageBackedManifest(_0xe19ce4){var _0x5be89a=a48_0x9128;return!!_0xe19ce4&&typeof _0xe19ce4===_0x5be89a(0x17e)&&!Array[_0x5be89a(0x186)](_0xe19ce4)&&typeof _0xe19ce4[_0x5be89a(0x17f)]==='string'&&_0xe19ce4[_0x5be89a(0x17f)][_0x5be89a(0x17c)]>0x0&&Array[_0x5be89a(0x186)](_0xe19ce4['files']);}function a48_0x9128(_0x5a8be3,_0x314d5d){_0x5a8be3=_0x5a8be3-0x179;var _0x4706b4=a48_0x4706();var _0x91286c=_0x4706b4[_0x5a8be3];return _0x91286c;}export function isMultiFileManifest(_0x524ed4){var _0xf1362a=a48_0x9128;return!!_0x524ed4&&typeof _0x524ed4==='object'&&!Array[_0xf1362a(0x186)](_0x524ed4)&&Array[_0xf1362a(0x186)](_0x524ed4['files'])&&_0x524ed4[_0xf1362a(0x17d)]['some'](_0x1fc6af=>_0x1fc6af[_0xf1362a(0x189)]!==_0xf1362a(0x17b));}function a48_0x4706(){var _0x171000=['6ADLAVz','29469qxnpcP','5637480mbxTDY','83285dWyvEb','isArray','269854NyllVI','64mOAcAA','path','4iPJfLj','1419327xuqOKf','SKILL.md','length','files','object','ossPath','589170txDMVL','4858cIRIME'];a48_0x4706=function(){return _0x171000;};return a48_0x4706();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x43cef7,_0x329d80){const _0x486c38=a49_0x5579,_0x5eb808=_0x43cef7();while(!![]){try{const _0x24291c=parseInt(_0x486c38(0x190))/0x1*(parseInt(_0x486c38(0x191))/0x2)+parseInt(_0x486c38(0x1a8))/0x3*(-parseInt(_0x486c38(0x1a4))/0x4)+-parseInt(_0x486c38(0x175))/0x5+parseInt(_0x486c38(0x178))/0x6*(parseInt(_0x486c38(0x194))/0x7)+parseInt(_0x486c38(0x1ac))/0x8*(-parseInt(_0x486c38(0x196))/0x9)+-parseInt(_0x486c38(0x17c))/0xa+parseInt(_0x486c38(0x1a0))/0xb;if(_0x24291c===_0x329d80)break;else _0x5eb808['push'](_0x5eb808['shift']());}catch(_0x2eb348){_0x5eb808['push'](_0x5eb808['shift']());}}}(a49_0x2e60,0x2cc73));function a49_0x5579(_0x3433bd,_0xc6352a){_0x3433bd=_0x3433bd-0x174;const _0x2e60b9=a49_0x2e60();let _0x55799f=_0x2e60b9[_0x3433bd];return _0x55799f;}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 a49_0x2e60(){const _0x146a1c=['Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.','Company','Updated\x20personal\x20Skill\x20','warnings','company','scope','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','11ZeODlc','4008KixBhP','frontmatterDisplayName','resolvedSlug','14UnFDUO','trim','4905YnhNdq','\x20version\x20','skillCode','personal','PRIVATE','identical','(unknown)','dir','validation','errors','9033596iivlsd','confirm-warnings','\x20has\x20scope=\x22','authRequired','4bYuWkI','payload','../../core/api-client.js','bool','89391OvjrZo','existing','accessKey','publishInput','4216Iqzvzk','status','\x20for\x20review','files','/api/cli/v1/skills/','appCode','1757455yLMVaE','/publish/validate','savedSkill','866094aBxQNk','metadata','resolvedVersion','str','2800640nswOCm','appcode','unknown','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','../../skills/runtime-skill-sync.js','valid','NAMESPACE_ONLY','POST','confirmWarnings','Personal','submitted','remoteForPreflight','input'];a49_0x2e60=function(){return _0x146a1c;};return a49_0x2e60();}import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x29c017){const _0x593515=a49_0x5579,{getRuntimeSkillByCode:_0x393b4c,validateRuntimeSkillPublish:_0x304244}=await import(_0x593515(0x1a6)),{readPushDirectory:_0x2b7cb0,resolvePushDirectoryIdentity:_0x206d58}=await import(_0x593515(0x180));if(!_0x29c017[_0x593515(0x1aa)])throw CliErrors[_0x593515(0x1a3)]();const _0xfdb097=resolvePushScope(_0x29c017),_0x494109=validateSkillDirectory(_0x29c017[_0x593515(0x17b)](_0x593515(0x19d)));throwIfSkillValidationFailed(_0x494109);const _0x58e444=_0x206d58(_0x494109[_0x593515(0x19d)],_0x29c017['appCode'],remoteFirstMetadataOptions()),_0x361d66=await _0x393b4c(_0x29c017['appCode'],_0x58e444[_0x593515(0x198)]);throwIfBuiltinPushTarget(_0x361d66);if(_0xfdb097===_0x593515(0x18d)){const _0x41c431=_0x2b7cb0(_0x494109['dir'],_0x29c017[_0x593515(0x174)],remoteMissingCompanyReadOptions()),_0x5351aa=await _0x304244(_0x29c017[_0x593515(0x174)],_0x41c431['input'],{'visibility':_0x593515(0x182)});return{'method':_0x593515(0x183),'url':'/api/cli/v1/skills/'+_0x29c017[_0x593515(0x174)]+_0x593515(0x176),'body':{'skillCode':_0x41c431[_0x593515(0x198)],'visibility':_0x593515(0x182),'valid':_0x5351aa[_0x593515(0x181)],'errors':_0x5351aa[_0x593515(0x19f)],'warnings':_0x5351aa[_0x593515(0x18c)],'resolvedSlug':_0x5351aa[_0x593515(0x193)],'resolvedVersion':_0x5351aa[_0x593515(0x17a)]},'description':_0x593515(0x17f)};}if(_0x361d66&&_0x361d66[_0x593515(0x18e)]!==_0x593515(0x199))throw CliErrors[_0x593515(0x19e)](_0x593515(0x18f)+_0x58e444[_0x593515(0x198)]+_0x593515(0x1a2)+(_0x361d66['scope']??_0x593515(0x17e))+'\x22.');const _0x5c019e=_0x2b7cb0(_0x494109[_0x593515(0x19d)],_0x29c017[_0x593515(0x174)],_0x361d66?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x3c246a=await _0x304244(_0x29c017['appCode'],_0x5c019e[_0x593515(0x188)],{'visibility':'PRIVATE'});return{'method':_0x593515(0x183),'url':_0x593515(0x1b0)+_0x29c017[_0x593515(0x174)]+_0x593515(0x176),'body':{'skillCode':_0x5c019e[_0x593515(0x198)],'visibility':_0x593515(0x19a),'valid':_0x3c246a[_0x593515(0x181)],'errors':_0x3c246a[_0x593515(0x19f)],'warnings':_0x3c246a[_0x593515(0x18c)],'resolvedSlug':_0x3c246a[_0x593515(0x193)],'resolvedVersion':_0x3c246a['resolvedVersion']},'description':_0x593515(0x189)};}export async function skillPushExecute(_0x44ae79){const _0x273c31=a49_0x5579,{createPersonalRuntimeSkill:_0x4ee710,downloadRuntimeSkillPackage:_0x2843d6,getRuntimeSkillByCode:_0x5de833,publishCompanyRuntimeSkill:_0x114e1f,updatePersonalRuntimeSkill:_0x36bf6f,validateRuntimeSkillPublish:_0x1c9756}=await import(_0x273c31(0x1a6)),{verifyRuntimeSkillPackage:_0x328832,verifyRuntimeSkillBundle:_0x102a64,readPushDirectory:_0x3939af,refreshPushDirectoryMetadataFromRemote:_0x31aa0f,recordPushedRuntimeSkill:_0x1180c0,resolvePushDirectoryIdentity:_0x51e96b}=await import(_0x273c31(0x180));if(!_0x44ae79['accessKey'])throw CliErrors['authRequired']();const _0x331706=resolvePushScope(_0x44ae79),_0x197a76=_0x44ae79[_0x273c31(0x1a7)](_0x273c31(0x1a1))||_0x44ae79['bool'](_0x273c31(0x184)),_0x476f7c=validateSkillDirectory(_0x44ae79[_0x273c31(0x17b)](_0x273c31(0x19d)));throwIfSkillValidationFailed(_0x476f7c);const _0x5c83ef=_0x476f7c['dir'];let _0x156df5;if(_0x331706==='company'){const _0x3ed229=_0x51e96b(_0x5c83ef,_0x44ae79[_0x273c31(0x174)],remoteFirstMetadataOptions()),_0x4de7dd=await _0x5de833(_0x44ae79[_0x273c31(0x174)],_0x3ed229[_0x273c31(0x198)]);throwIfBuiltinPushTarget(_0x4de7dd);if(_0x4de7dd)_0x31aa0f(_0x5c83ef,_0x4de7dd,_0x44ae79[_0x273c31(0x174)]);const _0x36699a=_0x3939af(_0x5c83ef,_0x44ae79[_0x273c31(0x174)],_0x4de7dd?{'targetScope':_0x273c31(0x18d),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x156df5={'scope':_0x273c31(0x18d),'payload':_0x36699a,'publishInput':_0x36699a[_0x273c31(0x188)],'remoteForPreflight':_0x4de7dd,'warnings':[]};}else{const _0x3947d8=_0x44ae79[_0x273c31(0x17b)](_0x273c31(0x17d))[_0x273c31(0x195)](),_0x1eedec=Boolean(_0x3947d8),_0x349928=allowRetargetArgs(_0x1eedec),_0x474704=_0x51e96b(_0x5c83ef,_0x44ae79[_0x273c31(0x174)],{...remoteFirstMetadataOptions(),..._0x349928[0x0]}),_0x512237=await _0x5de833(_0x44ae79[_0x273c31(0x174)],_0x474704[_0x273c31(0x198)]);throwIfBuiltinPushTarget(_0x512237);if(_0x512237){if(_0x512237[_0x273c31(0x18e)]!==_0x273c31(0x199)){if(_0x1eedec)throw CliErrors[_0x273c31(0x19e)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20'+_0x474704['skillCode']+_0x273c31(0x1a2)+(_0x512237[_0x273c31(0x18e)]??'unknown')+'\x22.');_0x31aa0f(_0x5c83ef,_0x512237,_0x44ae79[_0x273c31(0x174)]);}else!_0x1eedec&&_0x31aa0f(_0x5c83ef,_0x512237,_0x44ae79[_0x273c31(0x174)]);}const _0x150ed2=_0x3939af(_0x5c83ef,_0x44ae79[_0x273c31(0x174)],_0x512237?remotePersonalReadOptions(_0x1eedec,_0x349928[0x0]):remoteMissingPersonalReadOptions(_0x349928[0x0])),_0x754c4=_0x512237?.[_0x273c31(0x18e)]===_0x273c31(0x199)&&_0x512237['skillCode']===_0x150ed2[_0x273c31(0x198)]?_0x512237:undefined,_0x2bd13c=_0x1eedec&&_0x754c4?withRetargetExistingMetadata(_0x150ed2['input'],_0x754c4,{'preferInputSkillName':Boolean(_0x150ed2[_0x273c31(0x192)])}):_0x150ed2['input'],_0x2be880=_0x1eedec?buildRetargetWarning(_0x474704[_0x273c31(0x179)],_0x44ae79[_0x273c31(0x174)]):[];_0x156df5={'scope':'personal','payload':_0x150ed2,'publishInput':_0x2bd13c,'remoteForPreflight':_0x754c4,'existing':_0x754c4,'warnings':[..._0x476f7c[_0x273c31(0x18c)],..._0x2be880]};}const _0x2be04b=await runRemoteContentPreflight({'scope':_0x156df5[_0x273c31(0x18e)],'remote':_0x156df5[_0x273c31(0x187)],'publishInput':_0x156df5['publishInput'],'skillCode':_0x156df5['payload'][_0x273c31(0x198)],'appCode':_0x44ae79['appCode'],'downloadRuntimeSkillPackage':_0x2843d6,'verifyRuntimeSkillBundle':_0x102a64});if(_0x2be04b[_0x273c31(0x1ad)]===_0x273c31(0x19b))return _0x156df5[_0x273c31(0x18e)]===_0x273c31(0x18d)?_0x1180c0(_0x5c83ef,_0x2be04b[_0x273c31(0x177)],_0x44ae79[_0x273c31(0x174)],{'scope':'company'}):_0x1180c0(_0x5c83ef,_0x2be04b[_0x273c31(0x177)],_0x44ae79['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x2be04b[_0x273c31(0x177)]),'scope':_0x156df5[_0x273c31(0x18e)],..._0x156df5[_0x273c31(0x18e)]===_0x273c31(0x199)?{'warnings':_0x156df5['warnings']}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x156df5[_0x273c31(0x18e)])+'\x20Skill\x20'+_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x156df5[_0x273c31(0x18e)]===_0x273c31(0x18d)){const _0xb989bf=await _0x1c9756(_0x44ae79[_0x273c31(0x174)],_0x156df5[_0x273c31(0x1ab)],{'visibility':_0x273c31(0x182)});throwIfPublishValidationFailed(_0x273c31(0x18d),_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)],_0xb989bf),throwIfUnconfirmedPublishWarnings(_0x273c31(0x18d),_0x156df5['payload'][_0x273c31(0x198)],_0xb989bf[_0x273c31(0x18c)],_0x197a76);const _0x202735=await _0x114e1f(_0x44ae79[_0x273c31(0x174)],_0x156df5[_0x273c31(0x1ab)],{'confirmWarnings':_0x197a76});return _0x1180c0(_0x5c83ef,{..._0x202735,'files':_0x156df5[_0x273c31(0x1ab)][_0x273c31(0x1af)]},_0x44ae79[_0x273c31(0x174)],{'scope':_0x273c31(0x18d)}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x202735),'scope':'company','reviewState':_0x273c31(0x186),'submittedForReview':!![],'validation':{'warnings':_0xb989bf['warnings']}},'message':'Submitted\x20company\x20Skill\x20'+_0x156df5[_0x273c31(0x1a5)]['skillCode']+_0x273c31(0x197)+(_0x202735['version']??_0x273c31(0x19c))+_0x273c31(0x1ae)};}const _0x160aa1=await _0x1c9756(_0x44ae79[_0x273c31(0x174)],_0x156df5[_0x273c31(0x1ab)],{'visibility':_0x273c31(0x19a)});throwIfPublishValidationFailed(_0x273c31(0x199),_0x156df5[_0x273c31(0x1a5)]['skillCode'],_0x160aa1),throwIfUnconfirmedPublishWarnings(_0x273c31(0x199),_0x156df5['payload'][_0x273c31(0x198)],_0x160aa1['warnings'],_0x197a76);const _0x110973={'confirmWarnings':_0x197a76},_0x14481c=_0x156df5[_0x273c31(0x1a9)]?await _0x36bf6f(_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)],_0x44ae79[_0x273c31(0x174)],_0x156df5[_0x273c31(0x1ab)],_0x110973):await _0x4ee710(_0x44ae79['appCode'],_0x156df5['publishInput'],_0x110973);let _0x47328b=_0x14481c;if(isMultiFileManifest(_0x156df5[_0x273c31(0x1ab)][_0x273c31(0x1af)])){const _0xc3ffd=await _0x2843d6(_0x273c31(0x199),_0x14481c['skillCode']||_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)],_0x44ae79[_0x273c31(0x174)]);_0x102a64(_0x156df5['publishInput'][_0x273c31(0x1af)],_0xc3ffd),_0x47328b={..._0x14481c,'files':_0x156df5[_0x273c31(0x1ab)]['files']};}else{if(isPackageBackedManifest(_0x14481c['files'])){const _0x27770b=await _0x2843d6(_0x273c31(0x199),_0x14481c[_0x273c31(0x198)]||_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)],_0x44ae79['appCode']);_0x328832(_0x14481c[_0x273c31(0x1af)],_0x27770b);}}return _0x1180c0(_0x5c83ef,_0x47328b,_0x44ae79['appCode']),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x14481c),'warnings':_0x156df5[_0x273c31(0x18c)],'validation':{'warnings':_0x160aa1[_0x273c31(0x18c)]}},'message':_0x156df5['existing']?_0x273c31(0x18b)+_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)]:'Created\x20personal\x20Skill\x20'+_0x156df5[_0x273c31(0x1a5)][_0x273c31(0x198)]};}function scopeLabel(_0x17d2ee){const _0x33cf01=a49_0x5579;return _0x17d2ee==='company'?_0x33cf01(0x18a):_0x33cf01(0x185);}
|
|
1
|
+
(function(_0x501d14,_0x384e8c){const _0x4f06db=a49_0x55d9,_0x1bfbdb=_0x501d14();while(!![]){try{const _0x26c384=parseInt(_0x4f06db(0x138))/0x1*(-parseInt(_0x4f06db(0x163))/0x2)+-parseInt(_0x4f06db(0x140))/0x3+-parseInt(_0x4f06db(0x141))/0x4+parseInt(_0x4f06db(0x14a))/0x5+-parseInt(_0x4f06db(0x13d))/0x6+parseInt(_0x4f06db(0x159))/0x7*(-parseInt(_0x4f06db(0x133))/0x8)+parseInt(_0x4f06db(0x164))/0x9;if(_0x26c384===_0x384e8c)break;else _0x1bfbdb['push'](_0x1bfbdb['shift']());}catch(_0x558b40){_0x1bfbdb['push'](_0x1bfbdb['shift']());}}}(a49_0x149f,0x66da5));import{CliErrors}from'../../errors.js';function a49_0x149f(){const _0x5b1672=['1467084LgDqma','warnings','unknown','271989tngrSE','2366340MUULhb','skillCode','publishInput','str','payload','status','remoteForPreflight','resolvedSlug','trim','845335PnRvdO','PRIVATE','\x20Skill\x20','appCode','savedSkill','accessKey','dir','/api/cli/v1/skills/','existing','personal','(unknown)','files','frontmatterDisplayName','scope','validation','3367xDQSGw','Submitted\x20company\x20Skill\x20','Company','../../skills/runtime-skill-sync.js','appcode','/publish/validate','identical','\x20for\x20review','input','confirmWarnings','147308DqoGtG','13790502nUNJFc','company','confirm-warnings','Updated\x20personal\x20Skill\x20','Personal','NAMESPACE_ONLY','976vHRWzw','Validate\x20a\x20company\x20Skill\x20push\x20package\x20without\x20creating\x20a\x20version\x20or\x20review\x20task.','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20remote\x20Skill\x20','POST','metadata','4WTwhCu','authRequired','valid','bool','../../core/api-client.js'];a49_0x149f=function(){return _0x5b1672;};return a49_0x149f();}function a49_0x55d9(_0x425999,_0x21dcd4){_0x425999=_0x425999-0x130;const _0x149f32=a49_0x149f();let _0x55d9c3=_0x149f32[_0x425999];return _0x55d9c3;}import{isMultiFileManifest,isPackageBackedManifest}from'./manifest-helpers.js';import{remotePersonalReadOptions,remoteMissingCompanyReadOptions,remoteMissingPersonalReadOptions}from'./push-flow-helpers.js';import{allowRetargetArgs,buildRetargetWarning,remoteFirstMetadataOptions,resolvePushScope,runRemoteContentPreflight,throwIfBuiltinPushTarget,throwIfUnconfirmedPublishWarnings,throwIfPublishValidationFailed}from'./push-flow-helpers.js';import{withRetargetExistingMetadata}from'./push-retarget.js';import{summarizeRuntimeSkill}from'./summary.js';import{throwIfSkillValidationFailed,validateSkillDirectory}from'./validate.js';export async function skillPushDryRun(_0x3a0eaa){const _0x5ca9a2=a49_0x55d9,{getRuntimeSkillByCode:_0x440564,validateRuntimeSkillPublish:_0x3652c9}=await import('../../core/api-client.js'),{readPushDirectory:_0x4753dd,resolvePushDirectoryIdentity:_0x5c96f1}=await import(_0x5ca9a2(0x15c));if(!_0x3a0eaa[_0x5ca9a2(0x14f)])throw CliErrors[_0x5ca9a2(0x139)]();const _0x4a6b7e=resolvePushScope(_0x3a0eaa),_0x4bec65=validateSkillDirectory(_0x3a0eaa[_0x5ca9a2(0x144)]('dir'));throwIfSkillValidationFailed(_0x4bec65);const _0x283fd9=_0x5c96f1(_0x4bec65[_0x5ca9a2(0x150)],_0x3a0eaa['appCode'],remoteFirstMetadataOptions()),_0x4d858c=await _0x440564(_0x3a0eaa[_0x5ca9a2(0x14d)],_0x283fd9[_0x5ca9a2(0x142)]);throwIfBuiltinPushTarget(_0x4d858c);if(_0x4a6b7e===_0x5ca9a2(0x165)){const _0x3d9e6a=_0x4753dd(_0x4bec65[_0x5ca9a2(0x150)],_0x3a0eaa['appCode'],remoteMissingCompanyReadOptions()),_0x1cdf75=await _0x3652c9(_0x3a0eaa[_0x5ca9a2(0x14d)],_0x3d9e6a[_0x5ca9a2(0x161)],{'visibility':'NAMESPACE_ONLY'});return{'method':_0x5ca9a2(0x136),'url':_0x5ca9a2(0x151)+_0x3a0eaa['appCode']+_0x5ca9a2(0x15e),'body':{'skillCode':_0x3d9e6a[_0x5ca9a2(0x142)],'visibility':_0x5ca9a2(0x132),'valid':_0x1cdf75[_0x5ca9a2(0x13a)],'errors':_0x1cdf75['errors'],'warnings':_0x1cdf75[_0x5ca9a2(0x13e)],'resolvedSlug':_0x1cdf75[_0x5ca9a2(0x148)],'resolvedVersion':_0x1cdf75['resolvedVersion']},'description':_0x5ca9a2(0x134)};}if(_0x4d858c&&_0x4d858c[_0x5ca9a2(0x157)]!=='personal')throw CliErrors[_0x5ca9a2(0x158)](_0x5ca9a2(0x135)+_0x283fd9['skillCode']+'\x20has\x20scope=\x22'+(_0x4d858c[_0x5ca9a2(0x157)]??_0x5ca9a2(0x13f))+'\x22.');const _0x62d3ff=_0x4753dd(_0x4bec65[_0x5ca9a2(0x150)],_0x3a0eaa[_0x5ca9a2(0x14d)],_0x4d858c?remotePersonalReadOptions(!![]):remoteMissingPersonalReadOptions()),_0x150d36=await _0x3652c9(_0x3a0eaa['appCode'],_0x62d3ff['input'],{'visibility':'PRIVATE'});return{'method':'POST','url':_0x5ca9a2(0x151)+_0x3a0eaa['appCode']+_0x5ca9a2(0x15e),'body':{'skillCode':_0x62d3ff[_0x5ca9a2(0x142)],'visibility':_0x5ca9a2(0x14b),'valid':_0x150d36['valid'],'errors':_0x150d36['errors'],'warnings':_0x150d36['warnings'],'resolvedSlug':_0x150d36[_0x5ca9a2(0x148)],'resolvedVersion':_0x150d36['resolvedVersion']},'description':'Validate\x20a\x20personal\x20Skill\x20push\x20package\x20without\x20creating\x20or\x20updating\x20a\x20remote\x20Skill.'};}export async function skillPushExecute(_0x5420c1){const _0xe514cf=a49_0x55d9,{createPersonalRuntimeSkill:_0x5079cf,downloadRuntimeSkillPackage:_0x5ae854,getRuntimeSkillByCode:_0x4e6fc7,publishCompanyRuntimeSkill:_0x45ccac,updatePersonalRuntimeSkill:_0x1205f2,validateRuntimeSkillPublish:_0x10eee9}=await import(_0xe514cf(0x13c)),{verifyRuntimeSkillPackage:_0x298b0f,verifyRuntimeSkillBundle:_0x229c72,readPushDirectory:_0x12a0a9,refreshPushDirectoryMetadataFromRemote:_0x5da924,recordPushedRuntimeSkill:_0x2656d2,resolvePushDirectoryIdentity:_0x5e836c}=await import(_0xe514cf(0x15c));if(!_0x5420c1[_0xe514cf(0x14f)])throw CliErrors[_0xe514cf(0x139)]();const _0x4cce9f=resolvePushScope(_0x5420c1),_0x22bf93=_0x5420c1[_0xe514cf(0x13b)](_0xe514cf(0x166))||_0x5420c1[_0xe514cf(0x13b)](_0xe514cf(0x162)),_0x49e972=validateSkillDirectory(_0x5420c1['str'](_0xe514cf(0x150)));throwIfSkillValidationFailed(_0x49e972);const _0x468be6=_0x49e972[_0xe514cf(0x150)];let _0x164800;if(_0x4cce9f===_0xe514cf(0x165)){const _0x355969=_0x5e836c(_0x468be6,_0x5420c1[_0xe514cf(0x14d)],remoteFirstMetadataOptions()),_0x5ae265=await _0x4e6fc7(_0x5420c1[_0xe514cf(0x14d)],_0x355969[_0xe514cf(0x142)]);throwIfBuiltinPushTarget(_0x5ae265);if(_0x5ae265)_0x5da924(_0x468be6,_0x5ae265,_0x5420c1[_0xe514cf(0x14d)]);const _0x775b56=_0x12a0a9(_0x468be6,_0x5420c1[_0xe514cf(0x14d)],_0x5ae265?{'targetScope':_0xe514cf(0x165),'ignoreInvalidMetadata':!![]}:remoteMissingCompanyReadOptions());_0x164800={'scope':'company','payload':_0x775b56,'publishInput':_0x775b56[_0xe514cf(0x161)],'remoteForPreflight':_0x5ae265,'warnings':[]};}else{const _0x4f47a4=_0x5420c1[_0xe514cf(0x144)](_0xe514cf(0x15d))[_0xe514cf(0x149)](),_0x1a9f67=Boolean(_0x4f47a4),_0x7710fb=allowRetargetArgs(_0x1a9f67),_0x112ff3=_0x5e836c(_0x468be6,_0x5420c1[_0xe514cf(0x14d)],{...remoteFirstMetadataOptions(),..._0x7710fb[0x0]}),_0x268bd4=await _0x4e6fc7(_0x5420c1[_0xe514cf(0x14d)],_0x112ff3['skillCode']);throwIfBuiltinPushTarget(_0x268bd4);if(_0x268bd4){if(_0x268bd4[_0xe514cf(0x157)]!==_0xe514cf(0x153)){if(_0x1a9f67)throw CliErrors[_0xe514cf(0x158)](_0xe514cf(0x135)+_0x112ff3[_0xe514cf(0x142)]+'\x20has\x20scope=\x22'+(_0x268bd4['scope']??_0xe514cf(0x13f))+'\x22.');_0x5da924(_0x468be6,_0x268bd4,_0x5420c1[_0xe514cf(0x14d)]);}else!_0x1a9f67&&_0x5da924(_0x468be6,_0x268bd4,_0x5420c1[_0xe514cf(0x14d)]);}const _0x3a8156=_0x12a0a9(_0x468be6,_0x5420c1[_0xe514cf(0x14d)],_0x268bd4?remotePersonalReadOptions(_0x1a9f67,_0x7710fb[0x0]):remoteMissingPersonalReadOptions(_0x7710fb[0x0])),_0x1d740d=_0x268bd4?.[_0xe514cf(0x157)]===_0xe514cf(0x153)&&_0x268bd4[_0xe514cf(0x142)]===_0x3a8156[_0xe514cf(0x142)]?_0x268bd4:undefined,_0xec04e5=_0x1a9f67&&_0x1d740d?withRetargetExistingMetadata(_0x3a8156['input'],_0x1d740d,{'preferInputSkillName':Boolean(_0x3a8156[_0xe514cf(0x156)])}):_0x3a8156[_0xe514cf(0x161)],_0x3a577e=_0x1a9f67?buildRetargetWarning(_0x112ff3[_0xe514cf(0x137)],_0x5420c1['appCode']):[];_0x164800={'scope':_0xe514cf(0x153),'payload':_0x3a8156,'publishInput':_0xec04e5,'remoteForPreflight':_0x1d740d,'existing':_0x1d740d,'warnings':[..._0x49e972['warnings'],..._0x3a577e]};}const _0x27065c=await runRemoteContentPreflight({'scope':_0x164800[_0xe514cf(0x157)],'remote':_0x164800[_0xe514cf(0x147)],'publishInput':_0x164800['publishInput'],'skillCode':_0x164800[_0xe514cf(0x145)]['skillCode'],'appCode':_0x5420c1[_0xe514cf(0x14d)],'downloadRuntimeSkillPackage':_0x5ae854,'verifyRuntimeSkillBundle':_0x229c72});if(_0x27065c[_0xe514cf(0x146)]===_0xe514cf(0x15f))return _0x164800[_0xe514cf(0x157)]===_0xe514cf(0x165)?_0x2656d2(_0x468be6,_0x27065c['savedSkill'],_0x5420c1[_0xe514cf(0x14d)],{'scope':_0xe514cf(0x165)}):_0x2656d2(_0x468be6,_0x27065c[_0xe514cf(0x14e)],_0x5420c1[_0xe514cf(0x14d)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x27065c[_0xe514cf(0x14e)]),'scope':_0x164800[_0xe514cf(0x157)],..._0x164800[_0xe514cf(0x157)]==='personal'?{'warnings':_0x164800[_0xe514cf(0x13e)]}:{},'alreadyPublished':!![],'contentIdentical':!![]},'message':scopeLabel(_0x164800['scope'])+_0xe514cf(0x14c)+_0x164800['payload'][_0xe514cf(0x142)]+'\x20is\x20already\x20published\x20and\x20content\x20is\x20identical'};if(_0x164800[_0xe514cf(0x157)]===_0xe514cf(0x165)){const _0x59e31f=await _0x10eee9(_0x5420c1[_0xe514cf(0x14d)],_0x164800[_0xe514cf(0x143)],{'visibility':_0xe514cf(0x132)});throwIfPublishValidationFailed(_0xe514cf(0x165),_0x164800[_0xe514cf(0x145)][_0xe514cf(0x142)],_0x59e31f),throwIfUnconfirmedPublishWarnings(_0xe514cf(0x165),_0x164800[_0xe514cf(0x145)]['skillCode'],_0x59e31f[_0xe514cf(0x13e)],_0x22bf93);const _0x5bcacc=await _0x45ccac(_0x5420c1[_0xe514cf(0x14d)],_0x164800[_0xe514cf(0x143)],{'confirmWarnings':_0x22bf93});return _0x2656d2(_0x468be6,{..._0x5bcacc,'files':_0x164800[_0xe514cf(0x143)][_0xe514cf(0x155)]},_0x5420c1[_0xe514cf(0x14d)],{'scope':'company'}),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x5bcacc),'scope':'company','reviewState':'submitted','submittedForReview':!![],'validation':{'warnings':_0x59e31f[_0xe514cf(0x13e)]}},'message':_0xe514cf(0x15a)+_0x164800[_0xe514cf(0x145)][_0xe514cf(0x142)]+'\x20version\x20'+(_0x5bcacc['version']??_0xe514cf(0x154))+_0xe514cf(0x160)};}const _0x2668f9=await _0x10eee9(_0x5420c1[_0xe514cf(0x14d)],_0x164800[_0xe514cf(0x143)],{'visibility':_0xe514cf(0x14b)});throwIfPublishValidationFailed('personal',_0x164800[_0xe514cf(0x145)][_0xe514cf(0x142)],_0x2668f9),throwIfUnconfirmedPublishWarnings(_0xe514cf(0x153),_0x164800['payload']['skillCode'],_0x2668f9[_0xe514cf(0x13e)],_0x22bf93);const _0x204683={'confirmWarnings':_0x22bf93},_0x52a877=_0x164800['existing']?await _0x1205f2(_0x164800['payload'][_0xe514cf(0x142)],_0x5420c1['appCode'],_0x164800[_0xe514cf(0x143)],_0x204683):await _0x5079cf(_0x5420c1[_0xe514cf(0x14d)],_0x164800[_0xe514cf(0x143)],_0x204683);let _0x2d0333=_0x52a877;if(isMultiFileManifest(_0x164800[_0xe514cf(0x143)][_0xe514cf(0x155)])){const _0x18302a=await _0x5ae854(_0xe514cf(0x153),_0x52a877[_0xe514cf(0x142)]||_0x164800[_0xe514cf(0x145)][_0xe514cf(0x142)],_0x5420c1[_0xe514cf(0x14d)]);_0x229c72(_0x164800['publishInput'][_0xe514cf(0x155)],_0x18302a),_0x2d0333={..._0x52a877,'files':_0x164800[_0xe514cf(0x143)][_0xe514cf(0x155)]};}else{if(isPackageBackedManifest(_0x52a877[_0xe514cf(0x155)])){const _0x376075=await _0x5ae854(_0xe514cf(0x153),_0x52a877['skillCode']||_0x164800['payload'][_0xe514cf(0x142)],_0x5420c1[_0xe514cf(0x14d)]);_0x298b0f(_0x52a877['files'],_0x376075);}}return _0x2656d2(_0x468be6,_0x2d0333,_0x5420c1[_0xe514cf(0x14d)]),{'ok':!![],'data':{...summarizeRuntimeSkill(_0x52a877),'warnings':_0x164800[_0xe514cf(0x13e)],'validation':{'warnings':_0x2668f9['warnings']}},'message':_0x164800[_0xe514cf(0x152)]?_0xe514cf(0x130)+_0x164800['payload'][_0xe514cf(0x142)]:'Created\x20personal\x20Skill\x20'+_0x164800[_0xe514cf(0x145)]['skillCode']};}function scopeLabel(_0x259431){const _0x3f1be1=a49_0x55d9;return _0x259431===_0x3f1be1(0x165)?_0x3f1be1(0x15b):_0x3f1be1(0x131);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2125db,_0xb8eaa0){const _0x55f8ad=a50_0x3d45,_0x442037=_0x2125db();while(!![]){try{const _0x3445fc=-parseInt(_0x55f8ad(0xf6))/0x1*(parseInt(_0x55f8ad(0xd5))/0x2)+-parseInt(_0x55f8ad(0xf0))/0x3*(-parseInt(_0x55f8ad(0xf8))/0x4)+parseInt(_0x55f8ad(0xe8))/0x5+parseInt(_0x55f8ad(0xf7))/0x6*(parseInt(_0x55f8ad(0xcc))/0x7)+parseInt(_0x55f8ad(0xe4))/0x8*(-parseInt(_0x55f8ad(0xde))/0x9)+parseInt(_0x55f8ad(0xf5))/0xa*(-parseInt(_0x55f8ad(0xe2))/0xb)+parseInt(_0x55f8ad(0xd2))/0xc*(parseInt(_0x55f8ad(0xf2))/0xd);if(_0x3445fc===_0xb8eaa0)break;else _0x442037['push'](_0x442037['shift']());}catch(_0x5f24ff){_0x442037['push'](_0x442037['shift']());}}}(a50_0x2bc6,0x415bd));import{CliErrors}from'../../errors.js';function a50_0x3d45(_0x37155c,_0x2b676c){_0x37155c=_0x37155c-0xca;const _0x2bc699=a50_0x2bc6();let _0x3d45c6=_0x2bc699[_0x37155c];return _0x3d45c6;}function a50_0x2bc6(){const _0x164ac6=['validation','\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','36LabrNl','(unknown)','different','546rYTHMz','skill\x20push\x20supports\x20--scope\x20personal\x20or\x20--scope\x20company;\x20received\x20\x22','warnings','skill-metadata-appcode-retargeted','company','appCode','builtin','publishInput','str','3186513ucprkJ','lovrabet.skill.json','personal','files','858ebObay','identical','8tpAIQm','Fix\x20real\x20issues.\x20If\x20the\x20remaining\x20warnings\x20are\x20reviewed\x20false\x20positives,\x20rerun\x20with\x20--confirm-warnings\x20to\x20submit\x20the\x20unchanged\x20package.','SkillHub\x20validation\x20returned\x20invalid.','Personal','990785UymIlh','Warnings:\x20','length','Local\x20Skill\x20metadata\x20appCode\x20','errors','Use\x20a\x20different\x20skillCode\x20when\x20submitting\x20a\x20personal\x20or\x20company\x20Skill.','downloadRuntimeSkillPackage','\x20cannot\x20be\x20pushed.','114eSGxrz','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','1432054aTIctY','content','Do\x20not\x20modify\x20the\x20source\x20Skill\x20merely\x20to\x20satisfy\x20publishing.','50970gujMJZ','502iTEbBY','174ytCzYW','35012spevCO','join','Company','remote','\x20Skill\x20push\x20validation\x20reported\x20warning(s)\x20for\x20','71239IdEtpG','skillCode','verifyRuntimeSkillBundle','scope'];a50_0x2bc6=function(){return _0x164ac6;};return a50_0x2bc6();}export function resolvePushScope(_0x436b15){const _0x1d3cb2=a50_0x3d45,_0x279175=_0x436b15[_0x1d3cb2(0xdd)](_0x1d3cb2(0xcf))||_0x1d3cb2(0xe0);if(_0x279175===_0x1d3cb2(0xe0)||_0x279175===_0x1d3cb2(0xd9))return _0x279175;throw CliErrors[_0x1d3cb2(0xd0)](_0x1d3cb2(0xd6)+_0x279175+'\x22.');}export function allowRetargetArgs(_0x58bb2d){return _0x58bb2d?[{'allowAppCodeRetarget':!![]}]:[];}export function remoteFirstMetadataOptions(){return{'ignoreInvalidMetadata':!![],'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingPayloadOptions(){return{'ignoreMetadataForPayload':!![],'ignoreMetadataScope':!![],'ignoreMetadataSkillCode':!![]};}export function remoteMissingCompanyReadOptions(){const _0x520536=a50_0x3d45;return{'targetScope':_0x520536(0xd9),...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions()};}export function remoteMissingPersonalReadOptions(_0x282b87={}){return{...remoteFirstMetadataOptions(),...remoteMissingPayloadOptions(),..._0x282b87};}export function remotePersonalReadOptions(_0x425137,_0x25dff8={}){return{'ignoreInvalidMetadata':!![],..._0x425137?{'ignoreMetadataAppCodeMismatch':!![],'ignoreMetadataScope':!![]}:{},..._0x25dff8};}export function throwIfBuiltinPushTarget(_0x39d109){const _0x18cb1b=a50_0x3d45;if(_0x39d109?.['scope']!==_0x18cb1b(0xdb))return;throw CliErrors['validation']('Builtin\x20Skill\x20'+(_0x39d109[_0x18cb1b(0xcd)]??_0x18cb1b(0xd3))+_0x18cb1b(0xef),_0x18cb1b(0xed));}export function throwIfPublishValidationFailed(_0x84dfa8,_0x24961a,_0x4d066f){const _0x48865e=a50_0x3d45;if(_0x4d066f[_0x48865e(0xec)][_0x48865e(0xea)]===0x0&&(_0x4d066f['valid']||_0x4d066f[_0x48865e(0xd7)][_0x48865e(0xea)]>0x0))return;const _0x6fb631=_0x4d066f[_0x48865e(0xec)][_0x48865e(0xea)]>0x0?_0x4d066f[_0x48865e(0xec)][_0x48865e(0xf9)](';\x20'):_0x48865e(0xe6),_0x5d45d4=_0x84dfa8===_0x48865e(0xd9)?_0x48865e(0xfa):_0x48865e(0xe7);throw CliErrors[_0x48865e(0xd0)](_0x5d45d4+'\x20Skill\x20push\x20validation\x20failed\x20for\x20'+_0x24961a+'.',_0x6fb631);}export function throwIfUnconfirmedPublishWarnings(_0x429098,_0x4752df,_0xaee8e3,_0x4c3d7f){const _0x3a1a23=a50_0x3d45;if(_0xaee8e3[_0x3a1a23(0xea)]===0x0||_0x4c3d7f)return;const _0x38e870=_0x429098===_0x3a1a23(0xd9)?_0x3a1a23(0xfa):_0x3a1a23(0xe7);throw CliErrors['validation'](_0x38e870+_0x3a1a23(0xcb)+_0x4752df+'.',['Review\x20each\x20warning\x20before\x20continuing.',_0x3a1a23(0xf4),_0x3a1a23(0xe5),_0x3a1a23(0xe9)+_0xaee8e3[_0x3a1a23(0xf9)](';\x20')]['join']('\x20'));}export function buildRetargetWarning(_0x70edab,_0x21586a){const _0x450f97=a50_0x3d45;if(!_0x70edab?.['appCode']||_0x70edab[_0x450f97(0xda)]===_0x21586a)return[];return[{'level':'warning','ruleId':_0x450f97(0xd8),'file':_0x450f97(0xdf),'message':_0x450f97(0xeb)+_0x70edab[_0x450f97(0xda)]+_0x450f97(0xd1)+_0x21586a+'\x20after\x20successful\x20push.','suggestion':_0x450f97(0xf1)}];}export async function runRemoteContentPreflight(_0x276aa9){const _0x22c094=a50_0x3d45;if(!_0x276aa9[_0x22c094(0xca)]||_0x276aa9[_0x22c094(0xca)][_0x22c094(0xcf)]!==_0x276aa9[_0x22c094(0xcf)]||!_0x276aa9[_0x22c094(0xdc)][_0x22c094(0xe1)])return{'status':'not-applicable'};const _0x44d306=_0x276aa9['remote'][_0x22c094(0xcd)]||_0x276aa9[_0x22c094(0xcd)];if(!_0x44d306)return{'status':'not-applicable'};const _0x287d9a=await _0x276aa9[_0x22c094(0xee)](_0x276aa9[_0x22c094(0xcf)],_0x44d306,_0x276aa9[_0x22c094(0xda)],_0x276aa9['remote']['version']);try{_0x276aa9[_0x22c094(0xce)](_0x276aa9['publishInput'][_0x22c094(0xe1)],_0x287d9a);}catch{return{'status':_0x22c094(0xd4)};}return{'status':_0x22c094(0xe3),'savedSkill':{..._0x276aa9['remote'],'content':_0x276aa9[_0x22c094(0xdc)][_0x22c094(0xf3)],'files':_0x276aa9['publishInput']['files']}};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a378e,_0x35e601){const _0x3a6153=a51_0x1a92,_0x425efd=_0x2a378e();while(!![]){try{const _0x169233=parseInt(_0x3a6153(0xa7))/0x1+-parseInt(_0x3a6153(0xa1))/0x2*(-parseInt(_0x3a6153(0xa2))/0x3)+parseInt(_0x3a6153(0x9b))/0x4+-parseInt(_0x3a6153(0xb0))/0x5*(-parseInt(_0x3a6153(0x9e))/0x6)+-parseInt(_0x3a6153(0xad))/0x7*(-parseInt(_0x3a6153(0x9c))/0x8)+parseInt(_0x3a6153(0x9f))/0x9*(-parseInt(_0x3a6153(0x9a))/0xa)+-parseInt(_0x3a6153(0xa5))/0xb*(parseInt(_0x3a6153(0xa8))/0xc);if(_0x169233===_0x35e601)break;else _0x425efd['push'](_0x425efd['shift']());}catch(_0x8691b8){_0x425efd['push'](_0x425efd['shift']());}}}(a51_0x5282,0x8c709));export function withRetargetExistingMetadata(_0x5f3261,_0x3c2c0e,_0x26b9f0={}){const _0x247309=a51_0x1a92,_0x3822eb=_0x26b9f0[_0x247309(0x9d)]?_0x5f3261[_0x247309(0xb1)]??_0x3c2c0e[_0x247309(0xb1)]:_0x3c2c0e['skillName']??_0x5f3261['skillName'];return{..._0x5f3261,'skillName':_0x3822eb,'description':_0x3c2c0e['description']??_0x5f3261[_0x247309(0xaf)],'tags':Array[_0x247309(0xa4)](_0x3c2c0e[_0x247309(0xab)])?_0x3c2c0e[_0x247309(0xab)]:_0x5f3261[_0x247309(0xab)],'version':_0x3c2c0e[_0x247309(0xa3)]??_0x5f3261[_0x247309(0xa3)],'sourceSessionId':_0x3c2c0e[_0x247309(0xa0)]??_0x5f3261[_0x247309(0xa0)]};}export function buildRetargetWarning(_0x4a8635,_0x352047){const _0xbb6599=a51_0x1a92;if(!_0x4a8635?.[_0xbb6599(0xb2)]||_0x4a8635[_0xbb6599(0xb2)]===_0x352047)return[];return[{'level':_0xbb6599(0x99),'ruleId':'skill-metadata-appcode-retargeted','file':_0xbb6599(0xa6),'message':_0xbb6599(0xa9)+_0x4a8635[_0xbb6599(0xb2)]+_0xbb6599(0xac)+_0x352047+_0xbb6599(0xae),'suggestion':_0xbb6599(0xaa)}];}function a51_0x1a92(_0x2d0c9c,_0x259334){_0x2d0c9c=_0x2d0c9c-0x99;const _0x52828d=a51_0x5282();let _0x1a9237=_0x52828d[_0x2d0c9c];return _0x1a9237;}function a51_0x5282(){const _0x583535=['\x20was\x20retargeted\x20to\x20explicit\x20appCode\x20','3563BoCeTw','\x20after\x20successful\x20push.','description','1098745BEbKGx','skillName','appCode','warning','122950xEmNTD','3730464EIkmgR','11392XowyDR','preferInputSkillName','6ClLDOg','99ImOICS','sourceSessionId','235272LAeLST','12vUbsCo','version','isArray','16346ZhKxie','lovrabet.skill.json','566499FADELT','17796tTDysZ','Local\x20Skill\x20metadata\x20appCode\x20','Review\x20the\x20updated\x20local\x20Skill\x20metadata\x20before\x20the\x20next\x20push.','tags'];a51_0x5282=function(){return _0x583535;};return a51_0x5282();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a52_0x118c(){const _0x4cf9ef=['798394yFgDsZ','2315802FqXzPf','all','2333865pweHGq','605288yhJAeu','1tqwwzu','6037968TluLhv','personal','14FYrolP','Unsupported\x20Skill\x20sync\x20scope:\x20','trim','25430697xdapKu','Unsupported\x20Skill\x20list\x20scope:\x20','validation','company','2518134pcCoPe'];a52_0x118c=function(){return _0x4cf9ef;};return a52_0x118c();}(function(_0xd1c8ef,_0x580e66){const _0xeb5b7d=a52_0x99f2,_0x290399=_0xd1c8ef();while(!![]){try{const _0x488ca6=-parseInt(_0xeb5b7d(0x74))/0x1*(parseInt(_0xeb5b7d(0x6f))/0x2)+-parseInt(_0xeb5b7d(0x6e))/0x3+-parseInt(_0xeb5b7d(0x73))/0x4+parseInt(_0xeb5b7d(0x72))/0x5+parseInt(_0xeb5b7d(0x70))/0x6+parseInt(_0xeb5b7d(0x67))/0x7*(-parseInt(_0xeb5b7d(0x75))/0x8)+parseInt(_0xeb5b7d(0x6a))/0x9;if(_0x488ca6===_0x580e66)break;else _0x290399['push'](_0x290399['shift']());}catch(_0x80f836){_0x290399['push'](_0x290399['shift']());}}}(a52_0x118c,0xbe2e8));import{CliErrors}from'../../errors.js';function a52_0x99f2(_0x3b7e4a,_0x2e5fa3){_0x3b7e4a=_0x3b7e4a-0x66;const _0x118c73=a52_0x118c();let _0x99f2b5=_0x118c73[_0x3b7e4a];return _0x99f2b5;}export function normalizeSyncScopes(_0x42fca1){const _0x30f074=a52_0x99f2,_0x19fd67=_0x42fca1[_0x30f074(0x69)]();if(!_0x19fd67||_0x19fd67==='all')return[_0x30f074(0x66),_0x30f074(0x6d)];if(_0x19fd67===_0x30f074(0x66)||_0x19fd67===_0x30f074(0x6d))return[_0x19fd67];throw CliErrors['validation'](_0x30f074(0x68)+_0x42fca1);}export function normalizeListScope(_0x519514){const _0x570912=a52_0x99f2,_0x52b270=_0x519514[_0x570912(0x69)]();if(!_0x52b270)return _0x570912(0x71);if(_0x52b270===_0x570912(0x66)||_0x52b270==='company'||_0x52b270==='all')return _0x52b270;throw CliErrors[_0x570912(0x6c)](_0x570912(0x6b)+_0x519514);}export function shouldListScope(_0x305832,_0x4be2d5){const _0x541e7d=a52_0x99f2;if(_0x305832===_0x541e7d(0x71))return!![];return _0x305832===_0x4be2d5;}export function listScopeToRuntimeScopes(_0x2ff0a5){const _0x4f9830=a52_0x99f2;if(_0x2ff0a5===_0x4f9830(0x71))return[_0x4f9830(0x66),'company'];return[_0x2ff0a5===_0x4f9830(0x6d)?_0x4f9830(0x6d):_0x2ff0a5];}export function listScopeToRemoteScope(_0x4463ff){return _0x4463ff;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a24a8,_0x1ebf44){var _0x20f444=a53_0x5fcf,_0x3a8fcf=_0x5a24a8();while(!![]){try{var _0x415646=parseInt(_0x20f444(0x1d8))/0x1+parseInt(_0x20f444(0x1ea))/0x2*(-parseInt(_0x20f444(0x1dc))/0x3)+parseInt(_0x20f444(0x1de))/0x4*(-parseInt(_0x20f444(0x1db))/0x5)+-parseInt(_0x20f444(0x1d6))/0x6+-parseInt(_0x20f444(0x1e9))/0x7*(parseInt(_0x20f444(0x1d7))/0x8)+-parseInt(_0x20f444(0x1e7))/0x9+parseInt(_0x20f444(0x1e0))/0xa;if(_0x415646===_0x1ebf44)break;else _0x3a8fcf['push'](_0x3a8fcf['shift']());}catch(_0x4c7466){_0x3a8fcf['push'](_0x3a8fcf['shift']());}}}(a53_0xb59d,0xc51cd));export function summarizeRuntimeSkill(_0x20c0af){var _0x3ea4f7=a53_0x5fcf;return{'id':_0x20c0af['id'],'skillCode':_0x20c0af[_0x3ea4f7(0x1e2)],'skillName':_0x20c0af[_0x3ea4f7(0x1da)],'scope':_0x20c0af[_0x3ea4f7(0x1e8)],'version':_0x20c0af['version'],'readonly':_0x20c0af[_0x3ea4f7(0x1df)]};}function a53_0x5fcf(_0x21868d,_0x34f38f){_0x21868d=_0x21868d-0x1d6;var _0xb59d9b=a53_0xb59d();var _0x5fcf0f=_0xb59d9b[_0x21868d];return _0x5fcf0f;}export function summarizeLocalRuntimeSkill(_0x22ef98){var _0x2abe40=a53_0x5fcf;return{'id':_0x22ef98['id'],'skillCode':_0x22ef98[_0x2abe40(0x1e2)],'skillName':_0x22ef98['skillName'],'scope':_0x22ef98[_0x2abe40(0x1e8)],'appCode':_0x22ef98[_0x2abe40(0x1e3)],'version':_0x22ef98[_0x2abe40(0x1e6)],'status':_0x22ef98[_0x2abe40(0x1e5)],'readonly':_0x22ef98['readonly'],'tags':_0x22ef98['tags'],'dir':_0x22ef98[_0x2abe40(0x1e4)],'cacheDir':_0x22ef98[_0x2abe40(0x1e1)],'skillMdPath':_0x22ef98['skillMdPath'],'metadataPath':_0x22ef98[_0x2abe40(0x1d9)],'linkedPaths':_0x22ef98[_0x2abe40(0x1dd)],'contentHash':_0x22ef98['contentHash'],'treeHash':_0x22ef98['treeHash'],'pulledAt':_0x22ef98['pulledAt']};}function a53_0xb59d(){var _0x50e00e=['metadataPath','skillName','10SoBzlT','3NeZswO','linkedPaths','2251392xXVojQ','readonly','37244160cMwETE','cacheDir','skillCode','appCode','dir','status','version','5112477DYrWDT','scope','140YkvFzD','1408372BzXlYt','8128998XEMdUe','89552gemyJn','1059605TJMzsU'];a53_0xb59d=function(){return _0x50e00e;};return a53_0xb59d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x21c243=a54_0x46aa;(function(_0x34c273,_0x45ac60){const _0x289f98=a54_0x46aa,_0x2250b8=_0x34c273();while(!![]){try{const _0x2fea7b=-parseInt(_0x289f98(0x1d3))/0x1*(parseInt(_0x289f98(0x1da))/0x2)+-parseInt(_0x289f98(0x1e5))/0x3+-parseInt(_0x289f98(0x1f5))/0x4+-parseInt(_0x289f98(0x1e9))/0x5*(parseInt(_0x289f98(0x1f2))/0x6)+parseInt(_0x289f98(0x1d9))/0x7+-parseInt(_0x289f98(0x1ee))/0x8*(-parseInt(_0x289f98(0x1e0))/0x9)+parseInt(_0x289f98(0x1f7))/0xa;if(_0x2fea7b===_0x45ac60)break;else _0x2250b8['push'](_0x2250b8['shift']());}catch(_0x31a879){_0x2250b8['push'](_0x2250b8['shift']());}}}(a54_0x259e,0x29fa2));import{CliErrors}from'../../errors.js';function a54_0x46aa(_0x382933,_0x4b0060){_0x382933=_0x382933-0x1ce;const _0x259e1e=a54_0x259e();let _0x46aa4a=_0x259e1e[_0x382933];return _0x46aa4a;}export const SKILL_TYPES=['write',a54_0x21c243(0x1de),a54_0x21c243(0x1ec)];export const DEFAULT_SKILL_TARGET=a54_0x21c243(0x1e6);export const SKILL_NAME_PATTERN=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;export const RUNTIME_CONTRACT_FILE=a54_0x21c243(0x1d6);export const OUTPUT_CONTRACT_FILE=a54_0x21c243(0x1e2);function a54_0x259e(){const _0xa926b6=['477104giKUHU','join','trim','\x22\x0a\x20\x20generator:\x20\x22lovrabet\x20skill\x20create\x22\x0a---\x0a\x0a#\x20','580578eKHSls','1.\x20受控模板预览:【填写待维护内容、影响范围和预览方式】\x0a2.\x20用户确认:【填写确认信息和不可省略的人工判断点】\x0a3.\x20受控维护:【填写确认后的维护步骤和记录方式】\x0a4.\x20只读核对:【填写维护后的核对入口、差异和回滚/修正方式】','\x20只作为模板选择器,不替代业务权限、风险等级和用户确认。\x0a\x0a##\x20运行态入口\x0a\x0a【填写包内说明的运行态入口、可调用脚本或人工执行边界】\x0a\x0a##\x20凭证与登录态\x0a\x0a【填写本\x20Skill\x20依赖的第三方服务凭证和登录态治理方式。强烈建议通过\x20Lovrabet\x20应用后台或平台服务端适配器做平台托管配置;开发先行阶段如存在临时明文凭证,应标注后续治理计划、适用环境和额度边界,并避免进入长期交付内容。】\x0a\x0a##\x20第三方候选资产\x0a\x0a【填写第三方生成类结果的消费边界。生成类结果仅作为候选素材;涉及商品图、客户资料、Excel\x20或业务文件上传时,必须声明授权、额度、审计、失败降级和人工审核/业务\x20BFF\x20校验后的发布边界。】\x0a\x0a##\x20预览\x20/\x20写入\x20/\x20核对差异\x0a\x0a【填写预览、确认、正式执行和只读核对的顺序】\x0a\x0a','755884TRvUjM','SKILL.md','4429090PnRoZH','skillName','validation','---\x0aname:\x20','\x0a\x0a##\x20内部要求\x0a\x0a执行前必须读取并遵守\x20[runtime-contract.md](references/runtime-contract.md)\x20和\x20[output-contract.md](references/output-contract.md)。\x0a\x0a##\x20使用边界\x0a\x0a【填写该\x20Skill\x20能做什么、不能做什么、适用业务范围和禁止扩大执行范围】\x0a\x0a##\x20输入门禁\x0a\x0a【填写必须具备的输入;缺失业务对象、执行范围、确认信息或权限上下文时必须停止】\x0a\x0a##\x20与现有能力集成\x0a\x0a【填写本\x20Skill\x20使用的\x20lovrabet\x20data、lovrabet\x20sql、lovrabet\x20bff\x20或\x20lovrabet\x20personal-bff\x20命令,以及包内\x20references/\x20中沉淀的运行态入口、脚本对接方式或人工操作边界。不得依赖\x20Skill\x20目录外文件、绝对路径或本机专属配置。】\x0a\x0a##\x20平台能力优先\x0a\x0a【填写本\x20Skill\x20优先使用的\x20Lovrabet\x20平台命令:lovrabet\x20data\x20/\x20lovrabet\x20sql\x20/\x20lovrabet\x20bff\x20/\x20lovrabet\x20personal-bff。本地脚本仅用于平台明确不覆盖的文件格式转换、静态校验、展示整理或第三方薄适配;不得用本地脚本替代平台命令承载业务写入、权限判断、状态机、审批提交或回滚。】\x0a\x0a##\x20第三方服务边界\x0a\x0a【填写是否调用第三方识别、生成、上传或行业服务;如涉及\x20API\x20Key、OAuth、Cookie、登录态或业务数据上传,必须说明由\x20Lovrabet\x20应用后台、BFF\x20或平台适配器统一配置。目标治理口径是\x20Skill\x20不读取、不分发、不保存明文凭证。详细凭证、额度、审计和审核发布规则写入\x20references/runtime-contract.md。】\x0a\x0a##\x20SOP\x20工作流\x0a\x0a','##\x20业务状态流转\x0a\x0a【填写本\x20Skill\x20的前置业务状态、允许动作、目标业务状态、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对,以及\x20unknown\x20/\x20needs_manual_check\x20处理。状态迁移合法性必须由业务\x20BFF、Lovrabet\x20平台命令或服务端接口判断,Skill\x20不作为状态事实源。】','1.\x20只读查询:【填写查询入口、过滤条件和权限边界】\x0a2.\x20业务汇总:【填写统计口径、字段解释和异常提示】\x0a3.\x20查看链接:【填写可供运营人员复核的记录、页面或报告链接】\x0a4.\x20禁止写入:不得创建、更新、删除或触发会改变业务状态的动作。','21220YWTOjk','\x20类型默认不执行业务写入;如流程包含受控维护或人工确认,也必须用\x20mode\x20标明执行阶段并暴露核对结果。','#\x20Output\x20Contract\x0a\x0a','references/runtime-contract.md','Use\x20one\x20of:\x20','\x0adescription:\x20\x22【填写模型触发语义:用户在什么场景应使用本\x20Skill、不要使用的边界和关键词】\x22\x0a#\x20example:\x20\x22<填写一句用户可以直接说出的最简触发话术>\x22\x0ametadata:\x0a\x20\x20type:\x20','1048572steFzl','22JmzrDw','write','\x20的所有必读规则必须位于\x20SKILL.md\x20或\x20references/\x20内。\x0a\x0a##\x20必读文档\x0a\x0a-\x20[SKILL.md](../SKILL.md)\x0a-\x20[runtime-contract.md](runtime-contract.md)\x0a-\x20[output-contract.md](output-contract.md)\x0a\x0a##\x20主边界\x0a\x0a-\x20不得依赖\x20Skill\x20目录外的仓库文件、绝对路径、file\x20URL\x20或本机专属配置。\x0a-\x20文档中的缓存路径、安装路径、示例路径或排障路径不等于运行时包外依赖;只有明确要求读取、链接或执行包外内容时才属于自包含风险。\x0a-\x20如需承接仓库规范,必须把必要规则内化到本\x20Skill\x20包内的\x20references/\x20文件中。\x0a-\x20type=','Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens,\x20for\x20example\x20invoice-export.','read','Invalid\x20Skill\x20name:\x20','27dTlniA','type','references/output-contract.md','1.\x20dry-run:【填写预览入口、影响范围和差异摘要;不得写入业务数据】\x0a2.\x20用户确认:【填写确认语义、目标对象、数量、风险和操作者责任】\x0a3.\x20confirmed\x20写入:【填写确认后的写入入口和幂等/防重复要求】\x0a4.\x20只读核对:【填写写入后的查询核对、差异展示和结果链接】\x0a5.\x20checkpoint:【填写失败恢复、重试条件和人工接管方式】','includes','241581fJjEno','.agents/skills','\x0a\x20\x20created:\x20\x22','write\x20类型在\x20dry_run\x20下只展示预览、影响范围和差异,不写入业务数据。\x0aconfirmed\x20写入后必须执行读回核对,并把核对结果写入\x20verification。\x0a读回异常、业务状态未知或结果不一致时,status\x20必须为\x20partial_success、failed\x20或\x20needs_manual_check。','5EgcOXK','#\x20Runtime\x20Contract\x0a\x0aSkill\x20push\x20后的\x20zip\x20包就是完整交付产物。','test','trainer','\x20的最终回复必须让运营人员能判断:是否执行、影响了什么、如何复核、失败后下一步做什么。\x0a\x0a##\x20状态枚举\x0a\x0astatus:\x20success\x20|\x20no_op\x20|\x20partial_success\x20|\x20blocked\x20|\x20failed\x20|\x20needs_manual_check\x0a\x0a-\x20success:动作已完成,且关键结果已核对。\x0a-\x20no_op:没有符合条件的对象或无需变更。\x0a-\x20partial_success:部分对象完成,未完成对象必须进入\x20errors\x20和\x20nextActions。\x0a-\x20blocked:缺少输入、权限、确认或平台能力,无法继续。\x0a-\x20failed:执行失败,必须说明失败阶段、错误和恢复方式。\x0a-\x20needs_manual_check:读回异常、状态未知或人工判断缺失。\x0a\x0aunknown、partial_success、failed、needs_manual_check\x20不能包装为\x20success。\x0a\x0a##\x20输出模式\x0a\x0amode:\x20dry_run\x20|\x20confirmed\x20|\x20read_only\x0a\x0a-\x20dry_run:只展示预览、影响范围和差异,不写入业务数据。\x0a-\x20confirmed:用户明确确认后的执行模式;写入后必须读回核对。\x0a-\x20read_only:只查询、汇总或核对,不触发写入。\x0a\x0a##\x20必填字段\x0a\x0a-\x20status\x0a-\x20mode\x0a-\x20summary\x0a-\x20scope\x0a-\x20changes\x0a-\x20verification\x0a-\x20warnings\x0a-\x20errors\x0a-\x20nextActions\x0a\x0a##\x20写入结果\x0a\x0a'];a54_0x259e=function(){return _0xa926b6;};return a54_0x259e();}export function validateSkillName(_0x19bb0){const _0x6cad42=a54_0x21c243,_0x16c3ff=_0x19bb0[_0x6cad42(0x1f0)]();if(!SKILL_NAME_PATTERN[_0x6cad42(0x1eb)](_0x16c3ff))throw CliErrors['validation'](_0x6cad42(0x1df)+_0x19bb0+'.\x20Use\x20lowercase\x20letters,\x20numbers,\x20and\x20single\x20hyphens.',_0x6cad42(0x1dd));return _0x16c3ff;}export function normalizeSkillTemplateType(_0x21ce65){const _0x399605=a54_0x21c243,_0x256379=(_0x21ce65||_0x399605(0x1db))['trim']()||_0x399605(0x1db);if(SKILL_TYPES[_0x399605(0x1e4)](_0x256379))return _0x256379;throw CliErrors[_0x399605(0x1ce)]('Unsupported\x20Skill\x20type:\x20'+_0x21ce65,_0x399605(0x1d7)+SKILL_TYPES[_0x399605(0x1ef)](',\x20')+'.');}export function renderSkillTemplate(_0x3e70de){const _0x5e95ab=a54_0x21c243,_0x450ac7=validateSkillName(_0x3e70de[_0x5e95ab(0x1f8)]),_0x603641=normalizeSkillTemplateType(_0x3e70de[_0x5e95ab(0x1e1)]),_0x13e44c=_0x3e70de['timestamp']??new Date()['toISOString']();return{'skillName':_0x450ac7,'type':_0x603641,'files':[{'path':_0x5e95ab(0x1f6),'content':renderSkillMd(_0x450ac7,_0x603641,_0x13e44c)},{'path':RUNTIME_CONTRACT_FILE,'content':renderRuntimeContract(_0x450ac7,_0x603641)},{'path':OUTPUT_CONTRACT_FILE,'content':renderOutputContract(_0x450ac7,_0x603641)}]};}function renderSkillMd(_0x43ed41,_0x5472ad,_0x1006c3){const _0x416678=a54_0x21c243,_0x1a587d=typeWorkflow(_0x5472ad);return _0x416678(0x1cf)+_0x43ed41+_0x416678(0x1d8)+_0x5472ad+_0x416678(0x1e7)+_0x1006c3+_0x416678(0x1f1)+_0x43ed41+_0x416678(0x1d0)+_0x1a587d+'\x0a\x0a'+businessStateSection(_0x5472ad)+'\x0a\x0a##\x20展示规范\x0a\x0a【填写面向运营人员的展示字段、差异摘要、成功/失败状态和人工处理项;最终输出必须按\x20references/output-contract.md\x20的\x20status\x20/\x20mode\x20/\x20summary\x20/\x20errors\x20/\x20nextActions\x20返回,不能把\x20unknown、partial_success、failed\x20或\x20needs_manual_check\x20包装为\x20success。】\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败后的\x20checkpoint、重试条件、人工接管方式和避免重复写入的核对步骤】\x0a';}function renderRuntimeContract(_0x1f329d,_0x3673d4){const _0x20137f=a54_0x21c243,_0x5af2ab=_0x3673d4===_0x20137f(0x1db)?'##\x20状态读回与未知状态处理\x0a\x0a【填写业务状态事实源、fromStatus\x20->\x20toStatus\x20预览、写入后读回核对方式,以及\x20unknown\x20/\x20needs_manual_check\x20的处理边界】\x0a\x0a':'';return _0x20137f(0x1ea)+_0x1f329d+_0x20137f(0x1dc)+_0x3673d4+_0x20137f(0x1f4)+_0x5af2ab+'\x0a##\x20返回契约\x0a\x0a最终输出必须遵守\x20[output-contract.md](output-contract.md)。本文件只补充运行态安全约束;展示字段、状态枚举、失败暴露和人工处理项以\x20output-contract.md\x20为准。\x0a\x0a##\x20失败恢复\x0a\x0a【填写失败状态识别、checkpoint、重试和人工接管方式】\x0a\x0a##\x20禁止事项\x0a\x0a-\x20禁止链接或读取\x20Skill\x20目录外的\x20AGENTS.md、wiki、docs、脚本或个人路径作为运行时必读依赖。\x0a-\x20禁止把说明性的缓存路径、安装路径、示例路径或排障路径包装成运行时必读依赖。\x0a-\x20禁止在未确认影响范围时执行写入。\x0a-\x20禁止隐藏失败或把未知状态描述为成功。\x0a';}function renderOutputContract(_0x361bf3,_0x4153bf){const _0x9a4e7b=a54_0x21c243,_0x2adab1=_0x4153bf===_0x9a4e7b(0x1db)?_0x9a4e7b(0x1e8):_0x4153bf+_0x9a4e7b(0x1d4);return _0x9a4e7b(0x1d5)+_0x361bf3+_0x9a4e7b(0x1ed)+_0x2adab1+'\x0a\x0a##\x20错误与人工接管\x0a\x0aerrors\x20必须包含失败阶段、错误原因和可复核对象。\x0anextActions\x20必须给出重试、补充输入、人工接管或停止处理的动作。\x0a';}function typeWorkflow(_0x21019c){const _0x3ed726=a54_0x21c243;if(_0x21019c===_0x3ed726(0x1de))return _0x3ed726(0x1d2);if(_0x21019c===_0x3ed726(0x1ec))return _0x3ed726(0x1f3);return _0x3ed726(0x1e3);}function businessStateSection(_0x3d48cf){const _0x6adb71=a54_0x21c243;if(_0x3d48cf!==_0x6adb71(0x1db))return'';return _0x6adb71(0x1d1);}
|