@lovrabet/lovrabet-cli 2.3.2-beta.2 → 2.3.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x182910,_0x35a669){const _0xc74c02=a147_0x3195,_0xdc365b=_0x182910();while(!![]){try{const _0x23eed0=parseInt(_0xc74c02(0x11f))/0x1+parseInt(_0xc74c02(0x149))/0x2+parseInt(_0xc74c02(0x129))/0x3+-parseInt(_0xc74c02(0x151))/0x4*(-parseInt(_0xc74c02(0x122))/0x5)+-parseInt(_0xc74c02(0x139))/0x6*(-parseInt(_0xc74c02(0x12a))/0x7)+-parseInt(_0xc74c02(0x11d))/0x8*(-parseInt(_0xc74c02(0x127))/0x9)+-parseInt(_0xc74c02(0x12f))/0xa;if(_0x23eed0===_0x35a669)break;else _0xdc365b['push'](_0xdc365b['shift']());}catch(_0xefb99a){_0xdc365b['push'](_0xdc365b['shift']());}}}(a147_0x13c5,0x20075));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a147_0x4d476c}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';function a147_0x3195(_0x572602,_0xfede50){_0x572602=_0x572602-0x11a;const _0x13c5b5=a147_0x13c5();let _0x319522=_0x13c5b5[_0x572602];return _0x319522;}import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x3d924a,_0x2f822d,_0x109669={}){const _0x6901f0=a147_0x3195,_0x258708=resolvePushDirectoryRoot(_0x3d924a),_0x246a84=readPushMetadataIfPresent(resolve(_0x258708,METADATA_FILE),{'ignoreInvalidMetadata':_0x109669[_0x6901f0(0x125)]});if(_0x246a84?.[_0x6901f0(0x140)]&&_0x246a84[_0x6901f0(0x140)]!==_0x2f822d&&!_0x109669[_0x6901f0(0x13a)]&&!_0x109669[_0x6901f0(0x12b)])throw CliErrors[_0x6901f0(0x12e)]('Skill\x20metadata\x20appCode\x20\x22'+_0x246a84[_0x6901f0(0x140)]+_0x6901f0(0x143)+_0x2f822d+'\x22.');const _0x150e28=resolvePushSkillCode(_0x258708,_0x2f822d,_0x246a84,_0x109669);if(!_0x150e28)throw CliErrors['validation'](_0x6901f0(0x135)+SKILL_FILE+',\x20'+METADATA_FILE+_0x6901f0(0x15b));return{'dir':_0x258708,'skillCode':_0x150e28,'metadata':_0x246a84};}export function readPushDirectory(_0x5a66db,_0x3d7d8d,_0x2631b8={}){const _0x10ee9b=a147_0x3195,_0x37f928=resolvePushDirectoryIdentity(_0x5a66db,_0x3d7d8d,_0x2631b8),_0x9181f3=_0x37f928[_0x10ee9b(0x141)],_0x41d861=resolve(_0x9181f3,SKILL_FILE);if(!existsSync(_0x41d861)||!lstatSync(_0x41d861)['isFile']())throw CliErrors[_0x10ee9b(0x12e)](_0x10ee9b(0x12c)+SKILL_FILE+':\x20'+_0x41d861);const _0x23bb73=_0x37f928[_0x10ee9b(0x133)],_0x4d25c3=_0x2631b8[_0x10ee9b(0x123)]??_0x10ee9b(0x15a);if(!_0x2631b8[_0x10ee9b(0x137)]&&_0x23bb73?.[_0x10ee9b(0x11c)]==='builtin')throw CliErrors[_0x10ee9b(0x12e)](_0x10ee9b(0x144)+METADATA_FILE+_0x10ee9b(0x147)+_0x23bb73[_0x10ee9b(0x11c)]+'\x22.');if(!_0x2631b8[_0x10ee9b(0x137)]&&_0x4d25c3===_0x10ee9b(0x15a)&&_0x23bb73?.[_0x10ee9b(0x11c)]&&_0x23bb73['scope']!==_0x10ee9b(0x15a))throw CliErrors['validation'](_0x10ee9b(0x138)+METADATA_FILE+_0x10ee9b(0x147)+_0x23bb73[_0x10ee9b(0x11c)]+'\x22.',_0x10ee9b(0x13d)+_0x9181f3+_0x10ee9b(0x136));const _0x2d74f5=scanSkillDirectory(_0x9181f3,{'excludedFilePaths':_0x2631b8[_0x10ee9b(0x120)]}),_0x459881=buildSkillPackage(_0x2d74f5),_0x2b8aa4=readFileSync(_0x41d861,_0x10ee9b(0x11a)),_0xef8d4f=_0x37f928[_0x10ee9b(0x13e)],_0x529879=_0x2631b8[_0x10ee9b(0x12d)]?undefined:_0x23bb73,_0xc58b43=readSkillDisplayName(_0x2b8aa4);return{'skillCode':_0xef8d4f,'metadata':_0x23bb73,'frontmatterDisplayName':_0xc58b43,'input':{'skillCode':_0xef8d4f,'skillName':_0xc58b43??_0x529879?.[_0x10ee9b(0x142)],'description':_0x529879?.['description'],'content':_0x2b8aa4,'files':_0x459881['manifest'],'packageBase64':_0x459881[_0x10ee9b(0x11e)],'tags':_0x529879?.[_0x10ee9b(0x146)],'version':_0x529879?.['version'],'sourceSessionId':_0x529879?.[_0x10ee9b(0x154)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1addc5,_0x26646d,_0x38c0fc,_0x149699={}){const _0x3f3156=a147_0x3195,_0x3dcd65=resolvePushDirectoryRoot(_0x1addc5),_0x412a37=readPushMetadataIfPresent(resolve(_0x3dcd65,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x47d4f7=requireRemoteScope(_0x26646d),_0x2f9893=readLocalSkillContent(_0x3dcd65),_0x3cb5f0={..._0x26646d,'appCode':_0x26646d['appCode']??_0x38c0fc,'skillName':_0x26646d['skillName']??_0x412a37?.[_0x3f3156(0x142)],'description':_0x26646d['description']??_0x412a37?.['description'],'example':_0x26646d[_0x3f3156(0x132)]??_0x412a37?.[_0x3f3156(0x132)],'tags':Array['isArray'](_0x26646d['tags'])?_0x26646d[_0x3f3156(0x146)]:_0x412a37?.[_0x3f3156(0x146)],'sourceSessionId':_0x26646d[_0x3f3156(0x154)]??_0x412a37?.['sourceSessionId'],'content':_0x26646d['content']??_0x2f9893},_0xfe7964=buildMetadata(_0x3cb5f0,_0x47d4f7,_0x38c0fc,contentHash(_0x2f9893),_0x149699[_0x3f3156(0x128)]);writeJsonAtomic(resolve(_0x3dcd65,METADATA_FILE),_0xfe7964);}export function recordPushedRuntimeSkill(_0x19e369,_0x49404f,_0x10b515,_0x170cb3={}){const _0x52118f=a147_0x3195,_0x5234e0=resolvePushDirectoryRoot(_0x19e369),_0x5abae3=scanSkillDirectory(_0x5234e0),_0x397cec=_0x5abae3[_0x52118f(0x14e)](_0xdbd168=>_0xdbd168[_0x52118f(0x145)]===SKILL_FILE),_0x860db6=_0x397cec?fileText(_0x397cec):'',_0x3b78cf=tryNormalizePackageManifest(_0x49404f['files']),_0x1828cf={..._0x49404f,'content':_0x49404f[_0x52118f(0x13c)]??_0x860db6,'files':_0x3b78cf},_0x50fcc7=_0x3b78cf?normalizeLocalFiles(_0x5abae3)['filter'](_0xb77cd4=>_0x3b78cf['files'][_0x52118f(0x121)](_0x40cd2a=>_0x40cd2a[_0x52118f(0x145)]===_0xb77cd4[_0x52118f(0x145)])):undefined,_0x45911e=buildMetadata(_0x1828cf,_0x170cb3['scope']??_0x52118f(0x15a),_0x10b515,contentHash(_0x1828cf[_0x52118f(0x13c)]??''),_0x170cb3['pushedAt'],_0x50fcc7);writeJsonAtomic(resolve(_0x5234e0,METADATA_FILE),_0x45911e);}function a147_0x13c5(){const _0x306dc6=['boolean','\x20has\x20unsupported\x20scope\x20\x22','\x20name\x20for\x20SkillHub\x20slug\x20generation.','personal',',\x20or\x20directory\x20name.','utf8','isArray','scope','440912JQwkOB','packageBase64','95287lqtsga','excludedFilePaths','some','5dwtLCg','targetScope','Skill\x20directory\x20not\x20found:\x20','ignoreInvalidMetadata','company','9iOvEHp','refreshedAt','111567JCGCNz','409927cAxuFl','ignoreMetadataAppCodeMismatch','Missing\x20','ignoreMetadataForPayload','validation','5202790esSMog','unknown','name','example','metadata','match','Unable\x20to\x20resolve\x20skillCode\x20from\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','ignoreMetadataScope','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','24tbpRzX','allowAppCodeRetarget','trim','content','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','skillCode','replace','appCode','dir','skillName','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','path','tags','\x20has\x20scope=\x22','isSymbolicLink','260592DfSeHh','toLowerCase','isFile','displayName','string','find','Remote\x20Skill\x20','object','397352IEVbPP','isDirectory','startsWith','sourceSessionId','slice','builtin'];a147_0x13c5=function(){return _0x306dc6;};return a147_0x13c5();}export function deriveSkillCodeFromDirectory(_0x571c0f,_0x9f2800){const _0x2816d6=a147_0x3195,_0x546366=basename(resolve(_0x571c0f)),_0x22d01c=_0x9f2800+'--';return _0x546366[_0x2816d6(0x153)](_0x22d01c)?_0x546366[_0x2816d6(0x155)](_0x22d01c['length']):_0x546366;}function resolvePushSkillCode(_0x5f053a,_0x19fc65,_0x322683,_0xd252d0){const _0x43355f=deriveSkillCodeFromSkillFile(_0x5f053a)||deriveSkillCodeFromDirectory(_0x5f053a,_0x19fc65);if(_0xd252d0['ignoreMetadataSkillCode'])return _0x43355f;return _0x322683?.['skillCode']?.['trim']()||_0x43355f;}function deriveSkillCodeFromSkillFile(_0x347b7b){const _0xeb2f1e=a147_0x3195,_0x362a8c=resolve(_0x347b7b,SKILL_FILE);if(!existsSync(_0x362a8c)||!lstatSync(_0x362a8c)['isFile']())return undefined;const _0x2b82d4=readFileSync(_0x362a8c,'utf8'),_0x572bb1=_0x2b82d4[_0xeb2f1e(0x134)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x572bb1)return undefined;const _0xc8905a=parseFrontmatterObject(_0x572bb1[0x1]??''),_0x452bb6=scalarToString(_0xc8905a?.[_0xeb2f1e(0x131)]);return _0x452bb6?slugifySkillName(_0x452bb6):undefined;}function readSkillDisplayName(_0x4862c5){const _0x54df88=a147_0x3195,_0x4f1cdc=_0x4862c5[_0x54df88(0x134)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4f1cdc)return undefined;const _0x407eee=parseFrontmatterObject(_0x4f1cdc[0x1]??'');return scalarToString(_0x407eee?.[_0x54df88(0x14c)]);}function slugifySkillName(_0x505a7f){const _0xd3cc64=a147_0x3195,_0x4e36d2=_0x505a7f[_0xd3cc64(0x13b)]()[_0xd3cc64(0x14a)]()[_0xd3cc64(0x13f)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0xd3cc64(0x13f)](/^-+/,'')[_0xd3cc64(0x13f)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x4e36d2)throw CliErrors[_0xd3cc64(0x12e)]('Invalid\x20'+SKILL_FILE+_0xd3cc64(0x159));return _0x4e36d2;}function parseFrontmatterObject(_0x503872){const _0x5b5061=a147_0x3195;try{const _0x25b197=a147_0x4d476c(_0x503872);return _0x25b197&&typeof _0x25b197===_0x5b5061(0x150)&&!Array[_0x5b5061(0x11b)](_0x25b197)?_0x25b197:undefined;}catch{return undefined;}}function scalarToString(_0x27e4bc){const _0x154695=a147_0x3195;if(typeof _0x27e4bc===_0x154695(0x14d))return _0x27e4bc[_0x154695(0x13b)]();if(typeof _0x27e4bc==='number'||typeof _0x27e4bc===_0x154695(0x157))return String(_0x27e4bc);return undefined;}function resolvePushDirectoryRoot(_0xa4424){const _0x5aac2a=a147_0x3195,_0x172e75=resolve(_0xa4424);if(!existsSync(_0x172e75))throw CliErrors[_0x5aac2a(0x12e)](_0x5aac2a(0x124)+_0xa4424);const _0x139367=lstatSync(_0x172e75);if(_0x139367[_0x5aac2a(0x152)]())return _0x172e75;if(_0x139367[_0x5aac2a(0x148)]()){const _0x260fd9=realpathSync(_0x172e75);if(lstatSync(_0x260fd9)[_0x5aac2a(0x152)]())return _0x260fd9;}throw CliErrors['validation'](_0x5aac2a(0x124)+_0xa4424);}function requireRemoteScope(_0xd04f25){const _0x2212a4=a147_0x3195;if(_0xd04f25[_0x2212a4(0x11c)]==='personal'||_0xd04f25['scope']===_0x2212a4(0x126)||_0xd04f25[_0x2212a4(0x11c)]===_0x2212a4(0x156))return _0xd04f25['scope'];throw CliErrors[_0x2212a4(0x12e)](_0x2212a4(0x14f)+(_0xd04f25[_0x2212a4(0x13e)]||'(unknown)')+_0x2212a4(0x158)+(_0xd04f25[_0x2212a4(0x11c)]??_0x2212a4(0x130))+'\x22.');}function readLocalSkillContent(_0x266986){const _0x2fbbf4=a147_0x3195,_0x1767f8=resolve(_0x266986,SKILL_FILE);return existsSync(_0x1767f8)&&lstatSync(_0x1767f8)[_0x2fbbf4(0x14b)]()?readFileSync(_0x1767f8,_0x2fbbf4(0x11a)):'';}function readPushMetadataIfPresent(_0x2acea2,_0x281914={}){const _0x457f9c=a147_0x3195;try{return readMetadataIfPresent(_0x2acea2);}catch(_0x4253ce){if(_0x281914[_0x457f9c(0x125)])return undefined;throw _0x4253ce;}}
|
|
1
|
+
(function(_0x429b4f,_0x306569){const _0x18e0d3=a147_0x23da,_0x36b0bb=_0x429b4f();while(!![]){try{const _0x133f95=-parseInt(_0x18e0d3(0x198))/0x1+parseInt(_0x18e0d3(0x1bd))/0x2*(-parseInt(_0x18e0d3(0x1ae))/0x3)+-parseInt(_0x18e0d3(0x195))/0x4+-parseInt(_0x18e0d3(0x1a8))/0x5*(parseInt(_0x18e0d3(0x192))/0x6)+parseInt(_0x18e0d3(0x1bf))/0x7*(-parseInt(_0x18e0d3(0x18c))/0x8)+-parseInt(_0x18e0d3(0x19b))/0x9+parseInt(_0x18e0d3(0x1aa))/0xa;if(_0x133f95===_0x306569)break;else _0x36b0bb['push'](_0x36b0bb['shift']());}catch(_0x3695df){_0x36b0bb['push'](_0x36b0bb['shift']());}}}(a147_0xd692,0x73390));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a147_0xd692(){const _0x4de45e=['refreshedAt','description','files','24YLayEN','skillCode','Invalid\x20','ignoreInvalidMetadata','match','tags','539862ofaKLS','string','scope','3261576cBLErz','\x20has\x20unsupported\x20scope\x20\x22','validation','371676EifnRt','find','skillName','7465104HVjNCL','slice','isArray','content','length','example','toLowerCase','replace','targetScope','filter','excludedFilePaths','unknown','ignoreMetadataAppCodeMismatch','35PPhMxc','Skill\x20directory\x20not\x20found:\x20','46360600nVxvmr','number','some','path','51636RxvIcc','sourceSessionId','personal','isFile','dir','isDirectory','boolean','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','(unknown)','pushedAt','builtin','utf8','Unable\x20to\x20resolve\x20skillCode\x20from\x20','displayName','company','104xDWRKd','appCode','1453011TQVijt','ignoreMetadataScope','Remote\x20Skill\x20','ignoreMetadataForPayload','Missing\x20','packageBase64','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','version','manifest',',\x20or\x20directory\x20name.','trim','\x20has\x20scope=\x22','metadata'];a147_0xd692=function(){return _0x4de45e;};return a147_0xd692();}import{basename,resolve}from'node:path';function a147_0x23da(_0x4b78d8,_0x204a5e){_0x4b78d8=_0x4b78d8-0x18b;const _0xd69209=a147_0xd692();let _0x23daba=_0xd69209[_0x4b78d8];return _0x23daba;}import{parse as a147_0x56441c}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x1a99d8,_0x49cfc4,_0x3a8839={}){const _0x575dcd=a147_0x23da,_0x4a532e=resolvePushDirectoryRoot(_0x1a99d8),_0x381344=readPushMetadataIfPresent(resolve(_0x4a532e,METADATA_FILE),{'ignoreInvalidMetadata':_0x3a8839['ignoreInvalidMetadata']});if(_0x381344?.[_0x575dcd(0x1be)]&&_0x381344[_0x575dcd(0x1be)]!==_0x49cfc4&&!_0x3a8839['allowAppCodeRetarget']&&!_0x3a8839[_0x575dcd(0x1a7)])throw CliErrors[_0x575dcd(0x197)]('Skill\x20metadata\x20appCode\x20\x22'+_0x381344[_0x575dcd(0x1be)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x49cfc4+'\x22.');const _0x1743fb=resolvePushSkillCode(_0x4a532e,_0x49cfc4,_0x381344,_0x3a8839);if(!_0x1743fb)throw CliErrors[_0x575dcd(0x197)](_0x575dcd(0x1ba)+SKILL_FILE+',\x20'+METADATA_FILE+_0x575dcd(0x1c8));return{'dir':_0x4a532e,'skillCode':_0x1743fb,'metadata':_0x381344};}export function readPushDirectory(_0x127bf1,_0x21b46f,_0x16cd7a={}){const _0x34d795=a147_0x23da,_0x2d9e3a=resolvePushDirectoryIdentity(_0x127bf1,_0x21b46f,_0x16cd7a),_0x47a942=_0x2d9e3a[_0x34d795(0x1b2)],_0x44b108=resolve(_0x47a942,SKILL_FILE);if(!existsSync(_0x44b108)||!lstatSync(_0x44b108)[_0x34d795(0x1b1)]())throw CliErrors['validation'](_0x34d795(0x1c3)+SKILL_FILE+':\x20'+_0x44b108);const _0x542d94=_0x2d9e3a[_0x34d795(0x1cb)],_0x1f5669=_0x16cd7a[_0x34d795(0x1a3)]??_0x34d795(0x1b0);if(!_0x16cd7a[_0x34d795(0x1c0)]&&_0x542d94?.[_0x34d795(0x194)]==='builtin')throw CliErrors[_0x34d795(0x197)](_0x34d795(0x1b5)+METADATA_FILE+_0x34d795(0x1ca)+_0x542d94[_0x34d795(0x194)]+'\x22.');if(!_0x16cd7a[_0x34d795(0x1c0)]&&_0x1f5669===_0x34d795(0x1b0)&&_0x542d94?.[_0x34d795(0x194)]&&_0x542d94['scope']!==_0x34d795(0x1b0))throw CliErrors[_0x34d795(0x197)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x34d795(0x1ca)+_0x542d94[_0x34d795(0x194)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x47a942+_0x34d795(0x1c5));const _0x15a341=scanSkillDirectory(_0x47a942,{'excludedFilePaths':_0x16cd7a[_0x34d795(0x1a5)]}),_0x249d52=buildSkillPackage(_0x15a341),_0x19647b=readFileSync(_0x44b108,'utf8'),_0x4614da=_0x2d9e3a[_0x34d795(0x18d)],_0x408fc0=_0x16cd7a[_0x34d795(0x1c2)]?undefined:_0x542d94,_0x3cc065=readSkillDisplayName(_0x19647b);return{'skillCode':_0x4614da,'metadata':_0x542d94,'frontmatterDisplayName':_0x3cc065,'input':{'skillCode':_0x4614da,'skillName':_0x3cc065??_0x408fc0?.[_0x34d795(0x19a)],'description':_0x408fc0?.[_0x34d795(0x1cd)],'content':_0x19647b,'files':_0x249d52[_0x34d795(0x1c7)],'packageBase64':_0x249d52[_0x34d795(0x1c4)],'tags':_0x408fc0?.[_0x34d795(0x191)],'version':_0x408fc0?.[_0x34d795(0x1c6)],'sourceSessionId':_0x408fc0?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x157c63,_0x128503,_0x38bad9,_0x20da56={}){const _0x7aa8ad=a147_0x23da,_0x1f9e78=resolvePushDirectoryRoot(_0x157c63),_0x108ce4=readPushMetadataIfPresent(resolve(_0x1f9e78,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x27f606=requireRemoteScope(_0x128503),_0x60e458=readLocalSkillContent(_0x1f9e78),_0x37b451={..._0x128503,'appCode':_0x128503[_0x7aa8ad(0x1be)]??_0x38bad9,'skillName':_0x128503[_0x7aa8ad(0x19a)]??_0x108ce4?.['skillName'],'description':_0x128503[_0x7aa8ad(0x1cd)]??_0x108ce4?.[_0x7aa8ad(0x1cd)],'example':_0x128503['example']??_0x108ce4?.[_0x7aa8ad(0x1a0)],'tags':Array[_0x7aa8ad(0x19d)](_0x128503['tags'])?_0x128503[_0x7aa8ad(0x191)]:_0x108ce4?.[_0x7aa8ad(0x191)],'sourceSessionId':_0x128503[_0x7aa8ad(0x1af)]??_0x108ce4?.[_0x7aa8ad(0x1af)],'content':_0x128503[_0x7aa8ad(0x19e)]??_0x60e458},_0xbe0b23=buildMetadata(_0x37b451,_0x27f606,_0x38bad9,contentHash(_0x60e458),_0x20da56[_0x7aa8ad(0x1cc)]);writeJsonAtomic(resolve(_0x1f9e78,METADATA_FILE),_0xbe0b23);}export function recordPushedRuntimeSkill(_0x41ad31,_0x1f1d6a,_0x2c780b,_0x5ee49d={}){const _0x1cef35=a147_0x23da,_0x26ca84=resolvePushDirectoryRoot(_0x41ad31),_0x2e2fe0=scanSkillDirectory(_0x26ca84),_0x20bc38=_0x2e2fe0[_0x1cef35(0x199)](_0xfe1eda=>_0xfe1eda[_0x1cef35(0x1ad)]===SKILL_FILE),_0x4c2bb1=_0x20bc38?fileText(_0x20bc38):'',_0x2b3525=tryNormalizePackageManifest(_0x1f1d6a[_0x1cef35(0x18b)]),_0x5017c8={..._0x1f1d6a,'content':_0x1f1d6a[_0x1cef35(0x19e)]??_0x4c2bb1,'files':_0x2b3525},_0x20435e=_0x2b3525?normalizeLocalFiles(_0x2e2fe0)[_0x1cef35(0x1a4)](_0x377886=>_0x2b3525[_0x1cef35(0x18b)][_0x1cef35(0x1ac)](_0x6db4c0=>_0x6db4c0[_0x1cef35(0x1ad)]===_0x377886['path'])):undefined,_0x3e1e21=buildMetadata(_0x5017c8,_0x5ee49d['scope']??_0x1cef35(0x1b0),_0x2c780b,contentHash(_0x5017c8[_0x1cef35(0x19e)]??''),_0x5ee49d[_0x1cef35(0x1b7)],_0x20435e);writeJsonAtomic(resolve(_0x26ca84,METADATA_FILE),_0x3e1e21);}export function deriveSkillCodeFromDirectory(_0x359b88,_0x3cf2d5){const _0x4cf489=a147_0x23da,_0xab6d05=basename(resolve(_0x359b88)),_0x65910=_0x3cf2d5+'--';return _0xab6d05['startsWith'](_0x65910)?_0xab6d05[_0x4cf489(0x19c)](_0x65910[_0x4cf489(0x19f)]):_0xab6d05;}function resolvePushSkillCode(_0x92769c,_0x21e144,_0x4392bb,_0x56f250){const _0x188396=a147_0x23da,_0x4d0c29=deriveSkillCodeFromSkillFile(_0x92769c)||deriveSkillCodeFromDirectory(_0x92769c,_0x21e144);if(_0x56f250['ignoreMetadataSkillCode'])return _0x4d0c29;return _0x4392bb?.[_0x188396(0x18d)]?.[_0x188396(0x1c9)]()||_0x4d0c29;}function deriveSkillCodeFromSkillFile(_0x70c97d){const _0x216955=a147_0x23da,_0x5a7d7f=resolve(_0x70c97d,SKILL_FILE);if(!existsSync(_0x5a7d7f)||!lstatSync(_0x5a7d7f)[_0x216955(0x1b1)]())return undefined;const _0x38c28d=readFileSync(_0x5a7d7f,'utf8'),_0xdd946d=_0x38c28d[_0x216955(0x190)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xdd946d)return undefined;const _0x13be12=parseFrontmatterObject(_0xdd946d[0x1]??''),_0x2b5962=scalarToString(_0x13be12?.['name']);return _0x2b5962?slugifySkillName(_0x2b5962):undefined;}function readSkillDisplayName(_0x20b620){const _0x5627a7=a147_0x23da,_0x200846=_0x20b620[_0x5627a7(0x190)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x200846)return undefined;const _0x3ad882=parseFrontmatterObject(_0x200846[0x1]??'');return scalarToString(_0x3ad882?.[_0x5627a7(0x1bb)]);}function slugifySkillName(_0x1c787c){const _0x562ea0=a147_0x23da,_0x45c15c=_0x1c787c[_0x562ea0(0x1c9)]()[_0x562ea0(0x1a1)]()[_0x562ea0(0x1a2)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x562ea0(0x1a2)](/^-+/,'')['replace'](/-+$/,'')[_0x562ea0(0x1a2)](/-{2,}/g,'-');if(!_0x45c15c)throw CliErrors[_0x562ea0(0x197)](_0x562ea0(0x18e)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x45c15c;}function parseFrontmatterObject(_0xe1dfcc){const _0xccdb12=a147_0x23da;try{const _0xde4ae8=a147_0x56441c(_0xe1dfcc);return _0xde4ae8&&typeof _0xde4ae8==='object'&&!Array[_0xccdb12(0x19d)](_0xde4ae8)?_0xde4ae8:undefined;}catch{return undefined;}}function scalarToString(_0x1125bd){const _0x4421d2=a147_0x23da;if(typeof _0x1125bd===_0x4421d2(0x193))return _0x1125bd[_0x4421d2(0x1c9)]();if(typeof _0x1125bd===_0x4421d2(0x1ab)||typeof _0x1125bd===_0x4421d2(0x1b4))return String(_0x1125bd);return undefined;}function resolvePushDirectoryRoot(_0x10f6f4){const _0x59738c=a147_0x23da,_0x56ad5a=resolve(_0x10f6f4);if(!existsSync(_0x56ad5a))throw CliErrors[_0x59738c(0x197)](_0x59738c(0x1a9)+_0x10f6f4);const _0x173c30=lstatSync(_0x56ad5a);if(_0x173c30[_0x59738c(0x1b3)]())return _0x56ad5a;if(_0x173c30['isSymbolicLink']()){const _0x20953c=realpathSync(_0x56ad5a);if(lstatSync(_0x20953c)['isDirectory']())return _0x20953c;}throw CliErrors['validation'](_0x59738c(0x1a9)+_0x10f6f4);}function requireRemoteScope(_0x43a255){const _0x3b0126=a147_0x23da;if(_0x43a255[_0x3b0126(0x194)]===_0x3b0126(0x1b0)||_0x43a255[_0x3b0126(0x194)]===_0x3b0126(0x1bc)||_0x43a255[_0x3b0126(0x194)]===_0x3b0126(0x1b8))return _0x43a255[_0x3b0126(0x194)];throw CliErrors[_0x3b0126(0x197)](_0x3b0126(0x1c1)+(_0x43a255['skillCode']||_0x3b0126(0x1b6))+_0x3b0126(0x196)+(_0x43a255[_0x3b0126(0x194)]??_0x3b0126(0x1a6))+'\x22.');}function readLocalSkillContent(_0x1c110e){const _0x472798=a147_0x23da,_0x1ca8fb=resolve(_0x1c110e,SKILL_FILE);return existsSync(_0x1ca8fb)&&lstatSync(_0x1ca8fb)[_0x472798(0x1b1)]()?readFileSync(_0x1ca8fb,_0x472798(0x1b9)):'';}function readPushMetadataIfPresent(_0x2d85a9,_0x21a725={}){const _0x581d00=a147_0x23da;try{return readMetadataIfPresent(_0x2d85a9);}catch(_0x313582){if(_0x21a725[_0x581d00(0x18f)])return undefined;throw _0x313582;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x304fa2,_0x21b4f5){const _0x98522d=a148_0x1b0c,_0xdf99df=_0x304fa2();while(!![]){try{const _0x302a47=-parseInt(_0x98522d(0xe1))/0x1*(parseInt(_0x98522d(0xd7))/0x2)+parseInt(_0x98522d(0xdd))/0x3+parseInt(_0x98522d(0xde))/0x4+-parseInt(_0x98522d(0xdf))/0x5*(-parseInt(_0x98522d(0xdb))/0x6)+parseInt(_0x98522d(0xe6))/0x7*(-parseInt(_0x98522d(0xd8))/0x8)+-parseInt(_0x98522d(0xd9))/0x9*(-parseInt(_0x98522d(0xe2))/0xa)+-parseInt(_0x98522d(0xe4))/0xb;if(_0x302a47===_0x21b4f5)break;else _0xdf99df['push'](_0xdf99df['shift']());}catch(_0x2a32ac){_0xdf99df['push'](_0xdf99df['shift']());}}}(a148_0x5878,0xc0b86));function a148_0x1b0c(_0x139c62,_0x7832b){_0x139c62=_0x139c62-0xd6;const _0x58780c=a148_0x5878();let _0x1b0ced=_0x58780c[_0x139c62];return _0x1b0ced;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x16a1ad){const _0xff073=a148_0x1b0c,_0x4ee366=_0x16a1ad&&_0x16a1ad['length']>0x0?_0x16a1ad:[_0xff073(0xe5),_0xff073(0xe0),'builtin'],_0x4bec6a=[];for(const _0x1f2fa6 of _0x4ee366){if(!isRuntimeSkillScope(_0x1f2fa6))throw CliErrors[_0xff073(0xd6)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x1f2fa6);!_0x4bec6a[_0xff073(0xe3)](_0x1f2fa6)&&_0x4bec6a[_0xff073(0xdc)](_0x1f2fa6);}return _0x4bec6a;}function a148_0x5878(){const _0x3f79de=['push','4122090zebpAu','4449808HGGRQU','25Bmdwhx','company','6iDgewB','30fyYete','includes','27319193VXOeDu','personal','441DYqEdT','validation','399956LOmdKj','44488RLEBZa','2318967AisYsf','builtin','1876422mmIuSy'];a148_0x5878=function(){return _0x3f79de;};return a148_0x5878();}export function isRuntimeSkillScope(_0x40896f){const _0x4e2b04=a148_0x1b0c;return _0x40896f===_0x4e2b04(0xe5)||_0x40896f===_0x4e2b04(0xe0)||_0x40896f===_0x4e2b04(0xda);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23d2c5,_0x276143){const _0x5a25b3=a150_0x3729,_0x11da6b=_0x23d2c5();while(!![]){try{const _0x291aa2=parseInt(_0x5a25b3(0x1b7))/0x1*(parseInt(_0x5a25b3(0x1b1))/0x2)+-parseInt(_0x5a25b3(0x1bb))/0x3+parseInt(_0x5a25b3(0x1ab))/0x4+parseInt(_0x5a25b3(0x1ae))/0x5+parseInt(_0x5a25b3(0x1b5))/0x6*(-parseInt(_0x5a25b3(0x1b2))/0x7)+parseInt(_0x5a25b3(0x1ad))/0x8+-parseInt(_0x5a25b3(0x1b9))/0x9;if(_0x291aa2===_0x276143)break;else _0x11da6b['push'](_0x11da6b['shift']());}catch(_0x33196b){_0x11da6b['push'](_0x11da6b['shift']());}}}(a150_0x2b0b,0x6c1e3));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a150_0x3729(_0x44cc64,_0xa56146){_0x44cc64=_0x44cc64-0x1aa;const _0x2b0b0f=a150_0x2b0b();let _0x37291c=_0x2b0b0f[_0x44cc64];return _0x37291c;}const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x16fa25){const _0x3f8dc3=a150_0x3729,_0x50636d={};for(const _0x466291 of normalizeLocalFiles(_0x16fa25)){_0x50636d[_0x466291['path']]=fileContent(_0x466291);}return Buffer[_0x3f8dc3(0x1b0)](zipSync(_0x50636d,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x1267c6){const _0xef46fa=a150_0x3729;if(_0x1267c6['length']<0x16)throw CliErrors['validation'](_0xef46fa(0x1bc));let _0x5d3de6;try{_0x5d3de6=unzipSync(_0x1267c6,{'filter'(_0x38e91f){const _0x5c9029=_0xef46fa,_0x3e516f=normalizeSkillRelativePath(_0x38e91f[_0x5c9029(0x1b4)]);if(_0x3e516f[_0x5c9029(0x1aa)]('/'))throw CliErrors[_0x5c9029(0x1b6)](_0x5c9029(0x1af)+_0x3e516f);return!![];}});}catch(_0x519dea){if(isRuntimeSkillValidationError(_0x519dea))throw _0x519dea;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0xef46fa(0x1be)](_0x5d3de6)[_0xef46fa(0x1b8)](([_0x9846e2,_0x32a1f5])=>({'path':normalizeSkillRelativePath(_0x9846e2),'bytes':Buffer[_0xef46fa(0x1b0)](_0x32a1f5)}))[_0xef46fa(0x1ac)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x12db20){const _0x558d1c=a150_0x3729;return typeof _0x12db20===_0x558d1c(0x1ba)&&_0x12db20!==null&&_0x558d1c(0x1bd)in _0x12db20&&_0x12db20[_0x558d1c(0x1bd)]===_0x558d1c(0x1b3);}function a150_0x2b0b(){const _0x1202b3=['code','entries','endsWith','2405016KpDKKT','sort','63704icOIAe','124060Fnmcks','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','from','602YLPwlU','455917tEThGF','validation_error','name','18xNibvu','validation','2492LWdJBX','map','2105307WkVbuu','object','1535862FZNDIU','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.'];a150_0x2b0b=function(){return _0x1202b3;};return a150_0x2b0b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x46b232,_0x462540){const _0xb1de75=a151_0x2c83,_0x3b8f7b=_0x46b232();while(!![]){try{const _0x1e3474=parseInt(_0xb1de75(0xd9))/0x1+-parseInt(_0xb1de75(0xe7))/0x2*(parseInt(_0xb1de75(0xe2))/0x3)+-parseInt(_0xb1de75(0xee))/0x4*(parseInt(_0xb1de75(0xef))/0x5)+-parseInt(_0xb1de75(0xe3))/0x6+parseInt(_0xb1de75(0xd0))/0x7+-parseInt(_0xb1de75(0xd5))/0x8*(-parseInt(_0xb1de75(0xf5))/0x9)+parseInt(_0xb1de75(0xea))/0xa*(parseInt(_0xb1de75(0xe8))/0xb);if(_0x1e3474===_0x462540)break;else _0x3b8f7b['push'](_0x3b8f7b['shift']());}catch(_0x49acd0){_0x3b8f7b['push'](_0x3b8f7b['shift']());}}}(a151_0x3432,0x51dbe));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';function a151_0x3432(){const _0x50ad91=['88ZxHonY','87785TMdqIX','map','requireOssPath','zipSize','toString','string','351711VgCNSS','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isSafeInteger','path','bytes','toLowerCase','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20package\x20is\x20missing\x20','schemaVersion','Runtime\x20Skill\x20package\x20size\x20mismatch.','1438339orKpTX','length','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','some','sha256','88ZOjXTs','\x20in\x20Skill\x20file\x20package.','get','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','76368VoluaX','size','trim','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','base64','ossPath','object','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','isArray','6KYWBdf','277074zkkaKD','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Missing\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','628766vwGvqK','17237QxpHmE','validation','4370xwWyuJ','files','zipSha256','treeSha256'];a151_0x3432=function(){return _0x50ad91;};return a151_0x3432();}export function buildSkillPackage(_0x351249){const _0x57d333=a151_0x2c83,_0x122e3d=normalizeLocalFiles(_0x351249);if(!_0x122e3d[_0x57d333(0xd3)](_0x5ae7f6=>_0x5ae7f6[_0x57d333(0xc9)]===SKILL_FILE))throw CliErrors['validation'](_0x57d333(0xe5)+SKILL_FILE+_0x57d333(0xd6));const _0x4ae3a9=localFilesToManifestFiles(_0x122e3d),_0x44f5fb=createDeterministicZipPackage(_0x122e3d);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x4ae3a9),'zipSha256':bufferSha256(_0x44f5fb),'zipSize':_0x44f5fb[_0x57d333(0xd1)],'files':_0x4ae3a9},'packageBytes':_0x44f5fb,'packageBase64':_0x44f5fb[_0x57d333(0xf3)](_0x57d333(0xdd))};}export function verifyRuntimeSkillPackage(_0xa1baf9,_0x18d2d){const _0x181078=a151_0x2c83,_0x5db77c=normalizePackageManifest(_0xa1baf9,{'requireOssPath':![]});if(!_0x5db77c)throw CliErrors['validation'](_0x181078(0xcc));return extractAndVerifyPackage(_0x5db77c,_0x18d2d);}function a151_0x2c83(_0x1ad519,_0x17b735){_0x1ad519=_0x1ad519-0xc9;const _0x3432f5=a151_0x3432();let _0x2c83d3=_0x3432f5[_0x1ad519];return _0x2c83d3;}export function verifyRuntimeSkillBundle(_0x1aae8d,_0x55d50b){const _0x3eb001=a151_0x2c83,_0x2f6d02=normalizePackageManifest(_0x1aae8d,{'requireOssPath':![]});if(!_0x2f6d02)throw CliErrors[_0x3eb001(0xe9)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackageFiles(_0x2f6d02,_0x55d50b);}export function tryNormalizePackageManifest(_0x350201){return normalizePackageManifest(_0x350201,{'requireOssPath':![]});}export function requirePackageBytes(_0x48bd30,_0x3a5d29){const _0x498949=a151_0x2c83;if(!_0x3a5d29||_0x3a5d29[_0x498949(0xd1)]===0x0)throw CliErrors[_0x498949(0xe9)](_0x498949(0xf6)+_0x48bd30);return _0x3a5d29;}export function extractDownloadedPackage(_0x290311){const _0x4f1541=a151_0x2c83,_0x324026=parseZipPackage(_0x290311)['map'](_0x21e64b=>({'path':_0x21e64b[_0x4f1541(0xc9)],'bytes':_0x21e64b[_0x4f1541(0xca)]}));if(!_0x324026['some'](_0x3b78e5=>_0x3b78e5[_0x4f1541(0xc9)]===SKILL_FILE))throw CliErrors[_0x4f1541(0xe9)](_0x4f1541(0xcd)+SKILL_FILE+'.');return normalizeLocalFiles(_0x324026);}export function localFilesToManifestFiles(_0x9a37d7){const _0x414d78=a151_0x2c83;return normalizeLocalFiles(_0x9a37d7)[_0x414d78(0xf0)](_0x593913=>({'path':_0x593913[_0x414d78(0xc9)],'sha256':fileHash(_0x593913),'size':fileContent(_0x593913)['length']}));}function normalizePackageManifest(_0x35b03,_0x265ddc){const _0x5d2cb0=a151_0x2c83;if(!_0x35b03||typeof _0x35b03!==_0x5d2cb0(0xdf)||Array['isArray'](_0x35b03))return undefined;const _0x61c57d=_0x35b03,_0x162041=typeof _0x61c57d['ossPath']===_0x5d2cb0(0xf4)?_0x61c57d[_0x5d2cb0(0xde)][_0x5d2cb0(0xdb)]():undefined;if(_0x265ddc[_0x5d2cb0(0xf1)]&&!_0x162041)return undefined;if(!Array[_0x5d2cb0(0xe1)](_0x61c57d['files'])||_0x61c57d[_0x5d2cb0(0xeb)]['length']===0x0)return undefined;if(!isSha256Hex(_0x61c57d[_0x5d2cb0(0xed)]))throw CliErrors[_0x5d2cb0(0xe9)](_0x5d2cb0(0xd2));if(!isSha256Hex(_0x61c57d[_0x5d2cb0(0xec)]))throw CliErrors[_0x5d2cb0(0xe9)]('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x5d2cb0(0xf7)](_0x61c57d[_0x5d2cb0(0xf2)])||_0x61c57d[_0x5d2cb0(0xf2)]<0x0)throw CliErrors[_0x5d2cb0(0xe9)](_0x5d2cb0(0xd8));const _0x499fc6=normalizeManifestFiles(_0x61c57d['files']);if(!_0x499fc6[_0x5d2cb0(0xd3)](_0x4d2e8e=>_0x4d2e8e[_0x5d2cb0(0xc9)]===SKILL_FILE))throw CliErrors[_0x5d2cb0(0xe9)](_0x5d2cb0(0xe4)+SKILL_FILE+'.');const _0x1e1936=fileTreeHash(_0x499fc6);if(_0x1e1936!==_0x61c57d['treeSha256']['toLowerCase']())throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number['isSafeInteger'](_0x61c57d['schemaVersion'])?_0x61c57d[_0x5d2cb0(0xce)]:0x2,'ossPath':_0x162041,'treeSha256':_0x1e1936,'zipSha256':_0x61c57d[_0x5d2cb0(0xec)][_0x5d2cb0(0xcb)](),'zipSize':_0x61c57d['zipSize'],'files':_0x499fc6};}function extractAndVerifyPackage(_0x5334e1,_0x6f716f){const _0x191c7a=a151_0x2c83,_0x183bd6=normalizePackageManifest(_0x5334e1,{'requireOssPath':![]});if(!_0x183bd6)throw CliErrors[_0x191c7a(0xe9)](_0x191c7a(0xcc));if(_0x6f716f[_0x191c7a(0xd1)]!==_0x183bd6[_0x191c7a(0xf2)])throw CliErrors[_0x191c7a(0xe9)](_0x191c7a(0xcf));const _0x918de3=bufferSha256(_0x6f716f);if(_0x918de3!==_0x183bd6['zipSha256'])throw CliErrors[_0x191c7a(0xe9)](_0x191c7a(0xdc));return extractAndVerifyPackageFiles(_0x183bd6,_0x6f716f);}function extractAndVerifyPackageFiles(_0x313c5a,_0x54f021){const _0x127d20=a151_0x2c83,_0x4ebd30=parseZipPackage(_0x54f021);if(_0x4ebd30[_0x127d20(0xd1)]!==_0x313c5a[_0x127d20(0xeb)][_0x127d20(0xd1)])throw CliErrors[_0x127d20(0xe9)](_0x127d20(0xe6));const _0xb57deb=new Map();for(const _0x4f08fe of _0x4ebd30){if(_0xb57deb['has'](_0x4f08fe[_0x127d20(0xc9)]))throw CliErrors[_0x127d20(0xe9)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x4f08fe[_0x127d20(0xc9)]);_0xb57deb['set'](_0x4f08fe[_0x127d20(0xc9)],_0x4f08fe);}const _0x5f4859=[];for(const _0x3494cb of _0x313c5a[_0x127d20(0xeb)]){const _0x491098=_0xb57deb[_0x127d20(0xd7)](_0x3494cb[_0x127d20(0xc9)]);if(!_0x491098)throw CliErrors[_0x127d20(0xe9)](_0x127d20(0xe0)+_0x3494cb[_0x127d20(0xc9)]);if(_0x491098[_0x127d20(0xca)][_0x127d20(0xd1)]!==_0x3494cb[_0x127d20(0xda)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x3494cb['path']);const _0x5f1ed1=bufferSha256(_0x491098[_0x127d20(0xca)]);if(_0x5f1ed1!==_0x3494cb[_0x127d20(0xd4)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x3494cb[_0x127d20(0xc9)]);_0x5f4859['push']({'path':_0x3494cb[_0x127d20(0xc9)],'bytes':_0x491098[_0x127d20(0xca)]});}return normalizeLocalFiles(_0x5f4859);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33d4d0,_0x172bb4){var _0x3cdf37=a152_0x2ce4,_0x3d8d23=_0x33d4d0();while(!![]){try{var _0x58a91b=-parseInt(_0x3cdf37(0xb2))/0x1+parseInt(_0x3cdf37(0xb3))/0x2+parseInt(_0x3cdf37(0xaf))/0x3*(-parseInt(_0x3cdf37(0xb9))/0x4)+-parseInt(_0x3cdf37(0xb5))/0x5+parseInt(_0x3cdf37(0xb7))/0x6*(parseInt(_0x3cdf37(0xb1))/0x7)+parseInt(_0x3cdf37(0xb8))/0x8*(parseInt(_0x3cdf37(0xb6))/0x9)+parseInt(_0x3cdf37(0xb4))/0xa*(parseInt(_0x3cdf37(0xb0))/0xb);if(_0x58a91b===_0x172bb4)break;else _0x3d8d23['push'](_0x3d8d23['shift']());}catch(_0x269b5b){_0x3d8d23['push'](_0x3d8d23['shift']());}}}(a152_0x3e65,0x24814));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a152_0x3e65(){var _0x575c70=['1225200gMViJQ','31392aXuKPY','24ixWpKx','528iufKkw','1844ELylTV','1146lVMEaz','1085821ZEMGBm','250502FeEzoh','138416fopMzB','276616BFcMnD','20HLHQcr'];a152_0x3e65=function(){return _0x575c70;};return a152_0x3e65();}export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a152_0x2ce4(_0x3b9e45,_0x419399){_0x3b9e45=_0x3b9e45-0xaf;var _0x3e65cd=a152_0x3e65();var _0x2ce475=_0x3e65cd[_0x3b9e45];return _0x2ce475;}export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a153_0x2f8d(){const _0x45e4cd=['SKILL.md','1452804yzrmdL','804bihpps','3204ZUKRHl','lockFile','message','264AjoUuY','join','number','14VAGKqw','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','version','190073kQPJpd','\x20is\x20unreadable:\x20','reason','unverifiable','includes','\x20records\x20\x22','unusable','absent','.claude','98WMrSNI','map','kind','skills','1145OrirPO','home','.agents','15820wicRBF','find','not-recorded','object','1691526EbScaX','present','1300TCqugd','recorded','11936Rcjgut','parse','60753pGHnpL','\x20uses\x20unsupported\x20version\x20'];a153_0x2f8d=function(){return _0x45e4cd;};return a153_0x2f8d();}const a153_0x1e53a3=a153_0x5497;(function(_0x2900e2,_0x4f4e61){const _0x4d7447=a153_0x5497,_0x4b0db6=_0x2900e2();while(!![]){try{const _0x5a0987=-parseInt(_0x4d7447(0x101))/0x1*(-parseInt(_0x4d7447(0xfa))/0x2)+-parseInt(_0x4d7447(0x105))/0x3+parseInt(_0x4d7447(0xeb))/0x4*(parseInt(_0x4d7447(0xfe))/0x5)+parseInt(_0x4d7447(0xe6))/0x6*(-parseInt(_0x4d7447(0xee))/0x7)+-parseInt(_0x4d7447(0x109))/0x8*(-parseInt(_0x4d7447(0xe8))/0x9)+parseInt(_0x4d7447(0x107))/0xa*(-parseInt(_0x4d7447(0xe3))/0xb)+-parseInt(_0x4d7447(0xe7))/0xc*(-parseInt(_0x4d7447(0xf1))/0xd);if(_0x5a0987===_0x4f4e61)break;else _0x4b0db6['push'](_0x4b0db6['shift']());}catch(_0x5709bd){_0x4b0db6['push'](_0x4b0db6['shift']());}}}(a153_0x2f8d,0x829a9));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a153_0x5497(_0x520065,_0x41627f){_0x520065=_0x520065-0xe3;const _0x2f8d95=a153_0x2f8d();let _0x5497d6=_0x2f8d95[_0x520065];return _0x5497d6;}export const SKILL_LOCK_RELATIVE_PATH=join('.agents','.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a153_0x1e53a3(0x100),a153_0x1e53a3(0xfd)),join(a153_0x1e53a3(0xf9),a153_0x1e53a3(0xfd))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x3ffac5,_0x376209){const _0x141fd2=a153_0x1e53a3;if(!existsSync(_0x3ffac5))return{'kind':_0x141fd2(0x103)};let _0x594c43;try{_0x594c43=JSON[_0x141fd2(0x10a)](readFileSync(_0x3ffac5,'utf8'));}catch(_0xe1f67f){return{'kind':_0x141fd2(0xf7),'reason':_0x3ffac5+_0x141fd2(0xf2)+_0xe1f67f[_0x141fd2(0xea)]};}const _0x1f77ce=_0x594c43;if(typeof _0x1f77ce?.[_0x141fd2(0xf0)]!==_0x141fd2(0xed)||!SUPPORTED_LOCK_VERSIONS[_0x141fd2(0xf5)](_0x1f77ce[_0x141fd2(0xf0)]))return{'kind':'unusable','reason':_0x3ffac5+_0x141fd2(0xe4)+String(_0x1f77ce?.[_0x141fd2(0xf0)])};if(!_0x1f77ce[_0x141fd2(0xfd)]||typeof _0x1f77ce[_0x141fd2(0xfd)]!==_0x141fd2(0x104))return{'kind':_0x141fd2(0xf7),'reason':_0x3ffac5+'\x20has\x20no\x20skills\x20map'};return _0x1f77ce[_0x141fd2(0xfd)][_0x376209]?{'kind':_0x141fd2(0x108)}:{'kind':_0x141fd2(0x103)};}export function resolveInstalledSkill(_0x1e1e49,_0x38c0a4){const _0x418f0b=a153_0x1e53a3,_0xffdfb6=_0x38c0a4?.[_0x418f0b(0xff)]??homedir(),_0xa92a17=_0x38c0a4?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x418f0b(0xfb)](_0x2c5800=>join(_0xffdfb6,_0x2c5800)),_0x249151=_0x38c0a4?.[_0x418f0b(0xe9)]??join(_0xffdfb6,SKILL_LOCK_RELATIVE_PATH),_0x4aa3e6=_0xa92a17['map'](_0x276a98=>join(_0x276a98,_0x1e1e49,_0x418f0b(0xe5))),_0x3c36c6=_0x4aa3e6[_0x418f0b(0x102)](_0x1de7d9=>existsSync(_0x1de7d9));if(_0x3c36c6)return{'state':_0x418f0b(0x106),'path':_0x3c36c6};const _0x449149=readLockLookup(_0x249151,_0x1e1e49);if(_0x449149[_0x418f0b(0xfc)]===_0x418f0b(0xf7))return{'state':_0x418f0b(0xf4),'reason':_0x449149[_0x418f0b(0xf3)]};if(_0x449149[_0x418f0b(0xfc)]==='recorded')return{'state':'unverifiable','reason':_0x249151+_0x418f0b(0xf6)+_0x1e1e49+_0x418f0b(0xef)+('('+_0x4aa3e6[_0x418f0b(0xec)](',\x20')+')')};return{'state':_0x418f0b(0xf8),'checked':_0x4aa3e6};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a154_0x43d904=a154_0x2e8c;function a154_0x2e8c(_0x212767,_0x3c9789){_0x212767=_0x212767-0xd1;const _0x20814e=a154_0x2081();let _0x2e8ca1=_0x20814e[_0x212767];return _0x2e8ca1;}(function(_0x301442,_0x1c0380){const _0x2c8868=a154_0x2e8c,_0x3e0948=_0x301442();while(!![]){try{const _0x403343=parseInt(_0x2c8868(0xe4))/0x1+-parseInt(_0x2c8868(0xd3))/0x2+-parseInt(_0x2c8868(0xd7))/0x3+parseInt(_0x2c8868(0xd5))/0x4+parseInt(_0x2c8868(0xd4))/0x5*(-parseInt(_0x2c8868(0xd2))/0x6)+parseInt(_0x2c8868(0xdd))/0x7*(-parseInt(_0x2c8868(0xe8))/0x8)+parseInt(_0x2c8868(0xd6))/0x9;if(_0x403343===_0x1c0380)break;else _0x3e0948['push'](_0x3e0948['shift']());}catch(_0x29e483){_0x3e0948['push'](_0x3e0948['shift']());}}}(a154_0x2081,0xb26f6));function a154_0x2081(){const _0x643512=['hasOwnProperty','accessKey','fromEntries','length','1081095xSphmY','slice','test','<redacted>','1130152OOPMno','isArray','repeat','48nxJaWX','1748798aqbXEW','563020litEtc','5759976ZxjSeX','19168857sxrpKd','3891741MADVDL','call','entries','map','prototype','string','42FGkEwy','apps','object'];a154_0x2081=function(){return _0x643512;};return a154_0x2081();}const REDACTED_ACCESS_KEY=a154_0x43d904(0xe7);export function maskCliAccessKey(_0x4a78a7){const _0x550823=a154_0x43d904;if(typeof _0x4a78a7!==_0x550823(0xdc)||_0x4a78a7['length']<=0x8)return REDACTED_ACCESS_KEY;return''+_0x4a78a7[_0x550823(0xe5)](0x0,0x8)+'*'[_0x550823(0xd1)](_0x4a78a7[_0x550823(0xe3)]-0x8);}export function redactCliConfigCredentials(_0x3641f0){const _0x27e6a5=a154_0x43d904,_0x313d5a={..._0x3641f0};return Object[_0x27e6a5(0xdb)][_0x27e6a5(0xe0)][_0x27e6a5(0xd8)](_0x313d5a,_0x27e6a5(0xe1))&&(_0x313d5a[_0x27e6a5(0xe1)]=maskCliAccessKey(_0x313d5a[_0x27e6a5(0xe1)])),_0x313d5a[_0x27e6a5(0xde)]&&typeof _0x313d5a[_0x27e6a5(0xde)]==='object'&&!Array['isArray'](_0x313d5a['apps'])&&(_0x313d5a[_0x27e6a5(0xde)]=redactLegacyAppCredentials(_0x313d5a['apps'])),_0x313d5a;}export function redactCliConfigValue(_0x1500d5,_0x436a37){const _0x51cf60=a154_0x43d904;if(_0x1500d5==='accessKey'||/^apps\.[^.]+\.accessKey$/['test'](_0x1500d5))return maskCliAccessKey(_0x436a37);if(_0x1500d5===_0x51cf60(0xde)&&_0x436a37&&typeof _0x436a37===_0x51cf60(0xdf)&&!Array[_0x51cf60(0xe9)](_0x436a37))return redactLegacyAppCredentials(_0x436a37);if(/^apps\.[^.]+$/[_0x51cf60(0xe6)](_0x1500d5)&&_0x436a37&&typeof _0x436a37==='object'&&!Array[_0x51cf60(0xe9)](_0x436a37)){const _0x286332=_0x436a37;return Object[_0x51cf60(0xdb)][_0x51cf60(0xe0)][_0x51cf60(0xd8)](_0x286332,_0x51cf60(0xe1))?{..._0x286332,'accessKey':maskCliAccessKey(_0x286332[_0x51cf60(0xe1)])}:_0x436a37;}return _0x436a37;}function redactLegacyAppCredentials(_0x524b0e){const _0x589d75=a154_0x43d904;return Object[_0x589d75(0xe2)](Object[_0x589d75(0xd9)](_0x524b0e)[_0x589d75(0xda)](([_0xdeb4c0,_0x548b31])=>{const _0x12c07b=_0x589d75;if(!_0x548b31||typeof _0x548b31!==_0x12c07b(0xdf)||Array['isArray'](_0x548b31))return[_0xdeb4c0,_0x548b31];const _0x557bf2={..._0x548b31};return Object[_0x12c07b(0xdb)][_0x12c07b(0xe0)][_0x12c07b(0xd8)](_0x557bf2,'accessKey')&&(_0x557bf2[_0x12c07b(0xe1)]=maskCliAccessKey(_0x557bf2[_0x12c07b(0xe1)])),[_0xdeb4c0,_0x557bf2];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a155_0x4eb6(_0x31f2a5,_0x5b2349){_0x31f2a5=_0x31f2a5-0x14b;const _0x3d3483=a155_0x3d34();let _0x4eb64b=_0x3d3483[_0x31f2a5];return _0x4eb64b;}(function(_0x1499b5,_0x1a0e93){const _0x9261be=a155_0x4eb6,_0x51f40a=_0x1499b5();while(!![]){try{const _0x2505aa=-parseInt(_0x9261be(0x153))/0x1+parseInt(_0x9261be(0x14e))/0x2+parseInt(_0x9261be(0x150))/0x3*(parseInt(_0x9261be(0x154))/0x4)+-parseInt(_0x9261be(0x14b))/0x5*(-parseInt(_0x9261be(0x152))/0x6)+parseInt(_0x9261be(0x155))/0x7*(-parseInt(_0x9261be(0x151))/0x8)+parseInt(_0x9261be(0x14c))/0x9+parseInt(_0x9261be(0x14f))/0xa*(-parseInt(_0x9261be(0x14d))/0xb);if(_0x2505aa===_0x1a0e93)break;else _0x51f40a['push'](_0x51f40a['shift']());}catch(_0x350942){_0x51f40a['push'](_0x51f40a['shift']());}}}(a155_0x3d34,0xd6268));function a155_0x3d34(){const _0x182418=['410UjgSni','4132413UMFkaK','8072jQHjfk','8145516yeNgTQ','1670652dzpSzD','4slLTKR','10507vCqyxn','5ABKfWY','10760706wLoSlq','9691ZKTgWi','335502lyzRhE'];a155_0x3d34=function(){return _0x182418;};return a155_0x3d34();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x27a163,_0xadd103){const _0x580db0=a156_0x597a,_0x174c78=_0x27a163();while(!![]){try{const _0x1e2f64=-parseInt(_0x580db0(0xb0))/0x1*(-parseInt(_0x580db0(0xa5))/0x2)+-parseInt(_0x580db0(0xbd))/0x3+parseInt(_0x580db0(0xac))/0x4+-parseInt(_0x580db0(0xa7))/0x5*(-parseInt(_0x580db0(0xb8))/0x6)+parseInt(_0x580db0(0xb7))/0x7+parseInt(_0x580db0(0xb1))/0x8*(parseInt(_0x580db0(0xb6))/0x9)+-parseInt(_0x580db0(0xaa))/0xa*(parseInt(_0x580db0(0xb9))/0xb);if(_0x1e2f64===_0xadd103)break;else _0x174c78['push'](_0x174c78['shift']());}catch(_0x4cb1e4){_0x174c78['push'](_0x174c78['shift']());}}}(a156_0x2f73,0xc5a51));import a156_0x10a28a from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';function a156_0x2f73(){const _0x5d840f=['minimumVersionMessage','1710UtFEvm','join','3616700UoHeyQ','validation','stableVersion','unavailable','6hpzzpQ','8mcMTMr','filter','upgradeMessage','belowMinimum','minimumVersion','9514584SiHdXX','9596552xrYnNO','2855046iwhvrh','197637PqUgYC','Minimum\x20supported:\x20','Recommended\x20stable:\x20','currentVersion','674226wpcbYM','Upgrade\x20command:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','valid','Current\x20version:\x20','99508BtxfJm','latest','5qExbyF','npm\x20install\x20-g\x20'];a156_0x2f73=function(){return _0x5d840f;};return a156_0x2f73();}import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x36ef6c,_0x1d001c){const _0x5813cc=a156_0x597a,_0x1cb330=a156_0x10a28a[_0x5813cc(0xa3)](_0x36ef6c)===_0x36ef6c,_0x5b6e73=_0x1d001c?.['stableVersion']??null,_0x6b2a6=_0x1d001c?.['minimumVersion']??null,_0x24f543=Boolean(_0x1cb330&&_0x5b6e73&&a156_0x10a28a['lt'](_0x36ef6c,_0x5b6e73)),_0x21f768=Boolean(_0x1cb330&&_0x6b2a6&&a156_0x10a28a['lt'](_0x36ef6c,_0x6b2a6));return{'currentVersion':_0x36ef6c,'stableVersion':_0x5b6e73,'minimumVersion':_0x6b2a6,'needsUpgrade':_0x24f543||_0x21f768,'belowMinimum':_0x21f768,'upgradeMessage':_0x1d001c?.[_0x5813cc(0xb3)],'minimumVersionMessage':_0x1d001c?.['minimumVersionMessage']};}function a156_0x597a(_0x5a904d,_0x3d20bb){_0x5a904d=_0x5a904d-0xa3;const _0x2f7327=a156_0x2f73();let _0x597a93=_0x2f7327[_0x5a904d];return _0x597a93;}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x6b5a83){const _0x1d4adf=a156_0x597a;return _0x1d4adf(0xa8)+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x6b5a83['stableVersion']??_0x1d4adf(0xa6));}export function assertCliVersionSupported(_0x4b3d1d){const _0x1abf2a=a156_0x597a;if(!_0x4b3d1d[_0x1abf2a(0xb4)])return;const _0xf62dea=[_0x4b3d1d[_0x1abf2a(0xa9)],_0x1abf2a(0xa4)+_0x4b3d1d[_0x1abf2a(0xbc)],_0x1abf2a(0xba)+_0x4b3d1d[_0x1abf2a(0xb5)],_0x1abf2a(0xbb)+(_0x4b3d1d[_0x1abf2a(0xae)]??_0x1abf2a(0xaf)),_0x1abf2a(0xbe)+getCliUpgradeCommand(_0x4b3d1d)][_0x1abf2a(0xb2)](Boolean)[_0x1abf2a(0xab)]('\x0a');throw CliErrors[_0x1abf2a(0xad)](_0x1abf2a(0xbf),_0xf62dea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22fa46,_0x139569){const _0x4f7c62=a157_0x11e1,_0x59380c=_0x22fa46();while(!![]){try{const _0x281db5=parseInt(_0x4f7c62(0xcb))/0x1+parseInt(_0x4f7c62(0xd0))/0x2+-parseInt(_0x4f7c62(0xbd))/0x3+parseInt(_0x4f7c62(0xc4))/0x4+-parseInt(_0x4f7c62(0xc8))/0x5+parseInt(_0x4f7c62(0xc1))/0x6+-parseInt(_0x4f7c62(0xd1))/0x7*(parseInt(_0x4f7c62(0xc7))/0x8);if(_0x281db5===_0x139569)break;else _0x59380c['push'](_0x59380c['shift']());}catch(_0x3ac312){_0x59380c['push'](_0x59380c['shift']());}}}(a157_0x1ed5,0x842f8));import a157_0x511908 from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';function a157_0x1ed5(){const _0x52127f=['latestVersion','now','finally','timeout','566936hdQXsS','35PIHRif','minimumVersionMessage','object','json','1589757sNShAz','minVersion','stableVersion','cli','2018772prANXo','then','application/json','807444GwrpLv','upgradeMessage','minimumVersion','1072672GIkwNL','634025eUDiBS','recommendedVersion','trim','1046785OgUmjd'];a157_0x1ed5=function(){return _0x52127f;};return a157_0x1ed5();}const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x5cbe3d){const _0x20c64a=a157_0x11e1;return typeof _0x5cbe3d==='string'&&_0x5cbe3d[_0x20c64a(0xca)]()?_0x5cbe3d['trim']():null;}function pickStrictSemver(_0x54f431){const _0x3dcf60=pickString(_0x54f431);return _0x3dcf60&&a157_0x511908['valid'](_0x3dcf60)===_0x3dcf60?_0x3dcf60:null;}export function normalizeCliVersionPolicy(_0x3c3dd9){const _0x3a7c0b=a157_0x11e1;if(!_0x3c3dd9||typeof _0x3c3dd9!==_0x3a7c0b(0xd3))return null;const _0x16e70b=_0x3c3dd9,_0x61d28a=_0x16e70b[_0x3a7c0b(0xc0)]&&typeof _0x16e70b[_0x3a7c0b(0xc0)]===_0x3a7c0b(0xd3)?_0x16e70b[_0x3a7c0b(0xc0)]:_0x16e70b,_0x3070b8=pickStrictSemver(_0x61d28a[_0x3a7c0b(0xbf)]??_0x61d28a[_0x3a7c0b(0xcc)]??_0x61d28a[_0x3a7c0b(0xc9)]),_0x1cf426=pickStrictSemver(_0x61d28a[_0x3a7c0b(0xc6)]??_0x61d28a[_0x3a7c0b(0xbe)]);if(!_0x3070b8&&!_0x1cf426)return null;if(_0x3070b8&&_0x1cf426&&a157_0x511908['gt'](_0x1cf426,_0x3070b8))return null;return{'stableVersion':_0x3070b8,'minimumVersion':_0x1cf426,'upgradeMessage':pickString(_0x61d28a[_0x3a7c0b(0xc5)])??undefined,'minimumVersionMessage':pickString(_0x61d28a[_0x3a7c0b(0xd2)])??undefined};}export async function fetchCliVersionPolicy(){const _0x5435c6=a157_0x11e1;try{const _0x112a87=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x5435c6(0xc3)},'signal':AbortSignal[_0x5435c6(0xcf)](FETCH_TIMEOUT_MS)});if(!_0x112a87['ok'])return null;return normalizeCliVersionPolicy(await _0x112a87[_0x5435c6(0xd4)]());}catch{return null;}}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;function a157_0x11e1(_0x280a3d,_0xeefbc8){_0x280a3d=_0x280a3d-0xbd;const _0x1ed504=a157_0x1ed5();let _0x11e1bb=_0x1ed504[_0x280a3d];return _0x11e1bb;}export async function getCliVersionPolicy(){const _0x50a571=a157_0x11e1,_0x17429c=Date[_0x50a571(0xcd)]();if(hasCachedPolicy){const _0x1e7423=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x17429c-cachedAt<_0x1e7423)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x50a571(0xc2)](_0x23c1ec=>{return cachedPolicy=_0x23c1ec,cachedAt=Date['now'](),hasCachedPolicy=!![],_0x23c1ec;})[_0x50a571(0xce)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x387db7=a158_0x4304;(function(_0x1e3bf0,_0xc8590f){const _0x344b80=a158_0x4304,_0x1232e7=_0x1e3bf0();while(!![]){try{const _0x195b8a=parseInt(_0x344b80(0x82))/0x1+parseInt(_0x344b80(0x91))/0x2*(-parseInt(_0x344b80(0x8a))/0x3)+parseInt(_0x344b80(0x71))/0x4*(parseInt(_0x344b80(0x73))/0x5)+-parseInt(_0x344b80(0xa2))/0x6+-parseInt(_0x344b80(0x7e))/0x7+parseInt(_0x344b80(0x87))/0x8*(parseInt(_0x344b80(0x80))/0x9)+parseInt(_0x344b80(0x89))/0xa;if(_0x195b8a===_0xc8590f)break;else _0x1232e7['push'](_0x1232e7['shift']());}catch(_0x4cd518){_0x1232e7['push'](_0x1232e7['shift']());}}}(a158_0x166b,0xd4a1a));function a158_0x4304(_0x3473d1,_0x2435d7){_0x3473d1=_0x3473d1-0x6b;const _0x166b66=a158_0x166b();let _0x4304eb=_0x166b66[_0x3473d1];return _0x4304eb;}import a158_0x4a9908 from'winston';import a158_0x1e8c27 from'node:fs';import a158_0x44c7e6 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a158_0x166b(){const _0x20c784=['parse','mkdirSync','utf8','split','map','Failed\x20to\x20clear\x20logs:','readFileSync','setRawCommand','clearLogs','getWinstonInstance','command','blue','currentRawCommand','winstonLogger','3078246jckUhq','duration','trim','dirname','printf','warn','logTask','yellow','2008IeyMEx','format','4795FnywDw','readLogs','red','message','green','logFilePath','timestamp','transports','createLogger','error','Failed:\x20','5944190KtEsVK','log','10960038DKVaUl','now','625076HOqpJE','writeFileSync','details','success','join','8qgEroy','existsSync','8518140vLLDJF','3qwbSAz','Completed:\x20','combine','info','setLogPath','initWinstonLogger','errors','1885882xISPKe','addColors','rawCommand'];a158_0x166b=function(){return _0x20c784;};return a158_0x166b();}class Logger{[a158_0x387db7(0xa1)];[a158_0x387db7(0x78)]='';[a158_0x387db7(0xa0)]='';constructor(){}[a158_0x387db7(0x9b)](_0x34052c){const _0xa0ea2a=a158_0x387db7;this[_0xa0ea2a(0xa0)]=_0x34052c;}[a158_0x387db7(0x8e)](_0x503f18){const _0x5f24bd=a158_0x387db7;this[_0x5f24bd(0x78)]=a158_0x44c7e6[_0x5f24bd(0x86)](_0x503f18,PRODUCT_CONFIG['logFileName']),this[_0x5f24bd(0xa1)]&&this[_0x5f24bd(0xa1)]['clear'](),this[_0x5f24bd(0x8f)]();}[a158_0x387db7(0x8f)](){const _0x5f21ef=a158_0x387db7,_0x59d9c0=a158_0x44c7e6[_0x5f21ef(0x6c)](this[_0x5f21ef(0x78)]);!a158_0x1e8c27[_0x5f21ef(0x88)](_0x59d9c0)&&a158_0x1e8c27[_0x5f21ef(0x95)](_0x59d9c0,{'recursive':!![]});const _0x5cdd58=a158_0x4a9908['format'][_0x5f21ef(0x8c)](a158_0x4a9908[_0x5f21ef(0x72)]['timestamp'](),a158_0x4a9908[_0x5f21ef(0x72)][_0x5f21ef(0x90)]({'stack':!![]}),a158_0x4a9908[_0x5f21ef(0x72)][_0x5f21ef(0x6d)](_0x456a51=>{const _0x42b481=_0x5f21ef,_0x23bcea={'timestamp':_0x456a51[_0x42b481(0x79)]||new Date()['toISOString'](),'level':_0x456a51['level']||_0x42b481(0x8d),'command':_0x456a51[_0x42b481(0x9e)]||'unknown','rawCommand':_0x456a51[_0x42b481(0x93)]||this['currentRawCommand']||undefined,'message':_0x456a51[_0x42b481(0x76)]||'','duration':_0x456a51[_0x42b481(0xa3)]||undefined,'details':_0x456a51[_0x42b481(0x84)]||undefined};return JSON['stringify'](_0x23bcea);}));this['winstonLogger']=a158_0x4a9908[_0x5f21ef(0x7b)]({'level':'info','format':_0x5cdd58,'transports':[new a158_0x4a9908[(_0x5f21ef(0x7a))]['File']({'filename':this[_0x5f21ef(0x78)],'level':_0x5f21ef(0x8d)})],'silent':![]}),a158_0x4a9908[_0x5f21ef(0x92)]({'success':_0x5f21ef(0x77),'error':_0x5f21ef(0x75),'warn':_0x5f21ef(0x70),'info':_0x5f21ef(0x9f)});}['info'](_0x35fbeb,_0x59d3e2,_0x15691f){const _0x3eeb00=a158_0x387db7;if(!this['logFilePath']||!this[_0x3eeb00(0xa1)])return;this[_0x3eeb00(0xa1)][_0x3eeb00(0x8d)](_0x59d3e2,{'command':_0x35fbeb,'details':_0x15691f});}[a158_0x387db7(0x85)](_0x45f3d4,_0x27b231,_0x598876,_0x3be236){const _0x34b5db=a158_0x387db7;if(!this[_0x34b5db(0x78)]||!this[_0x34b5db(0xa1)])return;this['winstonLogger'][_0x34b5db(0x7f)](_0x34b5db(0x8d),_0x27b231,{'level':_0x34b5db(0x85),'command':_0x45f3d4,'duration':_0x598876,'details':_0x3be236});}[a158_0x387db7(0x7c)](_0x3e37c8,_0x418bc2,_0x1cee60){const _0x12fdd8=a158_0x387db7;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x12fdd8(0xa1)][_0x12fdd8(0x7c)](_0x418bc2,{'command':_0x3e37c8,'details':_0x1cee60});}[a158_0x387db7(0x6e)](_0x28c171,_0x4791a6,_0x3c2f2a){const _0x163830=a158_0x387db7;if(!this[_0x163830(0x78)]||!this['winstonLogger'])return;this[_0x163830(0xa1)][_0x163830(0x6e)](_0x4791a6,{'command':_0x28c171,'details':_0x3c2f2a});}async[a158_0x387db7(0x6f)](_0x175c35,_0x3bf473,_0x59fa75){const _0x24354b=a158_0x387db7,_0xfbdfb9=Date[_0x24354b(0x81)]();this[_0x24354b(0x8d)](_0x175c35,'Starting:\x20'+_0x3bf473);try{const _0x602ab7=await _0x59fa75(),_0x3d71f9=Date['now']()-_0xfbdfb9;return this[_0x24354b(0x85)](_0x175c35,_0x24354b(0x8b)+_0x3bf473,_0x3d71f9),_0x602ab7;}catch(_0x2ec0ea){const _0xdb2d1b=Date[_0x24354b(0x81)]()-_0xfbdfb9;this[_0x24354b(0x7c)](_0x175c35,_0x24354b(0x7d)+_0x3bf473,{'error':_0x2ec0ea instanceof Error?_0x2ec0ea[_0x24354b(0x76)]:String(_0x2ec0ea),'duration':_0xdb2d1b});throw _0x2ec0ea;}}[a158_0x387db7(0x74)](){const _0x26d255=a158_0x387db7;try{if(!a158_0x1e8c27[_0x26d255(0x88)](this[_0x26d255(0x78)]))return[];const _0x1c32c4=a158_0x1e8c27[_0x26d255(0x9a)](this['logFilePath'],_0x26d255(0x96));return _0x1c32c4[_0x26d255(0x97)](/\r?\n/)['filter'](_0xcb4c0d=>_0xcb4c0d[_0x26d255(0x6b)]())[_0x26d255(0x98)](_0x20fe0b=>JSON[_0x26d255(0x94)](_0x20fe0b));}catch(_0x3ab5c0){return console[_0x26d255(0x6e)]('Failed\x20to\x20read\x20logs:',_0x3ab5c0),[];}}[a158_0x387db7(0x9c)](){const _0x22b775=a158_0x387db7;try{a158_0x1e8c27[_0x22b775(0x88)](this[_0x22b775(0x78)])&&a158_0x1e8c27[_0x22b775(0x83)](this['logFilePath'],'',_0x22b775(0x96));}catch(_0x1e1d48){console['warn'](_0x22b775(0x99),_0x1e1d48);}}[a158_0x387db7(0x9d)](){const _0x501934=a158_0x387db7;return this[_0x501934(0xa1)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a159_0x30cbf0=a159_0x528a;(function(_0x599631,_0x42e6c7){const _0x194beb=a159_0x528a,_0x192d50=_0x599631();while(!![]){try{const _0x109628=-parseInt(_0x194beb(0x1dc))/0x1+parseInt(_0x194beb(0x1ec))/0x2*(-parseInt(_0x194beb(0x1ea))/0x3)+parseInt(_0x194beb(0x1e0))/0x4*(-parseInt(_0x194beb(0x1e6))/0x5)+-parseInt(_0x194beb(0x1e4))/0x6*(parseInt(_0x194beb(0x1df))/0x7)+-parseInt(_0x194beb(0x1eb))/0x8*(-parseInt(_0x194beb(0x1ed))/0x9)+-parseInt(_0x194beb(0x1e5))/0xa+parseInt(_0x194beb(0x1e7))/0xb*(parseInt(_0x194beb(0x1e3))/0xc);if(_0x109628===_0x42e6c7)break;else _0x192d50['push'](_0x192d50['shift']());}catch(_0x4ba22e){_0x192d50['push'](_0x192d50['shift']());}}}(a159_0x12a7,0xb8e66));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a159_0x30cbf0(0x1ee)]),MIN_SAFE_INTEGER=BigInt(Number[a159_0x30cbf0(0x1e2)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a159_0x528a(_0x18bbf0,_0x4919e3){_0x18bbf0=_0x18bbf0-0x1dc;const _0x12a733=a159_0x12a7();let _0x528a98=_0x12a733[_0x18bbf0];return _0x528a98;}function isUnsafeIntegerLiteral(_0x38a8a5){const _0x2540a8=a159_0x30cbf0;if(_0x38a8a5[_0x2540a8(0x1e1)]('.')||_0x38a8a5[_0x2540a8(0x1e1)]('e')||_0x38a8a5['includes']('E'))return![];const _0x151a2b=BigInt(_0x38a8a5);return _0x151a2b>MAX_SAFE_INTEGER||_0x151a2b<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x962e44){const _0xf7da63=a159_0x30cbf0;let _0x4ce000='',_0x3d14c0=![],_0x4f5ebe=![];for(let _0x40fd61=0x0;_0x40fd61<_0x962e44['length'];){const _0x3bdee6=_0x962e44[_0x40fd61];if(_0x3d14c0){_0x4ce000+=_0x3bdee6,_0x40fd61+=0x1;if(_0x4f5ebe)_0x4f5ebe=![];else{if(_0x3bdee6==='\x5c')_0x4f5ebe=!![];else _0x3bdee6==='\x22'&&(_0x3d14c0=![]);}continue;}if(_0x3bdee6==='\x22'){_0x3d14c0=!![],_0x4ce000+=_0x3bdee6,_0x40fd61+=0x1;continue;}if(_0x3bdee6==='-'||_0x3bdee6>='0'&&_0x3bdee6<='9'){const _0x47a16d=JSON_NUMBER_PATTERN[_0xf7da63(0x1f0)](_0x962e44['slice'](_0x40fd61))?.[0x0];if(_0x47a16d){_0x4ce000+=isUnsafeIntegerLiteral(_0x47a16d)?'\x22'+_0x47a16d+'\x22':_0x47a16d,_0x40fd61+=_0x47a16d['length'];continue;}}_0x4ce000+=_0x3bdee6,_0x40fd61+=0x1;}return _0x4ce000;}function a159_0x12a7(){const _0x159da8=['defineProperty','exec','1022047mVzAlZ','json','getOwnPropertyDescriptor','1529857qtBjTU','4yCuGgn','includes','MIN_SAFE_INTEGER','25404SiAqVg','6mGoSfN','7445460GGugCy','2356565wvbzIK','18447Cwlruz','undefined','prototype','4117005tPnopM','24ghQsJk','2aywzho','3107799BMiliK','MAX_SAFE_INTEGER'];a159_0x12a7=function(){return _0x159da8;};return a159_0x12a7();}export function parseLosslessJson(_0x261810){return JSON['parse'](quoteUnsafeIntegerLiterals(_0x261810));}export function installLosslessJsonResponseParser(){const _0x2638a4=a159_0x30cbf0;if(typeof Response===_0x2638a4(0x1e8))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x2638a4(0x1e9)],originalResponseJsonDescriptor=Object[_0x2638a4(0x1de)](responseJsonPrototype,_0x2638a4(0x1dd)),Object[_0x2638a4(0x1ef)](responseJsonPrototype,_0x2638a4(0x1dd),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x370ec5(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x4acf70=_0x2638a4;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x4acf70(0x1dd),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x4acf70(0x1dd)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x271d22,_0x3923f6){const _0x467f84=a160_0x2aa1,_0x1bf613=_0x271d22();while(!![]){try{const _0x233467=parseInt(_0x467f84(0xad))/0x1+-parseInt(_0x467f84(0xb1))/0x2+parseInt(_0x467f84(0xae))/0x3*(-parseInt(_0x467f84(0xa3))/0x4)+parseInt(_0x467f84(0xaa))/0x5*(-parseInt(_0x467f84(0xac))/0x6)+parseInt(_0x467f84(0xa6))/0x7*(parseInt(_0x467f84(0x9d))/0x8)+parseInt(_0x467f84(0xa2))/0x9+parseInt(_0x467f84(0xb0))/0xa;if(_0x233467===_0x3923f6)break;else _0x1bf613['push'](_0x1bf613['shift']());}catch(_0xb79070){_0x1bf613['push'](_0x1bf613['shift']());}}}(a160_0x489b,0x3937f));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;function a160_0x2aa1(_0xf4e4e1,_0x55458e){_0xf4e4e1=_0xf4e4e1-0x9c;const _0x489b92=a160_0x489b();let _0x2aa10f=_0x489b92[_0xf4e4e1];return _0x2aa10f;}export function parseJsonParams(_0x5a7b87){const _0x53b2a7=a160_0x2aa1;if(!_0x5a7b87)return undefined;try{return parseLosslessJson(_0x5a7b87);}catch{throw CliErrors[_0x53b2a7(0xb5)](_0x53b2a7(0x9c)+_0x5a7b87);}}export function parseJsonParamsValue(_0x4365cd){const _0x532e86=a160_0x2aa1;if(!_0x4365cd)return undefined;try{return parseLosslessJson(_0x4365cd);}catch{throw CliErrors[_0x532e86(0xb5)](_0x532e86(0x9c)+_0x4365cd);}}export function parseBatchCreateItemsFromParams(_0x143ebe){const _0x4ac7bb=a160_0x2aa1;if(Array[_0x4ac7bb(0xa5)](_0x143ebe))return _0x143ebe;if(_0x143ebe!==null&&_0x143ebe!==undefined&&typeof _0x143ebe==='object'&&Array[_0x4ac7bb(0xa5)](_0x143ebe['items']))return _0x143ebe[_0x4ac7bb(0xa9)];throw CliErrors['validation']('batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}',_0x4ac7bb(0xaf));}function parseDataUpdateId(_0x33f3ac,_0x28ec65){const _0x4f4642=a160_0x2aa1;if(typeof _0x33f3ac===_0x4f4642(0xa4)&&Number[_0x4f4642(0xab)](_0x33f3ac)&&_0x33f3ac>0x0)return _0x33f3ac;if(typeof _0x33f3ac===_0x4f4642(0xa1)){if(/^[1-9]\d*$/[_0x4f4642(0x9f)](_0x33f3ac))return _0x33f3ac;}throw CliErrors[_0x4f4642(0xb5)](_0x4f4642(0xa8)+_0x28ec65+_0x4f4642(0xb7));}export function parseUpdateIdsFromParams(_0x14b5f1){const _0x50b493=a160_0x2aa1;if(_0x14b5f1===null||_0x14b5f1===undefined||typeof _0x14b5f1!=='object'||Array['isArray'](_0x14b5f1))throw CliErrors[_0x50b493(0xb5)](_0x50b493(0xb6),_0x50b493(0xb4));const _0xefa168=_0x14b5f1['id'];if(_0xefa168===undefined||_0xefa168===null)throw CliErrors[_0x50b493(0xb5)](_0x50b493(0xb3),_0x50b493(0xb4));const _0x43c63b=Array[_0x50b493(0xa5)](_0xefa168)?_0xefa168:[_0xefa168];if(_0x43c63b[_0x50b493(0xa0)]===0x0)throw CliErrors[_0x50b493(0xb5)]('data\x20update\x20id\x20array\x20cannot\x20be\x20empty.');if(_0x43c63b[_0x50b493(0xa0)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x50b493(0xb5)](_0x50b493(0xa7)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x43c63b['length']+'.');return _0x43c63b[_0x50b493(0x9e)]((_0x1b3d01,_0x2fd755)=>parseDataUpdateId(_0x1b3d01,Array['isArray'](_0xefa168)?_0x50b493(0xb2)+_0x2fd755+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x5d685,_0x525df6){const _0x3d32c7=a160_0x2aa1;if(Array[_0x3d32c7(0xa5)](_0x5d685['id'])&&_0x525df6['length']>0x1)return{..._0x5d685,'id':_0x525df6['join'](',')};return _0x5d685;}function a160_0x489b(){const _0x4fdcc7=['string','1166301cSojUN','1796932TawMpY','number','isArray','784518sqEdET','data\x20update\x20can\x20update\x20at\x20most\x20','data\x20update\x20--params.','items','211015fPYbeZ','isSafeInteger','36GaxBff','25758qruUNU','3JJjUED','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','6610090QvEHWj','207372zEwNTL','id[','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','validation','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','Invalid\x20JSON\x20for\x20--params:\x20','16YbwoHo','map','test','length'];a160_0x489b=function(){return _0x4fdcc7;};return a160_0x489b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x589016,_0x2edb97){const _0x4c61b4=a161_0x3b53,_0x4c0a0b=_0x589016();while(!![]){try{const _0x517fcf=-parseInt(_0x4c61b4(0x189))/0x1*(parseInt(_0x4c61b4(0x197))/0x2)+parseInt(_0x4c61b4(0x199))/0x3*(-parseInt(_0x4c61b4(0x194))/0x4)+-parseInt(_0x4c61b4(0x198))/0x5*(-parseInt(_0x4c61b4(0x188))/0x6)+-parseInt(_0x4c61b4(0x190))/0x7+-parseInt(_0x4c61b4(0x18d))/0x8*(parseInt(_0x4c61b4(0x18c))/0x9)+-parseInt(_0x4c61b4(0x19a))/0xa*(-parseInt(_0x4c61b4(0x18b))/0xb)+parseInt(_0x4c61b4(0x19d))/0xc;if(_0x517fcf===_0x2edb97)break;else _0x4c0a0b['push'](_0x4c0a0b['shift']());}catch(_0x15a521){_0x4c0a0b['push'](_0x4c0a0b['shift']());}}}(a161_0x429c,0xd094b));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{checkCliVersion,getCliUpgradeCommand}from'../utils/cli-version-check.js';const UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0x56b3e8=a161_0x3b53,_0x54c635=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x56b3e8(0x1a1)]()['toLowerCase']();return _0x54c635==='1'||_0x54c635==='true'||_0x54c635===_0x56b3e8(0x19b);}function cacheRoot(){const _0x3beb9a=a161_0x3b53;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x3beb9a(0x19c));}function a161_0x429c(){const _0x372384=['5uyYjrv','4279911UpPVnu','16620SVHqfz','yes','.cache','68852772juqvnX','currentVersion','stableVersion','filter','trim','number','join','lastNotifiedVersion','\x20is\x20recommended,\x20current\x20','3467754TWoEAR','520631eLvSOO','update-check.json','1067xGPEjr','10827MMVTcB','6680qipIhg','utf8','stringify','11406654LTJBkN','lastNotifiedAt',',\x20run:\x20','/v/','4USUDIa','parse','lovrabet-cli','6KhFzdZ'];a161_0x429c=function(){return _0x372384;};return a161_0x429c();}export function getUpdateNoticeCachePath(){const _0x556370=a161_0x3b53;return join(cacheRoot(),_0x556370(0x196),_0x556370(0x18a));}async function readUpdateNoticeCache(){const _0x3da681=a161_0x3b53;try{const _0x4baef0=await readFile(getUpdateNoticeCachePath(),_0x3da681(0x18e)),_0x17d369=JSON[_0x3da681(0x195)](_0x4baef0);if(!_0x17d369||typeof _0x17d369!=='object')return{};return _0x17d369;}catch{return{};}}function a161_0x3b53(_0x31f9dd,_0x2b1a9f){_0x31f9dd=_0x31f9dd-0x184;const _0x429cca=a161_0x429c();let _0x3b53c4=_0x429cca[_0x31f9dd];return _0x3b53c4;}async function writeUpdateNoticeCache(_0x18ec80){const _0x57e719=a161_0x3b53;try{const _0x3bf448=getUpdateNoticeCachePath();await mkdir(dirname(_0x3bf448),{'recursive':!![]}),await writeFile(_0x3bf448,JSON[_0x57e719(0x18f)](_0x18ec80,null,0x2)+'\x0a','utf8');}catch{}}function isRecentlyNotified(_0x5b4498,_0xa530e4,_0x46f855){const _0x2223d7=a161_0x3b53;return _0x5b4498[_0x2223d7(0x186)]===_0xa530e4&&typeof _0x5b4498[_0x2223d7(0x191)]===_0x2223d7(0x184)&&_0x46f855-_0x5b4498[_0x2223d7(0x191)]<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x9a90be){const _0x26dc07=a161_0x3b53;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x26dc07(0x193)+_0x9a90be;}export async function resolveLatestUpdateNotice(_0x33242b){const _0x1d0e7b=a161_0x3b53;if(isUpdateNoticeDisabled())return null;try{const _0x331b50=Date['now'](),_0x35e7cf=_0x33242b??await checkCliVersion(),_0x22e319=_0x35e7cf[_0x1d0e7b(0x19e)],_0x3e78fe=_0x35e7cf[_0x1d0e7b(0x19f)],_0x4246c8=await readUpdateNoticeCache();if(!_0x3e78fe||!_0x35e7cf['needsUpgrade']||_0x35e7cf['belowMinimum'])return null;if(isRecentlyNotified(_0x4246c8,_0x3e78fe,_0x331b50))return null;const _0x331c1a=getCliUpgradeCommand(_0x35e7cf);return await writeUpdateNoticeCache({..._0x4246c8,'checkedAt':_0x331b50,'latest':_0x3e78fe,'failed':![],'lastNotifiedVersion':_0x3e78fe,'lastNotifiedAt':_0x331b50}),{'command':_0x331c1a,'current':_0x22e319,'latest':_0x3e78fe,'url':buildNpmVersionUrl(_0x3e78fe),'message':[_0x35e7cf['upgradeMessage'],CLI_BIN_NAME+'\x20'+_0x3e78fe+_0x1d0e7b(0x187)+_0x22e319+_0x1d0e7b(0x192)+_0x331c1a][_0x1d0e7b(0x1a0)](Boolean)[_0x1d0e7b(0x185)]('\x20')};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40cb7c,_0xe04235){const _0x4cac0c=a162_0x30b7,_0x3f8a51=_0x40cb7c();while(!![]){try{const _0x21e6f3=parseInt(_0x4cac0c(0xc6))/0x1+parseInt(_0x4cac0c(0xc2))/0x2*(-parseInt(_0x4cac0c(0xc9))/0x3)+parseInt(_0x4cac0c(0xc5))/0x4*(-parseInt(_0x4cac0c(0xc1))/0x5)+parseInt(_0x4cac0c(0xc8))/0x6*(parseInt(_0x4cac0c(0xc0))/0x7)+-parseInt(_0x4cac0c(0xc4))/0x8+parseInt(_0x4cac0c(0xc7))/0x9*(-parseInt(_0x4cac0c(0xcb))/0xa)+parseInt(_0x4cac0c(0xca))/0xb;if(_0x21e6f3===_0xe04235)break;else _0x3f8a51['push'](_0x3f8a51['shift']());}catch(_0x1fd38a){_0x3f8a51['push'](_0x3f8a51['shift']());}}}(a162_0x4007,0x59125));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a162_0x4007(){const _0xad3b53=['328royete','unknown','2949120fPRZko','29436MSuYrc','47053ryefMG','41112aoBGLt','6njDIFO','42yVWtlY','7766660VdNXTS','170DeFQgO','4234174rumMWP','370ZVxerd'];a162_0x4007=function(){return _0xad3b53;};return a162_0x4007();}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x53fe31=a162_0x30b7,_0x1e9415=String(GIT_COMMIT);return _0x1e9415&&_0x1e9415!==_0x53fe31(0xc3)?_0x1e9415:'';}function a162_0x30b7(_0x6d937d,_0x5d3de8){_0x6d937d=_0x6d937d-0xc0;const _0x40072d=a162_0x4007();let _0x30b7e3=_0x40072d[_0x6d937d];return _0x30b7e3;}export function getCliVersionDisplay(){const _0x18b7e8=getCliGitCommit(),_0x34ac93=BUILD_TIME['slice'](0x0,0xa);if(!_0x18b7e8||!_0x34ac93)return VERSION;return VERSION+'\x20('+_0x18b7e8+',\x20'+_0x34ac93+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d49ae,_0x588aa2){var _0x25aca5=a163_0x5651,_0x24a04d=_0x1d49ae();while(!![]){try{var _0x617563=-parseInt(_0x25aca5(0xda))/0x1+-parseInt(_0x25aca5(0xd6))/0x2+-parseInt(_0x25aca5(0xd8))/0x3+parseInt(_0x25aca5(0xd9))/0x4+parseInt(_0x25aca5(0xd7))/0x5*(parseInt(_0x25aca5(0xd4))/0x6)+parseInt(_0x25aca5(0xd5))/0x7+-parseInt(_0x25aca5(0xdb))/0x8*(-parseInt(_0x25aca5(0xd3))/0x9);if(_0x617563===_0x588aa2)break;else _0x24a04d['push'](_0x24a04d['shift']());}catch(_0x48697c){_0x24a04d['push'](_0x24a04d['shift']());}}}(a163_0xa648,0x9ee5b));function a163_0x5651(_0x24cfc6,_0x100ef2){_0x24cfc6=_0x24cfc6-0xd3;var _0xa648e4=a163_0xa648();var _0x5651ee=_0xa648e4[_0x24cfc6];return _0x5651ee;}function a163_0xa648(){var _0x45e160=['17572uyuMuL','5ublyeW','2724885kCKIIs','3195204Weepvq','1075626fQmtox','3776ShUzyK','18432svwGpI','266790OQANfj','5835396eZRLKJ'];a163_0xa648=function(){return _0x45e160;};return a163_0xa648();}export function writeCliSideChannelLine(_0x31831f){process['stderr']['write'](_0x31831f+'\x0a');}
|
package/package.json
CHANGED
package/skills/lovrabet/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: lovrabet
|
|
3
3
|
displayName: Lovrabet 运行态 CLI
|
|
4
|
-
version: 2.3.2-beta.
|
|
4
|
+
version: 2.3.2-beta.3
|
|
5
5
|
description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、Personal Backend Function、文件上传、面向票证类业务材料文字与结构化字段提取的 OCR、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、OCR 识别、票证文字提取、票证字段提取、发票识别、票据识别、证照识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
|
|
6
6
|
metadata:
|
|
7
7
|
requires:
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "lovrabet",
|
|
4
4
|
"packageName": "@lovrabet/lovrabet-cli",
|
|
5
|
-
"packageVersion": "2.3.2-beta.
|
|
6
|
-
"skillVersion": "2.3.2-beta.
|
|
5
|
+
"packageVersion": "2.3.2-beta.3",
|
|
6
|
+
"skillVersion": "2.3.2-beta.3",
|
|
7
7
|
"files": [
|
|
8
8
|
"SKILL.md",
|
|
9
9
|
"guides/app-resolution.md",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"references/lovrabet-user-account.md",
|
|
38
38
|
"references/lovrabet-workspace.md"
|
|
39
39
|
],
|
|
40
|
-
"digest": "
|
|
40
|
+
"digest": "1d4f18b01faec960e1aeb26a9bd6e6f5f0b41ecd4843819e0aed9cc9073bf742"
|
|
41
41
|
}
|