@lovrabet/lovrabet-cli 2.1.15 → 2.1.16-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -0
- 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/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/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
|
-
(function(_0x29af9e,_0x56e59a){const _0xc04c60=a105_0x1e64,_0x3f6dbb=_0x29af9e();while(!![]){try{const _0x271a23=parseInt(_0xc04c60(0xb6))/0x1*(-parseInt(_0xc04c60(0xbf))/0x2)+parseInt(_0xc04c60(0xb7))/0x3+parseInt(_0xc04c60(0xcf))/0x4+parseInt(_0xc04c60(0x9a))/0x5+parseInt(_0xc04c60(0xbb))/0x6+-parseInt(_0xc04c60(0xac))/0x7+-parseInt(_0xc04c60(0xb0))/0x8*(parseInt(_0xc04c60(0xc3))/0x9);if(_0x271a23===_0x56e59a)break;else _0x3f6dbb['push'](_0x3f6dbb['shift']());}catch(_0x48bbfa){_0x3f6dbb['push'](_0x3f6dbb['shift']());}}}(a105_0x1b64,0x2c91d));function a105_0x1e64(_0x1d91d7,_0x418dbd){_0x1d91d7=_0x1d91d7-0x9a;const _0x1b6484=a105_0x1b64();let _0x1e6461=_0x1b6484[_0x1d91d7];return _0x1e6461;}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0xedbacb}from'yaml';import{CliErrors}from'../../errors.js';function a105_0x1b64(){const _0x10129c=['boolean','refreshedAt','dir','Missing\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','validation','utf8','displayName','personal','ignoreMetadataSkillCode','number','505575GUWtqM','object','ignoreMetadataScope','\x20has\x20scope=\x22','221176pVNYBt','\x20has\x20unsupported\x20scope\x20\x22','tags','replace','sourceSessionId','skillCode','1VHvQpi','178059tiBspQ','match','content','isDirectory','445416rMglpb','files','targetScope','slice','302674YpbAHd','isFile','filter','trim','63wzeuaJ','Skill\x20directory\x20not\x20found:\x20','(unknown)','skillName','length','scope','description','Remote\x20Skill\x20','ignoreMetadataForPayload','toLowerCase',',\x20or\x20directory\x20name.','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','1283612wttiuo','allowAppCodeRetarget','string','company','version','isArray','Skill\x20metadata\x20appCode\x20\x22','ignoreInvalidMetadata','725780inCSWM','Invalid\x20','startsWith','appCode','Unable\x20to\x20resolve\x20skillCode\x20from\x20','isSymbolicLink'];a105_0x1b64=function(){return _0x10129c;};return a105_0x1b64();}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(_0x1c1270,_0x5afa9d,_0x366e49={}){const _0x19ac07=a105_0x1e64,_0x34cb03=resolvePushDirectoryRoot(_0x1c1270),_0x5b3c7f=readPushMetadataIfPresent(resolve(_0x34cb03,METADATA_FILE),{'ignoreInvalidMetadata':_0x366e49[_0x19ac07(0xd6)]});if(_0x5b3c7f?.[_0x19ac07(0x9d)]&&_0x5b3c7f[_0x19ac07(0x9d)]!==_0x5afa9d&&!_0x366e49[_0x19ac07(0xd0)]&&!_0x366e49['ignoreMetadataAppCodeMismatch'])throw CliErrors['validation'](_0x19ac07(0xd5)+_0x5b3c7f[_0x19ac07(0x9d)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x5afa9d+'\x22.');const _0x5b30f2=resolvePushSkillCode(_0x34cb03,_0x5afa9d,_0x5b3c7f,_0x366e49);if(!_0x5b30f2)throw CliErrors[_0x19ac07(0xa6)](_0x19ac07(0x9e)+SKILL_FILE+',\x20'+METADATA_FILE+_0x19ac07(0xcd));return{'dir':_0x34cb03,'skillCode':_0x5b30f2,'metadata':_0x5b3c7f};}export function readPushDirectory(_0x14fd03,_0x57beed,_0x52e077={}){const _0x4e0ba2=a105_0x1e64,_0xa0c750=resolvePushDirectoryIdentity(_0x14fd03,_0x57beed,_0x52e077),_0x311687=_0xa0c750[_0x4e0ba2(0xa2)],_0x16955d=resolve(_0x311687,SKILL_FILE);if(!existsSync(_0x16955d)||!lstatSync(_0x16955d)[_0x4e0ba2(0xc0)]())throw CliErrors[_0x4e0ba2(0xa6)](_0x4e0ba2(0xa3)+SKILL_FILE+':\x20'+_0x16955d);const _0x494658=_0xa0c750['metadata'],_0x2c3f5c=_0x52e077[_0x4e0ba2(0xbd)]??_0x4e0ba2(0xa9);if(!_0x52e077['ignoreMetadataScope']&&_0x494658?.[_0x4e0ba2(0xc8)]==='builtin')throw CliErrors['validation'](_0x4e0ba2(0xce)+METADATA_FILE+_0x4e0ba2(0xaf)+_0x494658['scope']+'\x22.');if(!_0x52e077[_0x4e0ba2(0xae)]&&_0x2c3f5c===_0x4e0ba2(0xa9)&&_0x494658?.[_0x4e0ba2(0xc8)]&&_0x494658[_0x4e0ba2(0xc8)]!==_0x4e0ba2(0xa9))throw CliErrors[_0x4e0ba2(0xa6)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x494658['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x311687+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x5768f4=scanSkillDirectory(_0x311687),_0x124ab3=buildSkillPackage(_0x5768f4),_0x41fd04=readFileSync(_0x16955d,'utf8'),_0x4bafa1=_0xa0c750['skillCode'],_0x1842be=_0x52e077[_0x4e0ba2(0xcb)]?undefined:_0x494658,_0x15cb01=readSkillDisplayName(_0x41fd04);return{'skillCode':_0x4bafa1,'metadata':_0x494658,'frontmatterDisplayName':_0x15cb01,'input':{'skillCode':_0x4bafa1,'skillName':_0x15cb01??_0x1842be?.[_0x4e0ba2(0xc6)],'description':_0x1842be?.[_0x4e0ba2(0xc9)],'content':_0x41fd04,'files':_0x124ab3['manifest'],'packageBase64':_0x124ab3['packageBase64'],'tags':_0x1842be?.['tags'],'version':_0x1842be?.[_0x4e0ba2(0xd3)],'sourceSessionId':_0x1842be?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x350acc,_0x229e5c,_0x14ca8f,_0x43cb13={}){const _0x2c224=a105_0x1e64,_0x8b6072=resolvePushDirectoryRoot(_0x350acc),_0x4ad753=readPushMetadataIfPresent(resolve(_0x8b6072,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5ec67d=requireRemoteScope(_0x229e5c),_0x5d764b=readLocalSkillContent(_0x8b6072),_0x5f4095={..._0x229e5c,'appCode':_0x229e5c[_0x2c224(0x9d)]??_0x14ca8f,'skillName':_0x229e5c[_0x2c224(0xc6)]??_0x4ad753?.['skillName'],'description':_0x229e5c[_0x2c224(0xc9)]??_0x4ad753?.[_0x2c224(0xc9)],'tags':Array['isArray'](_0x229e5c[_0x2c224(0xb2)])?_0x229e5c[_0x2c224(0xb2)]:_0x4ad753?.[_0x2c224(0xb2)],'sourceSessionId':_0x229e5c[_0x2c224(0xb4)]??_0x4ad753?.['sourceSessionId'],'content':_0x229e5c[_0x2c224(0xb9)]??_0x5d764b},_0x54d50e=buildMetadata(_0x5f4095,_0x5ec67d,_0x14ca8f,contentHash(_0x5d764b),_0x43cb13[_0x2c224(0xa1)]);writeJsonAtomic(resolve(_0x8b6072,METADATA_FILE),_0x54d50e);}export function recordPushedRuntimeSkill(_0x4c4d01,_0x47535f,_0x5c9574,_0x5d1371={}){const _0x42b552=a105_0x1e64,_0x2ef23b=resolvePushDirectoryRoot(_0x4c4d01),_0x497b2c=scanSkillDirectory(_0x2ef23b),_0x5ead0f=_0x497b2c[_0x42b552(0xa5)](_0x339d0f=>_0x339d0f['path']===SKILL_FILE),_0x13671d=_0x5ead0f?fileText(_0x5ead0f):'',_0x43f498=tryNormalizePackageManifest(_0x47535f[_0x42b552(0xbc)]),_0x134ca0={..._0x47535f,'content':_0x47535f[_0x42b552(0xb9)]??_0x13671d,'files':_0x43f498},_0x556c86=_0x43f498?normalizeLocalFiles(_0x497b2c)[_0x42b552(0xc1)](_0x101a61=>_0x43f498['files']['some'](_0x5920bd=>_0x5920bd['path']===_0x101a61['path'])):undefined,_0x405f4a=buildMetadata(_0x134ca0,_0x5d1371[_0x42b552(0xc8)]??_0x42b552(0xa9),_0x5c9574,contentHash(_0x134ca0[_0x42b552(0xb9)]??''),_0x5d1371['pushedAt'],_0x556c86);writeJsonAtomic(resolve(_0x2ef23b,METADATA_FILE),_0x405f4a);}export function deriveSkillCodeFromDirectory(_0x4a5efa,_0xc81aab){const _0x1916b5=a105_0x1e64,_0x4009be=basename(resolve(_0x4a5efa)),_0x3deebe=_0xc81aab+'--';return _0x4009be[_0x1916b5(0x9c)](_0x3deebe)?_0x4009be[_0x1916b5(0xbe)](_0x3deebe[_0x1916b5(0xc7)]):_0x4009be;}function resolvePushSkillCode(_0x12d0e8,_0x38f29d,_0x28987f,_0x134cea){const _0x5a81b2=a105_0x1e64,_0x109ae6=deriveSkillCodeFromSkillFile(_0x12d0e8)||deriveSkillCodeFromDirectory(_0x12d0e8,_0x38f29d);if(_0x134cea[_0x5a81b2(0xaa)])return _0x109ae6;return _0x28987f?.[_0x5a81b2(0xb5)]?.['trim']()||_0x109ae6;}function deriveSkillCodeFromSkillFile(_0x4b9ef1){const _0x55e20e=a105_0x1e64,_0x5b792f=resolve(_0x4b9ef1,SKILL_FILE);if(!existsSync(_0x5b792f)||!lstatSync(_0x5b792f)['isFile']())return undefined;const _0x5e1190=readFileSync(_0x5b792f,_0x55e20e(0xa7)),_0x3b9117=_0x5e1190['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3b9117)return undefined;const _0xbce8cd=parseFrontmatterObject(_0x3b9117[0x1]??''),_0x4de342=scalarToString(_0xbce8cd?.['name']);return _0x4de342?slugifySkillName(_0x4de342):undefined;}function readSkillDisplayName(_0x4569c1){const _0x298967=a105_0x1e64,_0x592ed7=_0x4569c1[_0x298967(0xb8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x592ed7)return undefined;const _0x15b691=parseFrontmatterObject(_0x592ed7[0x1]??'');return scalarToString(_0x15b691?.[_0x298967(0xa8)]);}function slugifySkillName(_0x5c54d5){const _0xcf64d3=a105_0x1e64,_0x5c7fb3=_0x5c54d5[_0xcf64d3(0xc2)]()[_0xcf64d3(0xcc)]()[_0xcf64d3(0xb3)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0xcf64d3(0xb3)](/-+$/,'')[_0xcf64d3(0xb3)](/-{2,}/g,'-');if(!_0x5c7fb3)throw CliErrors[_0xcf64d3(0xa6)](_0xcf64d3(0x9b)+SKILL_FILE+_0xcf64d3(0xa4));return _0x5c7fb3;}function parseFrontmatterObject(_0x1e0723){const _0x558e6a=a105_0x1e64;try{const _0x592ba1=a105_0xedbacb(_0x1e0723);return _0x592ba1&&typeof _0x592ba1===_0x558e6a(0xad)&&!Array[_0x558e6a(0xd4)](_0x592ba1)?_0x592ba1:undefined;}catch{return undefined;}}function scalarToString(_0x2f4291){const _0x251cad=a105_0x1e64;if(typeof _0x2f4291===_0x251cad(0xd1))return _0x2f4291[_0x251cad(0xc2)]();if(typeof _0x2f4291===_0x251cad(0xab)||typeof _0x2f4291===_0x251cad(0xa0))return String(_0x2f4291);return undefined;}function resolvePushDirectoryRoot(_0xad3f5d){const _0x1aa1be=a105_0x1e64,_0x18af07=resolve(_0xad3f5d);if(!existsSync(_0x18af07))throw CliErrors[_0x1aa1be(0xa6)]('Skill\x20directory\x20not\x20found:\x20'+_0xad3f5d);const _0x517228=lstatSync(_0x18af07);if(_0x517228[_0x1aa1be(0xba)]())return _0x18af07;if(_0x517228[_0x1aa1be(0x9f)]()){const _0xf69b21=realpathSync(_0x18af07);if(lstatSync(_0xf69b21)[_0x1aa1be(0xba)]())return _0xf69b21;}throw CliErrors[_0x1aa1be(0xa6)](_0x1aa1be(0xc4)+_0xad3f5d);}function requireRemoteScope(_0x1695a2){const _0x577b53=a105_0x1e64;if(_0x1695a2[_0x577b53(0xc8)]===_0x577b53(0xa9)||_0x1695a2[_0x577b53(0xc8)]===_0x577b53(0xd2)||_0x1695a2['scope']==='builtin')return _0x1695a2['scope'];throw CliErrors['validation'](_0x577b53(0xca)+(_0x1695a2['skillCode']||_0x577b53(0xc5))+_0x577b53(0xb1)+(_0x1695a2[_0x577b53(0xc8)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x2c9d8b){const _0x5525fa=a105_0x1e64,_0x1cf9ba=resolve(_0x2c9d8b,SKILL_FILE);return existsSync(_0x1cf9ba)&&lstatSync(_0x1cf9ba)[_0x5525fa(0xc0)]()?readFileSync(_0x1cf9ba,'utf8'):'';}function readPushMetadataIfPresent(_0x1458a3,_0x5c878f={}){try{return readMetadataIfPresent(_0x1458a3);}catch(_0x305b6d){if(_0x5c878f['ignoreInvalidMetadata'])return undefined;throw _0x305b6d;}}
|
|
1
|
+
(function(_0x478865,_0x1e3206){const _0x241211=a106_0x15c8,_0x259a19=_0x478865();while(!![]){try{const _0x49fcdb=-parseInt(_0x241211(0xc2))/0x1+-parseInt(_0x241211(0xf4))/0x2+parseInt(_0x241211(0xd6))/0x3+parseInt(_0x241211(0xdc))/0x4+-parseInt(_0x241211(0xe7))/0x5*(parseInt(_0x241211(0xc5))/0x6)+-parseInt(_0x241211(0xd7))/0x7*(parseInt(_0x241211(0xea))/0x8)+parseInt(_0x241211(0xc0))/0x9;if(_0x49fcdb===_0x1e3206)break;else _0x259a19['push'](_0x259a19['shift']());}catch(_0x7d1009){_0x259a19['push'](_0x259a19['shift']());}}}(a106_0x572e,0x4a0f5));function a106_0x15c8(_0x1fd134,_0x4cbcc2){_0x1fd134=_0x1fd134-0xbd;const _0x572ea0=a106_0x572e();let _0x15c8bb=_0x572ea0[_0x1fd134];return _0x15c8bb;}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a106_0x16610c}from'yaml';import{CliErrors}from'../../errors.js';function a106_0x572e(){const _0x17b663=['1700382EnCNgg','7RulzzL','boolean','Missing\x20','Remote\x20Skill\x20','isSymbolicLink','920936HbsEMq','toLowerCase','length','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','scope','content','files','ignoreMetadataAppCodeMismatch','skillCode',',\x20or\x20directory\x20name.','Unable\x20to\x20resolve\x20skillCode\x20from\x20','1103835RqwkiN','personal','dir','2051576SMDnbl','(unknown)','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','validation','Skill\x20directory\x20not\x20found:\x20','displayName','\x20has\x20unsupported\x20scope\x20\x22','replace','some','ignoreMetadataForPayload','718834cdMcsr','appCode','ignoreMetadataSkillCode','metadata','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','trim','skillName','targetScope','isDirectory','startsWith','sourceSessionId','unknown','description','7750386hmbQtV','version','297435XJVCGD','string','ignoreInvalidMetadata','12kVAwcD','refreshedAt','builtin','match','\x20has\x20scope=\x22','path','\x20name\x20for\x20SkillHub\x20slug\x20generation.','isFile','slice','allowAppCodeRetarget','pushedAt','manifest','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20metadata\x20appCode\x20\x22','company','utf8','tags'];a106_0x572e=function(){return _0x17b663;};return a106_0x572e();}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(_0xc6d5da,_0x38d999,_0x215773={}){const _0x57c58f=a106_0x15c8,_0x54c13a=resolvePushDirectoryRoot(_0xc6d5da),_0x1ddc04=readPushMetadataIfPresent(resolve(_0x54c13a,METADATA_FILE),{'ignoreInvalidMetadata':_0x215773['ignoreInvalidMetadata']});if(_0x1ddc04?.[_0x57c58f(0xf5)]&&_0x1ddc04[_0x57c58f(0xf5)]!==_0x38d999&&!_0x215773[_0x57c58f(0xce)]&&!_0x215773[_0x57c58f(0xe3)])throw CliErrors[_0x57c58f(0xed)](_0x57c58f(0xd2)+_0x1ddc04['appCode']+_0x57c58f(0xf8)+_0x38d999+'\x22.');const _0xc2a759=resolvePushSkillCode(_0x54c13a,_0x38d999,_0x1ddc04,_0x215773);if(!_0xc2a759)throw CliErrors[_0x57c58f(0xed)](_0x57c58f(0xe6)+SKILL_FILE+',\x20'+METADATA_FILE+_0x57c58f(0xe5));return{'dir':_0x54c13a,'skillCode':_0xc2a759,'metadata':_0x1ddc04};}export function readPushDirectory(_0x4bcfec,_0x3f0c84,_0x3eff50={}){const _0x2fb6a5=a106_0x15c8,_0x26bb8f=resolvePushDirectoryIdentity(_0x4bcfec,_0x3f0c84,_0x3eff50),_0x1623df=_0x26bb8f[_0x2fb6a5(0xe9)],_0x1a3a3d=resolve(_0x1623df,SKILL_FILE);if(!existsSync(_0x1a3a3d)||!lstatSync(_0x1a3a3d)[_0x2fb6a5(0xcc)]())throw CliErrors[_0x2fb6a5(0xed)](_0x2fb6a5(0xd9)+SKILL_FILE+':\x20'+_0x1a3a3d);const _0x366bd9=_0x26bb8f[_0x2fb6a5(0xf7)],_0x4e7d5a=_0x3eff50[_0x2fb6a5(0xfb)]??_0x2fb6a5(0xe8);if(!_0x3eff50['ignoreMetadataScope']&&_0x366bd9?.['scope']===_0x2fb6a5(0xc7))throw CliErrors[_0x2fb6a5(0xed)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x2fb6a5(0xc9)+_0x366bd9[_0x2fb6a5(0xe0)]+'\x22.');if(!_0x3eff50['ignoreMetadataScope']&&_0x4e7d5a==='personal'&&_0x366bd9?.['scope']&&_0x366bd9[_0x2fb6a5(0xe0)]!==_0x2fb6a5(0xe8))throw CliErrors[_0x2fb6a5(0xed)](_0x2fb6a5(0xd1)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x366bd9[_0x2fb6a5(0xe0)]+'\x22.',_0x2fb6a5(0xdf)+_0x1623df+_0x2fb6a5(0xec));const _0x3fc0eb=scanSkillDirectory(_0x1623df),_0x143c64=buildSkillPackage(_0x3fc0eb),_0x3105fe=readFileSync(_0x1a3a3d,_0x2fb6a5(0xd4)),_0x54461c=_0x26bb8f['skillCode'],_0x2a149d=_0x3eff50[_0x2fb6a5(0xf3)]?undefined:_0x366bd9,_0x2288e8=readSkillDisplayName(_0x3105fe);return{'skillCode':_0x54461c,'metadata':_0x366bd9,'frontmatterDisplayName':_0x2288e8,'input':{'skillCode':_0x54461c,'skillName':_0x2288e8??_0x2a149d?.['skillName'],'description':_0x2a149d?.[_0x2fb6a5(0xbf)],'content':_0x3105fe,'files':_0x143c64[_0x2fb6a5(0xd0)],'packageBase64':_0x143c64['packageBase64'],'tags':_0x2a149d?.[_0x2fb6a5(0xd5)],'version':_0x2a149d?.[_0x2fb6a5(0xc1)],'sourceSessionId':_0x2a149d?.[_0x2fb6a5(0xbd)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5cc2d,_0x2a5b25,_0x4f84c6,_0x4f1e64={}){const _0x2587e5=a106_0x15c8,_0xcf8bf2=resolvePushDirectoryRoot(_0x5cc2d),_0x30b734=readPushMetadataIfPresent(resolve(_0xcf8bf2,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x244e93=requireRemoteScope(_0x2a5b25),_0x3df618=readLocalSkillContent(_0xcf8bf2),_0x113fe1={..._0x2a5b25,'appCode':_0x2a5b25[_0x2587e5(0xf5)]??_0x4f84c6,'skillName':_0x2a5b25[_0x2587e5(0xfa)]??_0x30b734?.[_0x2587e5(0xfa)],'description':_0x2a5b25[_0x2587e5(0xbf)]??_0x30b734?.[_0x2587e5(0xbf)],'tags':Array['isArray'](_0x2a5b25['tags'])?_0x2a5b25['tags']:_0x30b734?.[_0x2587e5(0xd5)],'sourceSessionId':_0x2a5b25[_0x2587e5(0xbd)]??_0x30b734?.[_0x2587e5(0xbd)],'content':_0x2a5b25[_0x2587e5(0xe1)]??_0x3df618},_0x314ea5=buildMetadata(_0x113fe1,_0x244e93,_0x4f84c6,contentHash(_0x3df618),_0x4f1e64[_0x2587e5(0xc6)]);writeJsonAtomic(resolve(_0xcf8bf2,METADATA_FILE),_0x314ea5);}export function recordPushedRuntimeSkill(_0x18643c,_0x43b728,_0xd93b73,_0x52636a={}){const _0x5a2246=a106_0x15c8,_0x1e9fdb=resolvePushDirectoryRoot(_0x18643c),_0x1f848f=scanSkillDirectory(_0x1e9fdb),_0x31be58=_0x1f848f['find'](_0x6228f1=>_0x6228f1[_0x5a2246(0xca)]===SKILL_FILE),_0x137d16=_0x31be58?fileText(_0x31be58):'',_0x481c3e=tryNormalizePackageManifest(_0x43b728[_0x5a2246(0xe2)]),_0x141497={..._0x43b728,'content':_0x43b728[_0x5a2246(0xe1)]??_0x137d16,'files':_0x481c3e},_0x3207bc=_0x481c3e?normalizeLocalFiles(_0x1f848f)['filter'](_0x203fb1=>_0x481c3e[_0x5a2246(0xe2)][_0x5a2246(0xf2)](_0x474e38=>_0x474e38[_0x5a2246(0xca)]===_0x203fb1[_0x5a2246(0xca)])):undefined,_0x2f2ed3=buildMetadata(_0x141497,_0x52636a['scope']??_0x5a2246(0xe8),_0xd93b73,contentHash(_0x141497[_0x5a2246(0xe1)]??''),_0x52636a[_0x5a2246(0xcf)],_0x3207bc);writeJsonAtomic(resolve(_0x1e9fdb,METADATA_FILE),_0x2f2ed3);}export function deriveSkillCodeFromDirectory(_0x4327a1,_0x21bdc7){const _0x22a129=a106_0x15c8,_0x2f768a=basename(resolve(_0x4327a1)),_0x10a1bb=_0x21bdc7+'--';return _0x2f768a[_0x22a129(0xfd)](_0x10a1bb)?_0x2f768a[_0x22a129(0xcd)](_0x10a1bb[_0x22a129(0xde)]):_0x2f768a;}function resolvePushSkillCode(_0x51238a,_0x476bb7,_0x5c8e6d,_0x43fe82){const _0x1664c7=a106_0x15c8,_0x217555=deriveSkillCodeFromSkillFile(_0x51238a)||deriveSkillCodeFromDirectory(_0x51238a,_0x476bb7);if(_0x43fe82[_0x1664c7(0xf6)])return _0x217555;return _0x5c8e6d?.[_0x1664c7(0xe4)]?.[_0x1664c7(0xf9)]()||_0x217555;}function deriveSkillCodeFromSkillFile(_0x15d175){const _0x1349c8=a106_0x15c8,_0x49320d=resolve(_0x15d175,SKILL_FILE);if(!existsSync(_0x49320d)||!lstatSync(_0x49320d)[_0x1349c8(0xcc)]())return undefined;const _0x4e8bb6=readFileSync(_0x49320d,_0x1349c8(0xd4)),_0x155344=_0x4e8bb6[_0x1349c8(0xc8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x155344)return undefined;const _0x89664=parseFrontmatterObject(_0x155344[0x1]??''),_0x2bde9a=scalarToString(_0x89664?.['name']);return _0x2bde9a?slugifySkillName(_0x2bde9a):undefined;}function readSkillDisplayName(_0x4efe0a){const _0x50c75a=a106_0x15c8,_0x249942=_0x4efe0a[_0x50c75a(0xc8)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x249942)return undefined;const _0x3f533a=parseFrontmatterObject(_0x249942[0x1]??'');return scalarToString(_0x3f533a?.[_0x50c75a(0xef)]);}function slugifySkillName(_0x3119c2){const _0x5bc5eb=a106_0x15c8,_0x5c9a24=_0x3119c2[_0x5bc5eb(0xf9)]()[_0x5bc5eb(0xdd)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x5bc5eb(0xf1)](/^-+/,'')[_0x5bc5eb(0xf1)](/-+$/,'')[_0x5bc5eb(0xf1)](/-{2,}/g,'-');if(!_0x5c9a24)throw CliErrors[_0x5bc5eb(0xed)]('Invalid\x20'+SKILL_FILE+_0x5bc5eb(0xcb));return _0x5c9a24;}function parseFrontmatterObject(_0x31d5a1){try{const _0xcf0ffc=a106_0x16610c(_0x31d5a1);return _0xcf0ffc&&typeof _0xcf0ffc==='object'&&!Array['isArray'](_0xcf0ffc)?_0xcf0ffc:undefined;}catch{return undefined;}}function scalarToString(_0x18af69){const _0x5a5d78=a106_0x15c8;if(typeof _0x18af69===_0x5a5d78(0xc3))return _0x18af69[_0x5a5d78(0xf9)]();if(typeof _0x18af69==='number'||typeof _0x18af69===_0x5a5d78(0xd8))return String(_0x18af69);return undefined;}function resolvePushDirectoryRoot(_0x4c7e2a){const _0x56ebf3=a106_0x15c8,_0x8c0b3b=resolve(_0x4c7e2a);if(!existsSync(_0x8c0b3b))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x4c7e2a);const _0x16b2d1=lstatSync(_0x8c0b3b);if(_0x16b2d1['isDirectory']())return _0x8c0b3b;if(_0x16b2d1[_0x56ebf3(0xdb)]()){const _0x3b3358=realpathSync(_0x8c0b3b);if(lstatSync(_0x3b3358)[_0x56ebf3(0xfc)]())return _0x3b3358;}throw CliErrors[_0x56ebf3(0xed)](_0x56ebf3(0xee)+_0x4c7e2a);}function requireRemoteScope(_0xc48b37){const _0x4014f0=a106_0x15c8;if(_0xc48b37[_0x4014f0(0xe0)]===_0x4014f0(0xe8)||_0xc48b37['scope']===_0x4014f0(0xd3)||_0xc48b37[_0x4014f0(0xe0)]==='builtin')return _0xc48b37[_0x4014f0(0xe0)];throw CliErrors[_0x4014f0(0xed)](_0x4014f0(0xda)+(_0xc48b37[_0x4014f0(0xe4)]||_0x4014f0(0xeb))+_0x4014f0(0xf0)+(_0xc48b37[_0x4014f0(0xe0)]??_0x4014f0(0xbe))+'\x22.');}function readLocalSkillContent(_0x72dbe3){const _0x3061f4=a106_0x15c8,_0x1ad107=resolve(_0x72dbe3,SKILL_FILE);return existsSync(_0x1ad107)&&lstatSync(_0x1ad107)[_0x3061f4(0xcc)]()?readFileSync(_0x1ad107,_0x3061f4(0xd4)):'';}function readPushMetadataIfPresent(_0x320d4f,_0x46f71c={}){const _0x27e476=a106_0x15c8;try{return readMetadataIfPresent(_0x320d4f);}catch(_0x31be9d){if(_0x46f71c[_0x27e476(0xc4)])return undefined;throw _0x31be9d;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x323a66,_0xcd7a6c){const _0x4d1cbb=a107_0x629a,_0x30df79=_0x323a66();while(!![]){try{const _0x272a18=-parseInt(_0x4d1cbb(0x81))/0x1*(parseInt(_0x4d1cbb(0x7a))/0x2)+parseInt(_0x4d1cbb(0x85))/0x3*(parseInt(_0x4d1cbb(0x7c))/0x4)+parseInt(_0x4d1cbb(0x76))/0x5+parseInt(_0x4d1cbb(0x80))/0x6+-parseInt(_0x4d1cbb(0x79))/0x7+parseInt(_0x4d1cbb(0x7e))/0x8+parseInt(_0x4d1cbb(0x83))/0x9*(parseInt(_0x4d1cbb(0x7b))/0xa);if(_0x272a18===_0xcd7a6c)break;else _0x30df79['push'](_0x30df79['shift']());}catch(_0x25fa21){_0x30df79['push'](_0x30df79['shift']());}}}(a107_0x538a,0xed5d6));import{CliErrors}from'../../errors.js';function a107_0x629a(_0x5b081d,_0x3b52c0){_0x5b081d=_0x5b081d-0x76;const _0x538a11=a107_0x538a();let _0x629ab6=_0x538a11[_0x5b081d];return _0x629ab6;}export function normalizeRuntimeSkillScopes(_0xe191c){const _0x3b7e49=a107_0x629a,_0x13568e=_0xe191c&&_0xe191c[_0x3b7e49(0x7d)]>0x0?_0xe191c:[_0x3b7e49(0x84),_0x3b7e49(0x77),'builtin'],_0x25162f=[];for(const _0x5eeb45 of _0x13568e){if(!isRuntimeSkillScope(_0x5eeb45))throw CliErrors[_0x3b7e49(0x78)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x5eeb45);!_0x25162f[_0x3b7e49(0x82)](_0x5eeb45)&&_0x25162f[_0x3b7e49(0x7f)](_0x5eeb45);}return _0x25162f;}function a107_0x538a(){const _0x47de25=['7836890hHRuyz','4pttAjG','length','384008JueQSr','push','10930224xoKJof','19bZJrJi','includes','9QmXRUd','personal','915801IbLfUy','1636655YGUtpE','company','validation','13152916gZuNnl','45764PSnOoN'];a107_0x538a=function(){return _0x47de25;};return a107_0x538a();}export function isRuntimeSkillScope(_0xa5fb16){return _0xa5fb16==='personal'||_0xa5fb16==='company'||_0xa5fb16==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a109_0x3e5596=a109_0x51ba;function a109_0x2a8b(){const _0x40499b=['336268iYiaoU','entries','35BQChAQ','from','281510oXLIuj','endsWith','path','71401dkGqeC','code','map','sort','4807296eEpKvk','1580GCHJZt','object','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','name','3WIFtnN','36869UnRrkb','78BSHFGV','6393456HEUZBd','validation','574731oyKOca','1980-01-01T00:00:00.000Z'];a109_0x2a8b=function(){return _0x40499b;};return a109_0x2a8b();}(function(_0x48313e,_0x2045c4){const _0x3f96b9=a109_0x51ba,_0x30b40c=_0x48313e();while(!![]){try{const _0x26ee6c=parseInt(_0x3f96b9(0x1b6))/0x1*(parseInt(_0x3f96b9(0x1c1))/0x2)+-parseInt(_0x3f96b9(0x1bb))/0x3+-parseInt(_0x3f96b9(0x1bd))/0x4*(-parseInt(_0x3f96b9(0x1bf))/0x5)+-parseInt(_0x3f96b9(0x1b8))/0x6*(parseInt(_0x3f96b9(0x1b7))/0x7)+-parseInt(_0x3f96b9(0x1c8))/0x8+-parseInt(_0x3f96b9(0x1b9))/0x9+-parseInt(_0x3f96b9(0x1b2))/0xa*(-parseInt(_0x3f96b9(0x1c4))/0xb);if(_0x26ee6c===_0x2045c4)break;else _0x30b40c['push'](_0x30b40c['shift']());}catch(_0x54f186){_0x30b40c['push'](_0x30b40c['shift']());}}}(a109_0x2a8b,0x71848));import{unzipSync,zipSync}from'fflate';function a109_0x51ba(_0x296535,_0x290eeb){_0x296535=_0x296535-0x1b2;const _0x2a8bf9=a109_0x2a8b();let _0x51baa9=_0x2a8bf9[_0x296535];return _0x51baa9;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a109_0x3e5596(0x1bc));export function createDeterministicZipPackage(_0x5339fe){const _0x476d36=a109_0x3e5596,_0x1a7007={};for(const _0x12bca0 of normalizeLocalFiles(_0x5339fe)){_0x1a7007[_0x12bca0[_0x476d36(0x1c3)]]=fileContent(_0x12bca0);}return Buffer[_0x476d36(0x1c0)](zipSync(_0x1a7007,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x45f2db){const _0x1c1f8d=a109_0x3e5596;if(_0x45f2db['length']<0x16)throw CliErrors[_0x1c1f8d(0x1ba)](_0x1c1f8d(0x1b4));let _0x554deb;try{_0x554deb=unzipSync(_0x45f2db,{'filter'(_0x48abaa){const _0x3aa3d6=_0x1c1f8d,_0x33fd24=normalizeSkillRelativePath(_0x48abaa[_0x3aa3d6(0x1b5)]);if(_0x33fd24[_0x3aa3d6(0x1c2)]('/'))throw CliErrors[_0x3aa3d6(0x1ba)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x33fd24);return!![];}});}catch(_0x176f11){if(isRuntimeSkillValidationError(_0x176f11))throw _0x176f11;throw CliErrors[_0x1c1f8d(0x1ba)](_0x1c1f8d(0x1b4));}return Object[_0x1c1f8d(0x1be)](_0x554deb)[_0x1c1f8d(0x1c6)](([_0x16a955,_0x2a2ef6])=>({'path':normalizeSkillRelativePath(_0x16a955),'bytes':Buffer['from'](_0x2a2ef6)}))[_0x1c1f8d(0x1c7)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x2badde){const _0x2ef4b7=a109_0x3e5596;return typeof _0x2badde===_0x2ef4b7(0x1b3)&&_0x2badde!==null&&'code'in _0x2badde&&_0x2badde[_0x2ef4b7(0x1c5)]==='validation_error';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3b3096,_0x46144a){const _0x4bc77b=a110_0xfa2c,_0x546a18=_0x3b3096();while(!![]){try{const _0xd3526e=-parseInt(_0x4bc77b(0x1f6))/0x1+parseInt(_0x4bc77b(0x1f9))/0x2*(parseInt(_0x4bc77b(0x206))/0x3)+parseInt(_0x4bc77b(0x1f4))/0x4+parseInt(_0x4bc77b(0x1ed))/0x5*(parseInt(_0x4bc77b(0x1f2))/0x6)+parseInt(_0x4bc77b(0x204))/0x7*(-parseInt(_0x4bc77b(0x201))/0x8)+parseInt(_0x4bc77b(0x20e))/0x9+-parseInt(_0x4bc77b(0x20c))/0xa;if(_0xd3526e===_0x46144a)break;else _0x546a18['push'](_0x546a18['shift']());}catch(_0x38c65a){_0x546a18['push'](_0x546a18['shift']());}}}(a110_0x3dc5,0xd7892));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';function a110_0x3dc5(){const _0x131922=['Runtime\x20Skill\x20package\x20size\x20mismatch.','zipSize','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','toString','17880270zUlPBT','string','8997741EFKCMY','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','toLowerCase','length','path','some','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','schemaVersion','ossPath','5OySAkB','validation','zipSha256','bytes','set','5615592cRpLkh','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','2980460JULqPf','isSafeInteger','768862OGYZpL','size','requireOssPath','419948tkGPEc','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','files','sha256','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','15064VyhZMR','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','map','301eTcjic','treeSha256','12ZhpsPC','get'];a110_0x3dc5=function(){return _0x131922;};return a110_0x3dc5();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x2e7855){const _0x380aa5=a110_0xfa2c,_0x1db7d9=normalizeLocalFiles(_0x2e7855);if(!_0x1db7d9[_0x380aa5(0x1e9)](_0x330131=>_0x330131[_0x380aa5(0x1e8)]===SKILL_FILE))throw CliErrors[_0x380aa5(0x1ee)]('Missing\x20'+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x273573=localFilesToManifestFiles(_0x1db7d9),_0xc2cf13=createDeterministicZipPackage(_0x1db7d9);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x273573),'zipSha256':bufferSha256(_0xc2cf13),'zipSize':_0xc2cf13[_0x380aa5(0x1e7)],'files':_0x273573},'packageBytes':_0xc2cf13,'packageBase64':_0xc2cf13[_0x380aa5(0x20b)]('base64')};}export function verifyRuntimeSkillPackage(_0x4fc9b2,_0x128791){const _0x336b0e=a110_0xfa2c,_0x372346=normalizePackageManifest(_0x4fc9b2,{'requireOssPath':![]});if(!_0x372346)throw CliErrors[_0x336b0e(0x1ee)](_0x336b0e(0x1e5));return extractAndVerifyPackage(_0x372346,_0x128791);}export function verifyRuntimeSkillBundle(_0xa37631,_0x343ea3){const _0x38d288=a110_0xfa2c,_0x36f0bb=normalizePackageManifest(_0xa37631,{'requireOssPath':![]});if(!_0x36f0bb)throw CliErrors[_0x38d288(0x1ee)](_0x38d288(0x1e5));return extractAndVerifyPackageFiles(_0x36f0bb,_0x343ea3);}export function tryNormalizePackageManifest(_0x4741f8){return normalizePackageManifest(_0x4741f8,{'requireOssPath':![]});}function a110_0xfa2c(_0x34f9e8,_0x5797dd){_0x34f9e8=_0x34f9e8-0x1e5;const _0x3dc508=a110_0x3dc5();let _0xfa2ca0=_0x3dc508[_0x34f9e8];return _0xfa2ca0;}export function requirePackageBytes(_0x12d0d0,_0x356c9c){const _0x5ba72c=a110_0xfa2c;if(!_0x356c9c||_0x356c9c['length']===0x0)throw CliErrors[_0x5ba72c(0x1ee)](_0x5ba72c(0x1ea)+_0x12d0d0);return _0x356c9c;}export function extractDownloadedPackage(_0x3f4003){const _0x954ad0=a110_0xfa2c,_0x5b77bc=parseZipPackage(_0x3f4003)['map'](_0x553485=>({'path':_0x553485[_0x954ad0(0x1e8)],'bytes':_0x553485[_0x954ad0(0x1f0)]}));if(!_0x5b77bc[_0x954ad0(0x1e9)](_0x1a432e=>_0x1a432e[_0x954ad0(0x1e8)]===SKILL_FILE))throw CliErrors[_0x954ad0(0x1ee)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x5b77bc);}export function localFilesToManifestFiles(_0x2f6101){const _0xcdcae3=a110_0xfa2c;return normalizeLocalFiles(_0x2f6101)[_0xcdcae3(0x203)](_0x372211=>({'path':_0x372211[_0xcdcae3(0x1e8)],'sha256':fileHash(_0x372211),'size':fileContent(_0x372211)[_0xcdcae3(0x1e7)]}));}function normalizePackageManifest(_0x5dd792,_0x5ace2a){const _0x15430a=a110_0xfa2c;if(!_0x5dd792||typeof _0x5dd792!=='object'||Array['isArray'](_0x5dd792))return undefined;const _0x4e0b09=_0x5dd792,_0xc5f41d=typeof _0x4e0b09[_0x15430a(0x1ec)]===_0x15430a(0x20d)?_0x4e0b09[_0x15430a(0x1ec)]['trim']():undefined;if(_0x5ace2a[_0x15430a(0x1f8)]&&!_0xc5f41d)return undefined;if(!Array['isArray'](_0x4e0b09['files'])||_0x4e0b09[_0x15430a(0x1fc)][_0x15430a(0x1e7)]===0x0)return undefined;if(!isSha256Hex(_0x4e0b09[_0x15430a(0x205)]))throw CliErrors['validation'](_0x15430a(0x200));if(!isSha256Hex(_0x4e0b09[_0x15430a(0x1ef)]))throw CliErrors[_0x15430a(0x1ee)](_0x15430a(0x1fb));if(!Number[_0x15430a(0x1f5)](_0x4e0b09['zipSize'])||_0x4e0b09['zipSize']<0x0)throw CliErrors[_0x15430a(0x1ee)](_0x15430a(0x20f));const _0x5788d8=normalizeManifestFiles(_0x4e0b09[_0x15430a(0x1fc)]);if(!_0x5788d8['some'](_0x27c205=>_0x27c205[_0x15430a(0x1e8)]===SKILL_FILE))throw CliErrors[_0x15430a(0x1ee)](_0x15430a(0x1f3)+SKILL_FILE+'.');const _0x24dd4e=fileTreeHash(_0x5788d8);if(_0x24dd4e!==_0x4e0b09[_0x15430a(0x205)][_0x15430a(0x1e6)]())throw CliErrors[_0x15430a(0x1ee)](_0x15430a(0x1fa));return{'schemaVersion':Number[_0x15430a(0x1f5)](_0x4e0b09[_0x15430a(0x1eb)])?_0x4e0b09[_0x15430a(0x1eb)]:0x2,'ossPath':_0xc5f41d,'treeSha256':_0x24dd4e,'zipSha256':_0x4e0b09['zipSha256'][_0x15430a(0x1e6)](),'zipSize':_0x4e0b09['zipSize'],'files':_0x5788d8};}function extractAndVerifyPackage(_0x2c8d9d,_0x4f4d7f){const _0x434a62=a110_0xfa2c,_0x27ffe2=normalizePackageManifest(_0x2c8d9d,{'requireOssPath':![]});if(!_0x27ffe2)throw CliErrors[_0x434a62(0x1ee)](_0x434a62(0x1e5));if(_0x4f4d7f[_0x434a62(0x1e7)]!==_0x27ffe2[_0x434a62(0x209)])throw CliErrors[_0x434a62(0x1ee)](_0x434a62(0x208));const _0x523361=bufferSha256(_0x4f4d7f);if(_0x523361!==_0x27ffe2[_0x434a62(0x1ef)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x27ffe2,_0x4f4d7f);}function extractAndVerifyPackageFiles(_0x56eedf,_0x20ab8d){const _0x561c28=a110_0xfa2c,_0x2d7a44=parseZipPackage(_0x20ab8d);if(_0x2d7a44[_0x561c28(0x1e7)]!==_0x56eedf[_0x561c28(0x1fc)][_0x561c28(0x1e7)])throw CliErrors['validation'](_0x561c28(0x202));const _0x4e2780=new Map();for(const _0x506eb3 of _0x2d7a44){if(_0x4e2780['has'](_0x506eb3[_0x561c28(0x1e8)]))throw CliErrors[_0x561c28(0x1ee)](_0x561c28(0x1fe)+_0x506eb3['path']);_0x4e2780[_0x561c28(0x1f1)](_0x506eb3[_0x561c28(0x1e8)],_0x506eb3);}const _0x1ff359=[];for(const _0x29dfe4 of _0x56eedf[_0x561c28(0x1fc)]){const _0x105e41=_0x4e2780[_0x561c28(0x207)](_0x29dfe4[_0x561c28(0x1e8)]);if(!_0x105e41)throw CliErrors[_0x561c28(0x1ee)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x29dfe4[_0x561c28(0x1e8)]);if(_0x105e41['bytes']['length']!==_0x29dfe4[_0x561c28(0x1f7)])throw CliErrors[_0x561c28(0x1ee)](_0x561c28(0x20a)+_0x29dfe4['path']);const _0x490d70=bufferSha256(_0x105e41[_0x561c28(0x1f0)]);if(_0x490d70!==_0x29dfe4[_0x561c28(0x1fd)])throw CliErrors[_0x561c28(0x1ee)](_0x561c28(0x1ff)+_0x29dfe4['path']);_0x1ff359['push']({'path':_0x29dfe4[_0x561c28(0x1e8)],'bytes':_0x105e41[_0x561c28(0x1f0)]});}return normalizeLocalFiles(_0x1ff359);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x30875a,_0x126b70){var _0x131e39=a111_0x3405,_0x1425ea=_0x30875a();while(!![]){try{var _0x1b2de3=-parseInt(_0x131e39(0x9f))/0x1*(-parseInt(_0x131e39(0x9d))/0x2)+-parseInt(_0x131e39(0x98))/0x3*(-parseInt(_0x131e39(0x9e))/0x4)+parseInt(_0x131e39(0x99))/0x5+-parseInt(_0x131e39(0xa1))/0x6+-parseInt(_0x131e39(0x9b))/0x7*(-parseInt(_0x131e39(0x9c))/0x8)+parseInt(_0x131e39(0xa0))/0x9+-parseInt(_0x131e39(0x9a))/0xa*(parseInt(_0x131e39(0xa2))/0xb);if(_0x1b2de3===_0x126b70)break;else _0x1425ea['push'](_0x1425ea['shift']());}catch(_0x596a34){_0x1425ea['push'](_0x1425ea['shift']());}}}(a111_0x5310,0x52661));function a111_0x5310(){var _0xa128d2=['1961610dhMCjB','11507180YGvDqN','21WkZVek','1134696BLGREx','256898tDTSwg','16pXfQxb','5fIDWdX','2592252nOtoRT','3813210CalSnU','11LLayLY','281739GpFgJg'];a111_0x5310=function(){return _0xa128d2;};return a111_0x5310();}export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';function a111_0x3405(_0xf6699b,_0x575a28){_0xf6699b=_0xf6699b-0x98;var _0x5310e2=a111_0x5310();var _0x340555=_0x5310e2[_0xf6699b];return _0x340555;}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
|
-
(function(
|
|
1
|
+
(function(_0x1041f0,_0x1d80ab){const _0x583c10=a112_0x1855,_0x270cd8=_0x1041f0();while(!![]){try{const _0xbc8d89=parseInt(_0x583c10(0x154))/0x1+parseInt(_0x583c10(0x153))/0x2*(-parseInt(_0x583c10(0x159))/0x3)+-parseInt(_0x583c10(0x15b))/0x4*(parseInt(_0x583c10(0x158))/0x5)+-parseInt(_0x583c10(0x157))/0x6*(parseInt(_0x583c10(0x151))/0x7)+-parseInt(_0x583c10(0x156))/0x8*(-parseInt(_0x583c10(0x152))/0x9)+parseInt(_0x583c10(0x14f))/0xa*(-parseInt(_0x583c10(0x15a))/0xb)+parseInt(_0x583c10(0x155))/0xc*(parseInt(_0x583c10(0x150))/0xd);if(_0xbc8d89===_0x1d80ab)break;else _0x270cd8['push'](_0x270cd8['shift']());}catch(_0x4b2201){_0x270cd8['push'](_0x270cd8['shift']());}}}(a112_0x4ee2,0xc1d98));function a112_0x1855(_0x2205c7,_0x59df62){_0x2205c7=_0x2205c7-0x14f;const _0x4ee245=a112_0x4ee2();let _0x1855b7=_0x4ee245[_0x2205c7];return _0x1855b7;}function a112_0x4ee2(){const _0x1f1f73=['5zibGJA','42NAOGeK','4816295mlKYOZ','3284580YbZHXF','10EyiFgZ','13fwnzmI','1447768tUIVYf','3323709SZnQTZ','96244dqRmhC','533320bHcmck','24370908oWLhOO','8JUFAUs','6jFhibj'];a112_0x4ee2=function(){return _0x1f1f73;};return a112_0x4ee2();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a113_0x2450b0=a113_0x17c6;(function(_0x3268aa,_0x45e1da){const _0x2de47d=a113_0x17c6,_0x1b3d6f=_0x3268aa();while(!![]){try{const _0x53aa25=parseInt(_0x2de47d(0x13c))/0x1*(-parseInt(_0x2de47d(0x147))/0x2)+-parseInt(_0x2de47d(0x162))/0x3+-parseInt(_0x2de47d(0x144))/0x4+parseInt(_0x2de47d(0x15e))/0x5*(-parseInt(_0x2de47d(0x139))/0x6)+-parseInt(_0x2de47d(0x160))/0x7+parseInt(_0x2de47d(0x152))/0x8+parseInt(_0x2de47d(0x157))/0x9;if(_0x53aa25===_0x45e1da)break;else _0x1b3d6f['push'](_0x1b3d6f['shift']());}catch(_0x3cf7b2){_0x1b3d6f['push'](_0x1b3d6f['shift']());}}}(a113_0x271d,0xcbf8b));function a113_0x17c6(_0x55ed72,_0x202cf5){_0x55ed72=_0x55ed72-0x130;const _0x271dd1=a113_0x271d();let _0x17c62c=_0x271dd1[_0x55ed72];return _0x17c62c;}import a113_0x39c50a from'winston';import a113_0x150ec7 from'node:fs';function a113_0x271d(){const _0x1aff2a=['now','success','winstonLogger','setLogPath','format','blue','error','Failed:\x20','11870256CkdRVx','addColors','parse','details','toISOString','36439506rawoeW','printf','initWinstonLogger','stringify','setRawCommand','red','errors','6821330SohLuo','Completed:\x20','8287664JoOCIC','timestamp','2074551QLPobu','dirname','logFilePath','clearLogs','info','existsSync','filter','join','rawCommand','log','6mgFpeW','logFileName','green','44489CCEFjU','readLogs','unknown','split','map','clear','currentRawCommand','duration','846888YxndCz','getWinstonInstance','Starting:\x20','56nDZtEJ','warn','Failed\x20to\x20clear\x20logs:'];a113_0x271d=function(){return _0x1aff2a;};return a113_0x271d();}import a113_0x582749 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a113_0x2450b0(0x131)]='';['currentRawCommand']='';constructor(){}[a113_0x2450b0(0x15b)](_0x4ba927){const _0x40aecb=a113_0x2450b0;this[_0x40aecb(0x142)]=_0x4ba927;}[a113_0x2450b0(0x14d)](_0xbec377){const _0x65398f=a113_0x2450b0;this[_0x65398f(0x131)]=a113_0x582749[_0x65398f(0x136)](_0xbec377,PRODUCT_CONFIG[_0x65398f(0x13a)]),this[_0x65398f(0x14c)]&&this['winstonLogger'][_0x65398f(0x141)](),this[_0x65398f(0x159)]();}[a113_0x2450b0(0x159)](){const _0x379775=a113_0x2450b0,_0x22b7c5=a113_0x582749[_0x379775(0x130)](this[_0x379775(0x131)]);!a113_0x150ec7[_0x379775(0x134)](_0x22b7c5)&&a113_0x150ec7['mkdirSync'](_0x22b7c5,{'recursive':!![]});const _0x393ecf=a113_0x39c50a[_0x379775(0x14e)]['combine'](a113_0x39c50a[_0x379775(0x14e)]['timestamp'](),a113_0x39c50a['format'][_0x379775(0x15d)]({'stack':!![]}),a113_0x39c50a[_0x379775(0x14e)][_0x379775(0x158)](_0x431a63=>{const _0x2ee597=_0x379775,_0x2f5438={'timestamp':_0x431a63[_0x2ee597(0x161)]||new Date()[_0x2ee597(0x156)](),'level':_0x431a63['level']||_0x2ee597(0x133),'command':_0x431a63['command']||_0x2ee597(0x13e),'rawCommand':_0x431a63[_0x2ee597(0x137)]||this[_0x2ee597(0x142)]||undefined,'message':_0x431a63['message']||'','duration':_0x431a63[_0x2ee597(0x143)]||undefined,'details':_0x431a63[_0x2ee597(0x155)]||undefined};return JSON[_0x2ee597(0x15a)](_0x2f5438);}));this['winstonLogger']=a113_0x39c50a['createLogger']({'level':_0x379775(0x133),'format':_0x393ecf,'transports':[new a113_0x39c50a['transports']['File']({'filename':this[_0x379775(0x131)],'level':'info'})],'silent':![]}),a113_0x39c50a[_0x379775(0x153)]({'success':_0x379775(0x13b),'error':_0x379775(0x15c),'warn':'yellow','info':_0x379775(0x14f)});}[a113_0x2450b0(0x133)](_0xcba473,_0xfeb863,_0x3ed9bc){const _0x2b7bca=a113_0x2450b0;if(!this[_0x2b7bca(0x131)]||!this['winstonLogger'])return;this[_0x2b7bca(0x14c)][_0x2b7bca(0x133)](_0xfeb863,{'command':_0xcba473,'details':_0x3ed9bc});}[a113_0x2450b0(0x14b)](_0x2eb11f,_0x474573,_0x506056,_0x31c424){const _0x4f0243=a113_0x2450b0;if(!this[_0x4f0243(0x131)]||!this['winstonLogger'])return;this[_0x4f0243(0x14c)][_0x4f0243(0x138)](_0x4f0243(0x133),_0x474573,{'level':_0x4f0243(0x14b),'command':_0x2eb11f,'duration':_0x506056,'details':_0x31c424});}['error'](_0x20da42,_0x3f8aa6,_0x225eed){const _0x6bbc55=a113_0x2450b0;if(!this[_0x6bbc55(0x131)]||!this[_0x6bbc55(0x14c)])return;this[_0x6bbc55(0x14c)][_0x6bbc55(0x150)](_0x3f8aa6,{'command':_0x20da42,'details':_0x225eed});}[a113_0x2450b0(0x148)](_0x126e35,_0x32369c,_0x1bed86){const _0x29a682=a113_0x2450b0;if(!this[_0x29a682(0x131)]||!this['winstonLogger'])return;this[_0x29a682(0x14c)]['warn'](_0x32369c,{'command':_0x126e35,'details':_0x1bed86});}async['logTask'](_0x28c9e9,_0x3d35f8,_0x4ca43b){const _0x9272cf=a113_0x2450b0,_0x53cf12=Date[_0x9272cf(0x14a)]();this[_0x9272cf(0x133)](_0x28c9e9,_0x9272cf(0x146)+_0x3d35f8);try{const _0x2fc698=await _0x4ca43b(),_0x3e1b86=Date[_0x9272cf(0x14a)]()-_0x53cf12;return this['success'](_0x28c9e9,_0x9272cf(0x15f)+_0x3d35f8,_0x3e1b86),_0x2fc698;}catch(_0x429d02){const _0x446ec0=Date[_0x9272cf(0x14a)]()-_0x53cf12;this[_0x9272cf(0x150)](_0x28c9e9,_0x9272cf(0x151)+_0x3d35f8,{'error':_0x429d02 instanceof Error?_0x429d02['message']:String(_0x429d02),'duration':_0x446ec0});throw _0x429d02;}}[a113_0x2450b0(0x13d)](){const _0x3003a5=a113_0x2450b0;try{if(!a113_0x150ec7[_0x3003a5(0x134)](this[_0x3003a5(0x131)]))return[];const _0x174e03=a113_0x150ec7['readFileSync'](this[_0x3003a5(0x131)],'utf8');return _0x174e03[_0x3003a5(0x13f)](/\r?\n/)[_0x3003a5(0x135)](_0x3e9508=>_0x3e9508['trim']())[_0x3003a5(0x140)](_0x1ee741=>JSON[_0x3003a5(0x154)](_0x1ee741));}catch(_0x1768ca){return console[_0x3003a5(0x148)]('Failed\x20to\x20read\x20logs:',_0x1768ca),[];}}[a113_0x2450b0(0x132)](){const _0x142b55=a113_0x2450b0;try{a113_0x150ec7['existsSync'](this['logFilePath'])&&a113_0x150ec7['writeFileSync'](this[_0x142b55(0x131)],'','utf8');}catch(_0x57d847){console[_0x142b55(0x148)](_0x142b55(0x149),_0x57d847);}}[a113_0x2450b0(0x145)](){const _0x39831f=a113_0x2450b0;return this[_0x39831f(0x14c)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a114_0x48b8f8=a114_0x1ccc;(function(_0x4f2200,_0x15b757){const _0x588dad=a114_0x1ccc,_0x38a6e1=_0x4f2200();while(!![]){try{const _0x1698a7=-parseInt(_0x588dad(0xc0))/0x1*(parseInt(_0x588dad(0xc6))/0x2)+-parseInt(_0x588dad(0xca))/0x3*(parseInt(_0x588dad(0xcc))/0x4)+parseInt(_0x588dad(0xc8))/0x5+-parseInt(_0x588dad(0xbd))/0x6+parseInt(_0x588dad(0xc7))/0x7*(parseInt(_0x588dad(0xbc))/0x8)+parseInt(_0x588dad(0xbb))/0x9*(-parseInt(_0x588dad(0xc1))/0xa)+-parseInt(_0x588dad(0xc4))/0xb;if(_0x1698a7===_0x15b757)break;else _0x38a6e1['push'](_0x38a6e1['shift']());}catch(_0xac3063){_0x38a6e1['push'](_0x38a6e1['shift']());}}}(a114_0x27f4,0x7c5cf));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a114_0x48b8f8(0xba)]),MIN_SAFE_INTEGER=BigInt(Number[a114_0x48b8f8(0xc3)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a114_0x1ccc(_0x49317d,_0x3e1b99){_0x49317d=_0x49317d-0xb9;const _0x27f45d=a114_0x27f4();let _0x1ccc64=_0x27f45d[_0x49317d];return _0x1ccc64;}function isUnsafeIntegerLiteral(_0x5bc502){if(_0x5bc502['includes']('.')||_0x5bc502['includes']('e')||_0x5bc502['includes']('E'))return![];const _0x4c0060=BigInt(_0x5bc502);return _0x4c0060>MAX_SAFE_INTEGER||_0x4c0060<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x28063a){const _0x1a6c25=a114_0x48b8f8;let _0x5c4211='',_0x17a508=![],_0x5b2b6b=![];for(let _0x200177=0x0;_0x200177<_0x28063a[_0x1a6c25(0xc5)];){const _0x5958d6=_0x28063a[_0x200177];if(_0x17a508){_0x5c4211+=_0x5958d6,_0x200177+=0x1;if(_0x5b2b6b)_0x5b2b6b=![];else{if(_0x5958d6==='\x5c')_0x5b2b6b=!![];else _0x5958d6==='\x22'&&(_0x17a508=![]);}continue;}if(_0x5958d6==='\x22'){_0x17a508=!![],_0x5c4211+=_0x5958d6,_0x200177+=0x1;continue;}if(_0x5958d6==='-'||_0x5958d6>='0'&&_0x5958d6<='9'){const _0x4004ce=JSON_NUMBER_PATTERN[_0x1a6c25(0xcb)](_0x28063a[_0x1a6c25(0xcd)](_0x200177))?.[0x0];if(_0x4004ce){_0x5c4211+=isUnsafeIntegerLiteral(_0x4004ce)?'\x22'+_0x4004ce+'\x22':_0x4004ce,_0x200177+=_0x4004ce[_0x1a6c25(0xc5)];continue;}}_0x5c4211+=_0x5958d6,_0x200177+=0x1;}return _0x5c4211;}export function parseLosslessJson(_0x16dbec){const _0x49e3b2=a114_0x48b8f8;return JSON[_0x49e3b2(0xbf)](quoteUnsafeIntegerLiterals(_0x16dbec));}function a114_0x27f4(){const _0xac5829=['472dVSGJw','1367226eNQViz','json','parse','1DGqFzi','1720tWefKS','undefined','MIN_SAFE_INTEGER','3145791wnuEQi','length','1072294CIoMCf','111370OmDwDh','4265635NjqzYw','defineProperty','849UyhvYR','exec','628NiDmPE','slice','text','prototype','MAX_SAFE_INTEGER','9837gElIwp'];a114_0x27f4=function(){return _0xac5829;};return a114_0x27f4();}export function installLosslessJsonResponseParser(){const _0x2591db=a114_0x48b8f8;if(typeof Response===_0x2591db(0xc2))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x2591db(0xb9)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,'json'),Object[_0x2591db(0xc9)](responseJsonPrototype,_0x2591db(0xbe),{'configurable':!![],'enumerable':![],'value':async function _0x104d38(){const _0x46b8f4=_0x2591db;return parseLosslessJson(await this[_0x46b8f4(0xce)]());},'writable':!![]}),restoreResponseJsonParser=()=>{const _0x5062fa=_0x2591db;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x5062fa(0xbe),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x5062fa(0xbe)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e21e0,_0x2b3a82){const _0x5d5c8a=a115_0x526a,_0x3ddb61=_0x1e21e0();while(!![]){try{const _0x4234db=parseInt(_0x5d5c8a(0x1f4))/0x1*(parseInt(_0x5d5c8a(0x206))/0x2)+-parseInt(_0x5d5c8a(0x1ed))/0x3+-parseInt(_0x5d5c8a(0x1fc))/0x4*(-parseInt(_0x5d5c8a(0x1fb))/0x5)+-parseInt(_0x5d5c8a(0x1fa))/0x6+parseInt(_0x5d5c8a(0x1ee))/0x7+-parseInt(_0x5d5c8a(0x1f1))/0x8*(-parseInt(_0x5d5c8a(0x1ef))/0x9)+parseInt(_0x5d5c8a(0x1f0))/0xa;if(_0x4234db===_0x2b3a82)break;else _0x3ddb61['push'](_0x3ddb61['shift']());}catch(_0x54a152){_0x3ddb61['push'](_0x3ddb61['shift']());}}}(a115_0x97e0,0xce2f0));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x22e838){const _0x1ff3e3=a115_0x526a;if(!_0x22e838)return undefined;try{return parseLosslessJson(_0x22e838);}catch{throw CliErrors[_0x1ff3e3(0x202)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x22e838);}}export function parseJsonParamsValue(_0x5b86bb){const _0x290ad4=a115_0x526a;if(!_0x5b86bb)return undefined;try{return parseLosslessJson(_0x5b86bb);}catch{throw CliErrors[_0x290ad4(0x202)](_0x290ad4(0x205)+_0x5b86bb);}}function a115_0x526a(_0x28a5d4,_0x5478cc){_0x28a5d4=_0x28a5d4-0x1eb;const _0x97e0c1=a115_0x97e0();let _0x526abb=_0x97e0c1[_0x28a5d4];return _0x526abb;}export function parseBatchCreateItemsFromParams(_0x3e0f23){const _0x187b0a=a115_0x526a;if(Array['isArray'](_0x3e0f23))return _0x3e0f23;if(_0x3e0f23!==null&&_0x3e0f23!==undefined&&typeof _0x3e0f23===_0x187b0a(0x1f7)&&Array[_0x187b0a(0x1f5)](_0x3e0f23[_0x187b0a(0x1fd)]))return _0x3e0f23[_0x187b0a(0x1fd)];throw CliErrors[_0x187b0a(0x202)](_0x187b0a(0x1f3),_0x187b0a(0x1eb));}function parseDataUpdateId(_0x5bf76b,_0xc96dd1){const _0x25f9b4=a115_0x526a;if(typeof _0x5bf76b===_0x25f9b4(0x204)&&Number[_0x25f9b4(0x201)](_0x5bf76b)&&_0x5bf76b>0x0)return _0x5bf76b;if(typeof _0x5bf76b==='string'){if(/^[1-9]\d*$/['test'](_0x5bf76b))return _0x5bf76b;}throw CliErrors['validation'](_0x25f9b4(0x1ff)+_0xc96dd1+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}function a115_0x97e0(){const _0x3a0d29=['467uZImwi','isArray','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','object','map','length','4543380DBVMmz','925jeUoND','808UnCHTa','items','id[','data\x20update\x20--params.','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','isSafeInteger','validation','data\x20update\x20can\x20update\x20at\x20most\x20','number','Invalid\x20JSON\x20for\x20--params:\x20','586wjcKIU','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','4423689GIzgbj','10625636oBSWYy','63YRFDEC','11921410IWbZJb','219464vnxEnr','\x20records\x20per\x20call;\x20received\x20','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}'];a115_0x97e0=function(){return _0x3a0d29;};return a115_0x97e0();}export function parseUpdateIdsFromParams(_0x55cad9){const _0x23586d=a115_0x526a;if(_0x55cad9===null||_0x55cad9===undefined||typeof _0x55cad9!==_0x23586d(0x1f7)||Array[_0x23586d(0x1f5)](_0x55cad9))throw CliErrors[_0x23586d(0x202)](_0x23586d(0x1f6),'Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x194d30=_0x55cad9['id'];if(_0x194d30===undefined||_0x194d30===null)throw CliErrors['validation'](_0x23586d(0x207),_0x23586d(0x1ec));const _0xa370f=Array['isArray'](_0x194d30)?_0x194d30:[_0x194d30];if(_0xa370f[_0x23586d(0x1f9)]===0x0)throw CliErrors['validation'](_0x23586d(0x200));if(_0xa370f[_0x23586d(0x1f9)]>MAX_DATA_UPDATE_IDS)throw CliErrors['validation'](_0x23586d(0x203)+MAX_DATA_UPDATE_IDS+_0x23586d(0x1f2)+_0xa370f[_0x23586d(0x1f9)]+'.');return _0xa370f[_0x23586d(0x1f8)]((_0x1477d9,_0x25b7a3)=>parseDataUpdateId(_0x1477d9,Array[_0x23586d(0x1f5)](_0x194d30)?_0x23586d(0x1fe)+_0x25b7a3+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x1914f8,_0x46cfdc){const _0x27160b=a115_0x526a;if(Array['isArray'](_0x1914f8['id'])&&_0x46cfdc[_0x27160b(0x1f9)]>0x1)return{..._0x1914f8,'id':_0x46cfdc['join'](',')};return _0x1914f8;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a116_0x18ee(_0x2f9d5a,_0x5c3a00){_0x2f9d5a=_0x2f9d5a-0x15b;const _0x420840=a116_0x4208();let _0x18ee91=_0x420840[_0x2f9d5a];return _0x18ee91;}const a116_0x4ece9c=a116_0x18ee;(function(_0x3b329b,_0xd8466){const _0x31f86a=a116_0x18ee,_0x3ebcb4=_0x3b329b();while(!![]){try{const _0x4a4eb9=-parseInt(_0x31f86a(0x15d))/0x1*(-parseInt(_0x31f86a(0x166))/0x2)+parseInt(_0x31f86a(0x15c))/0x3+parseInt(_0x31f86a(0x163))/0x4*(parseInt(_0x31f86a(0x165))/0x5)+parseInt(_0x31f86a(0x161))/0x6+-parseInt(_0x31f86a(0x160))/0x7+-parseInt(_0x31f86a(0x15b))/0x8+parseInt(_0x31f86a(0x162))/0x9*(-parseInt(_0x31f86a(0x167))/0xa);if(_0x4a4eb9===_0xd8466)break;else _0x3ebcb4['push'](_0x3ebcb4['shift']());}catch(_0x3e1fad){_0x3ebcb4['push'](_0x3ebcb4['shift']());}}}(a116_0x4208,0x60e84));function a116_0x4208(){const _0x23271c=['3958495Wqwihq','74546QlPjtQ','1228310sFxFQY','5606296ovWJbw','1415268vmCuXE','7zsPnri','platform','.cmd','3496801VXnDgl','1174362EplHlD','9VFesAq','4waRWnK','win32'];a116_0x4208=function(){return _0x23271c;};return a116_0x4208();}export const isWindows=process[a116_0x4ece9c(0x15e)]===a116_0x4ece9c(0x164);export function resolveNpmBin(_0x23dadb){const _0x475723=a116_0x4ece9c;return isWindows?_0x23dadb+_0x475723(0x15f):_0x23dadb;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3110c2,_0x3080b8){const _0x414fe7=a117_0x2616,_0x13bc27=_0x3110c2();while(!![]){try{const _0xcf8042=-parseInt(_0x414fe7(0xa6))/0x1+parseInt(_0x414fe7(0xbb))/0x2+parseInt(_0x414fe7(0xc3))/0x3+-parseInt(_0x414fe7(0xb2))/0x4+parseInt(_0x414fe7(0xa7))/0x5+parseInt(_0x414fe7(0xb3))/0x6+-parseInt(_0x414fe7(0xaa))/0x7*(parseInt(_0x414fe7(0xb7))/0x8);if(_0xcf8042===_0x3080b8)break;else _0x13bc27['push'](_0x13bc27['shift']());}catch(_0x497e3c){_0x13bc27['push'](_0x13bc27['shift']());}}}(a117_0x2470,0x4c028));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a117_0x2470(){const _0x530b42=['utf8','fromEntries',',\x20run:\x20','/dist-tags','302136RONtSI','1963788TgjlvR','json','https://www.npmjs.com/package/','/-/package/','64EXISrF','latest','entries','match','85790EVzIAH','lastNotifiedAt','trim','update-check.json','/v/','number','stringify','string','87309Zeypnn','timeout','filter','.cache','\x20available,\x20current\x20','lastNotifiedVersion','checkedAt','prerelease','yes','110312cUKSxA','1063470gMrZey','major','patch','100457FMQEun','Invalid\x20semver','true','object'];a117_0x2470=function(){return _0x530b42;};return a117_0x2470();}import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x3d49d0){const _0x4289cb=a117_0x2616,_0x427129=_0x3d49d0[_0x4289cb(0xbd)]()[_0x4289cb(0xba)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x427129)return null;return{'major':Number(_0x427129[0x1]),'minor':Number(_0x427129[0x2]),'patch':Number(_0x427129[0x3]),'prerelease':_0x427129[0x4]};}function compareSemver(_0x3c9bbc,_0x175c78){const _0x5c41af=a117_0x2616,_0x29c72a=parseSemver(_0x3c9bbc),_0x1ffcea=parseSemver(_0x175c78);if(!_0x29c72a||!_0x1ffcea)throw new Error(_0x5c41af(0xab));for(const _0x5c6790 of[_0x5c41af(0xa8),'minor',_0x5c41af(0xa9)]){if(_0x29c72a[_0x5c6790]<_0x1ffcea[_0x5c6790])return-0x1;if(_0x29c72a[_0x5c6790]>_0x1ffcea[_0x5c6790])return 0x1;}if(!_0x29c72a['prerelease']&&!_0x1ffcea['prerelease'])return 0x0;if(!_0x29c72a[_0x5c41af(0xa4)])return 0x1;if(!_0x1ffcea[_0x5c41af(0xa4)])return-0x1;if(_0x29c72a['prerelease']===_0x1ffcea['prerelease'])return 0x0;return _0x29c72a[_0x5c41af(0xa4)]<_0x1ffcea['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x325a1a=a117_0x2616,_0x116574=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x325a1a(0xbd)]()['toLowerCase']();return _0x116574==='1'||_0x116574===_0x325a1a(0xac)||_0x116574===_0x325a1a(0xa5);}function a117_0x2616(_0x432870,_0x474c7b){_0x432870=_0x432870-0xa4;const _0x24700d=a117_0x2470();let _0x2616a4=_0x24700d[_0x432870];return _0x2616a4;}function cacheRoot(){const _0x415866=a117_0x2616;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x415866(0xc6));}export function getUpdateNoticeCachePath(){const _0x29a849=a117_0x2616;return join(cacheRoot(),'lovrabet-cli',_0x29a849(0xbe));}async function readUpdateNoticeCache(){const _0x31d774=a117_0x2616;try{const _0x55a351=await readFile(getUpdateNoticeCachePath(),_0x31d774(0xae)),_0x584439=JSON['parse'](_0x55a351);if(!_0x584439||typeof _0x584439!==_0x31d774(0xad))return{};return _0x584439;}catch{return{};}}async function writeUpdateNoticeCache(_0x147ef0){const _0x8f8293=a117_0x2616;try{const _0x385890=getUpdateNoticeCachePath();await mkdir(dirname(_0x385890),{'recursive':!![]}),await writeFile(_0x385890,JSON[_0x8f8293(0xc1)](_0x147ef0,null,0x2)+'\x0a',_0x8f8293(0xae));}catch{}}function isFreshCheck(_0xd9450c,_0x43d441){const _0x7ded40=a117_0x2616;return typeof _0xd9450c['checkedAt']===_0x7ded40(0xc0)&&_0x43d441-_0xd9450c[_0x7ded40(0xc9)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x7c6eae,_0x21e1de,_0x4576ad){const _0x479ed6=a117_0x2616;return _0x7c6eae[_0x479ed6(0xc8)]===_0x21e1de&&typeof _0x7c6eae[_0x479ed6(0xbc)]===_0x479ed6(0xc0)&&_0x4576ad-_0x7c6eae['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x402e01=0x5dc){const _0x53801d=a117_0x2616;try{const _0x93a502=NPM_REGISTRY_BASE_URL+_0x53801d(0xb6)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x53801d(0xb1),_0x22ca5f=await fetch(_0x93a502,{'signal':AbortSignal[_0x53801d(0xc4)](_0x402e01)});if(!_0x22ca5f['ok'])return null;const _0x1fd5a4=await _0x22ca5f[_0x53801d(0xb4)]();if(!_0x1fd5a4||typeof _0x1fd5a4!==_0x53801d(0xad))return null;return Object[_0x53801d(0xaf)](Object[_0x53801d(0xb9)](_0x1fd5a4)[_0x53801d(0xc5)](([,_0x47117b])=>typeof _0x47117b===_0x53801d(0xc2)&&_0x47117b[_0x53801d(0xbd)]())['map'](([_0x3fa77b,_0x1b6a04])=>[_0x3fa77b,String(_0x1b6a04)[_0x53801d(0xbd)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x1fea48){const _0x281255=a117_0x2616;return _0x281255(0xb5)+LOVRABET_NPM_PACKAGE_NAME+_0x281255(0xbf)+_0x1fea48;}export async function resolveLatestUpdateNotice(){const _0x5c497d=a117_0x2616;if(isUpdateNoticeDisabled())return null;try{const _0x1b393e=Date['now'](),_0x33fdf4=getCliVersion(),_0x3317e8=await readUpdateNoticeCache();let _0x4c71dc=isFreshCheck(_0x3317e8,_0x1b393e)?_0x3317e8['latest']?.[_0x5c497d(0xbd)]():undefined;if(!_0x4c71dc&&!isFreshCheck(_0x3317e8,_0x1b393e)){const _0x5303ea=await fetchNpmDistTags();_0x4c71dc=_0x5303ea?.[_0x5c497d(0xb8)]?.[_0x5c497d(0xbd)](),await writeUpdateNoticeCache({..._0x3317e8,'checkedAt':_0x1b393e,'latest':_0x4c71dc,'failed':!_0x4c71dc});}if(!_0x4c71dc||compareSemver(_0x33fdf4,_0x4c71dc)>=0x0)return null;if(isRecentlyNotified(_0x3317e8,_0x4c71dc,_0x1b393e))return null;const _0x5b9ded=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x3317e8,'checkedAt':isFreshCheck(_0x3317e8,_0x1b393e)?_0x3317e8[_0x5c497d(0xc9)]:_0x1b393e,'latest':_0x4c71dc,'failed':![],'lastNotifiedVersion':_0x4c71dc,'lastNotifiedAt':_0x1b393e}),{'command':_0x5b9ded,'current':_0x33fdf4,'latest':_0x4c71dc,'url':buildNpmVersionUrl(_0x4c71dc),'message':CLI_BIN_NAME+'\x20'+_0x4c71dc+_0x5c497d(0xc7)+_0x33fdf4+_0x5c497d(0xb0)+_0x5b9ded};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4fbf57,_0x241d67){const _0x490bf8=a118_0x2349,_0x17aeef=_0x4fbf57();while(!![]){try{const _0x5edb65=-parseInt(_0x490bf8(0x143))/0x1*(-parseInt(_0x490bf8(0x145))/0x2)+-parseInt(_0x490bf8(0x142))/0x3*(-parseInt(_0x490bf8(0x13e))/0x4)+-parseInt(_0x490bf8(0x141))/0x5+-parseInt(_0x490bf8(0x140))/0x6+parseInt(_0x490bf8(0x146))/0x7+parseInt(_0x490bf8(0x144))/0x8+-parseInt(_0x490bf8(0x13f))/0x9;if(_0x5edb65===_0x241d67)break;else _0x17aeef['push'](_0x17aeef['shift']());}catch(_0x375cc5){_0x17aeef['push'](_0x17aeef['shift']());}}}(a118_0x28b6,0x9e503));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';function a118_0x2349(_0x5106db,_0x39dfd0){_0x5106db=_0x5106db-0x13d;const _0x28b684=a118_0x28b6();let _0x23494d=_0x28b684[_0x5106db];return _0x23494d;}export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x1964ec=a118_0x2349,_0x564281=String(GIT_COMMIT);return _0x564281&&_0x564281!==_0x1964ec(0x13d)?_0x564281:'';}export function getCliVersionDisplay(){const _0x262b8b=getCliGitCommit(),_0x31a3b1=BUILD_TIME['slice'](0x0,0xa);if(!_0x262b8b||!_0x31a3b1)return VERSION;return VERSION+'\x20('+_0x262b8b+',\x20'+_0x31a3b1+')';}function a118_0x28b6(){const _0x2b7827=['2056180lxGmPk','unknown','4mkztZk','8361981WInHqE','1775268KOGHjJ','983810lBXiOt','1944741UFgZgF','529JTYNon','1860928wSKQed','3386JjylNV'];a118_0x28b6=function(){return _0x2b7827;};return a118_0x28b6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a119_0x565a(_0x1e3491,_0xaf5949){_0x1e3491=_0x1e3491-0x1b8;var _0x20791c=a119_0x2079();var _0x565af9=_0x20791c[_0x1e3491];return _0x565af9;}(function(_0x1034aa,_0x1f1aa1){var _0x3c2fe9=a119_0x565a,_0x54d8b3=_0x1034aa();while(!![]){try{var _0x4316ce=parseInt(_0x3c2fe9(0x1c2))/0x1+parseInt(_0x3c2fe9(0x1bb))/0x2*(parseInt(_0x3c2fe9(0x1be))/0x3)+-parseInt(_0x3c2fe9(0x1b8))/0x4*(parseInt(_0x3c2fe9(0x1ba))/0x5)+-parseInt(_0x3c2fe9(0x1b9))/0x6+-parseInt(_0x3c2fe9(0x1c1))/0x7+-parseInt(_0x3c2fe9(0x1c3))/0x8+-parseInt(_0x3c2fe9(0x1c0))/0x9*(-parseInt(_0x3c2fe9(0x1bf))/0xa);if(_0x4316ce===_0x1f1aa1)break;else _0x54d8b3['push'](_0x54d8b3['shift']());}catch(_0x3d3a52){_0x54d8b3['push'](_0x54d8b3['shift']());}}}(a119_0x2079,0xb4635));export function writeCliSideChannelLine(_0x4eba31){var _0x566b7b=a119_0x565a;process[_0x566b7b(0x1bd)][_0x566b7b(0x1bc)](_0x4eba31+'\x0a');}function a119_0x2079(){var _0x590a22=['90mlQhQB','9199491VSnHiR','1345135gNfjae','1222680iBqjkU','3223468VRkgPh','8579028OaQYZw','5sBGTsx','2762AUHNHC','write','stderr','2211hCouGw','2078690OONFWI'];a119_0x2079=function(){return _0x590a22;};return a119_0x2079();}
|