@lovrabet/lovrabet-cli 2.1.9-beta.2 → 2.1.9-beta.4
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/NOTICE +5 -0
- package/README.md +156 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/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/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 +18 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1470b7,_0x54c123){const _0x34dea0=a104_0x4ba7,_0x3cfc72=_0x1470b7();while(!![]){try{const _0x68c4e1=parseInt(_0x34dea0(0x15f))/0x1*(-parseInt(_0x34dea0(0x175))/0x2)+-parseInt(_0x34dea0(0x195))/0x3+-parseInt(_0x34dea0(0x18a))/0x4*(-parseInt(_0x34dea0(0x16b))/0x5)+-parseInt(_0x34dea0(0x178))/0x6*(-parseInt(_0x34dea0(0x163))/0x7)+-parseInt(_0x34dea0(0x15c))/0x8+parseInt(_0x34dea0(0x16c))/0x9+-parseInt(_0x34dea0(0x167))/0xa*(parseInt(_0x34dea0(0x191))/0xb);if(_0x68c4e1===_0x54c123)break;else _0x3cfc72['push'](_0x3cfc72['shift']());}catch(_0x2cfde5){_0x3cfc72['push'](_0x3cfc72['shift']());}}}(a104_0x3421,0x773ae));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x3571a2}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(_0x3a9ebc,_0x32a192,_0x457170={}){const _0x1272a6=a104_0x4ba7,_0x4a59af=resolvePushDirectoryRoot(_0x3a9ebc),_0x2df816=readPushMetadataIfPresent(resolve(_0x4a59af,METADATA_FILE),{'ignoreInvalidMetadata':_0x457170['ignoreInvalidMetadata']});if(_0x2df816?.[_0x1272a6(0x165)]&&_0x2df816['appCode']!==_0x32a192&&!_0x457170['allowAppCodeRetarget']&&!_0x457170[_0x1272a6(0x190)])throw CliErrors['validation'](_0x1272a6(0x188)+_0x2df816[_0x1272a6(0x165)]+_0x1272a6(0x16f)+_0x32a192+'\x22.');const _0x5146b3=resolvePushSkillCode(_0x4a59af,_0x32a192,_0x2df816,_0x457170);if(!_0x5146b3)throw CliErrors[_0x1272a6(0x186)](_0x1272a6(0x173)+SKILL_FILE+',\x20'+METADATA_FILE+_0x1272a6(0x171));return{'dir':_0x4a59af,'skillCode':_0x5146b3,'metadata':_0x2df816};}export function readPushDirectory(_0x2e1db2,_0x29f9af,_0x2badc2={}){const _0x36f813=a104_0x4ba7,_0x3f5680=resolvePushDirectoryIdentity(_0x2e1db2,_0x29f9af,_0x2badc2),_0x189ca6=_0x3f5680[_0x36f813(0x174)],_0x3f917e=resolve(_0x189ca6,SKILL_FILE);if(!existsSync(_0x3f917e)||!lstatSync(_0x3f917e)[_0x36f813(0x194)]())throw CliErrors[_0x36f813(0x186)](_0x36f813(0x17e)+SKILL_FILE+':\x20'+_0x3f917e);const _0x595023=_0x3f5680[_0x36f813(0x18b)],_0x9a1043=_0x2badc2[_0x36f813(0x17d)]??_0x36f813(0x16a);if(!_0x2badc2[_0x36f813(0x19b)]&&_0x595023?.[_0x36f813(0x192)]==='builtin')throw CliErrors[_0x36f813(0x186)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x595023[_0x36f813(0x192)]+'\x22.');if(!_0x2badc2['ignoreMetadataScope']&&_0x9a1043===_0x36f813(0x16a)&&_0x595023?.['scope']&&_0x595023[_0x36f813(0x192)]!==_0x36f813(0x16a))throw CliErrors[_0x36f813(0x186)](_0x36f813(0x18d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x595023['scope']+'\x22.',_0x36f813(0x179)+_0x189ca6+_0x36f813(0x193));const _0x345349=scanSkillDirectory(_0x189ca6),_0x5a81a8=buildSkillPackage(_0x345349),_0x5bb0b7=readFileSync(_0x3f917e,'utf8'),_0x2603da=_0x3f5680[_0x36f813(0x182)],_0x12431e=_0x2badc2[_0x36f813(0x16e)]?undefined:_0x595023,_0x365857=readSkillDisplayName(_0x5bb0b7);return{'skillCode':_0x2603da,'metadata':_0x595023,'frontmatterDisplayName':_0x365857,'input':{'skillCode':_0x2603da,'skillName':_0x365857??_0x12431e?.[_0x36f813(0x197)],'description':_0x12431e?.['description'],'content':_0x5bb0b7,'files':_0x5a81a8[_0x36f813(0x18f)],'packageBase64':_0x5a81a8[_0x36f813(0x198)],'tags':_0x12431e?.[_0x36f813(0x19a)],'version':_0x12431e?.[_0x36f813(0x183)],'sourceSessionId':_0x12431e?.['sourceSessionId']}};}function a104_0x4ba7(_0xdc9322,_0xbb5abd){_0xdc9322=_0xdc9322-0x15b;const _0x3421f5=a104_0x3421();let _0x4ba786=_0x3421f5[_0xdc9322];return _0x4ba786;}export function refreshPushDirectoryMetadataFromRemote(_0x51f6b5,_0x330a4d,_0x2aacba,_0x3d16ee={}){const _0xb36063=a104_0x4ba7,_0x4d1f91=resolvePushDirectoryRoot(_0x51f6b5),_0x173d84=readPushMetadataIfPresent(resolve(_0x4d1f91,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2a8ddd=requireRemoteScope(_0x330a4d),_0x319631=readLocalSkillContent(_0x4d1f91),_0xca2160={..._0x330a4d,'appCode':_0x330a4d[_0xb36063(0x165)]??_0x2aacba,'skillName':_0x330a4d[_0xb36063(0x197)]??_0x173d84?.[_0xb36063(0x197)],'description':_0x330a4d[_0xb36063(0x184)]??_0x173d84?.[_0xb36063(0x184)],'tags':Array[_0xb36063(0x15b)](_0x330a4d['tags'])?_0x330a4d[_0xb36063(0x19a)]:_0x173d84?.[_0xb36063(0x19a)],'sourceSessionId':_0x330a4d[_0xb36063(0x199)]??_0x173d84?.['sourceSessionId'],'content':_0x330a4d['content']??_0x319631},_0x560979=buildMetadata(_0xca2160,_0x2a8ddd,_0x2aacba,contentHash(_0x319631),_0x3d16ee['refreshedAt']);writeJsonAtomic(resolve(_0x4d1f91,METADATA_FILE),_0x560979);}export function recordPushedRuntimeSkill(_0x1abffe,_0x5bce73,_0x3ccd5d,_0x5bf212={}){const _0x4f5038=a104_0x4ba7,_0x2905b7=resolvePushDirectoryRoot(_0x1abffe),_0x2804a4=scanSkillDirectory(_0x2905b7),_0x227db2=_0x2804a4[_0x4f5038(0x170)](_0x3e6b87=>_0x3e6b87[_0x4f5038(0x164)]===SKILL_FILE),_0x2c8dc2=_0x227db2?fileText(_0x227db2):'',_0x39f053=tryNormalizePackageManifest(_0x5bce73[_0x4f5038(0x185)]),_0x35fbdd={..._0x5bce73,'content':_0x5bce73[_0x4f5038(0x18e)]??_0x2c8dc2,'files':_0x39f053},_0x4af6c9=_0x39f053?normalizeLocalFiles(_0x2804a4)[_0x4f5038(0x17c)](_0x504231=>_0x39f053['files'][_0x4f5038(0x18c)](_0x1d6b55=>_0x1d6b55[_0x4f5038(0x164)]===_0x504231[_0x4f5038(0x164)])):undefined,_0x2685c4=buildMetadata(_0x35fbdd,_0x5bf212['scope']??_0x4f5038(0x16a),_0x3ccd5d,contentHash(_0x35fbdd[_0x4f5038(0x18e)]??''),_0x5bf212['pushedAt'],_0x4af6c9);writeJsonAtomic(resolve(_0x2905b7,METADATA_FILE),_0x2685c4);}export function deriveSkillCodeFromDirectory(_0x1729dd,_0x16cb90){const _0x1ce96e=a104_0x4ba7,_0x1f3523=basename(resolve(_0x1729dd)),_0x28c8d3=_0x16cb90+'--';return _0x1f3523[_0x1ce96e(0x19c)](_0x28c8d3)?_0x1f3523['slice'](_0x28c8d3[_0x1ce96e(0x168)]):_0x1f3523;}function resolvePushSkillCode(_0x253809,_0x189d06,_0x5d7450,_0x48efb3){const _0x19f0a2=a104_0x4ba7,_0x5f54cd=deriveSkillCodeFromSkillFile(_0x253809)||deriveSkillCodeFromDirectory(_0x253809,_0x189d06);if(_0x48efb3[_0x19f0a2(0x176)])return _0x5f54cd;return _0x5d7450?.[_0x19f0a2(0x182)]?.[_0x19f0a2(0x177)]()||_0x5f54cd;}function deriveSkillCodeFromSkillFile(_0x1efee0){const _0x3e3c67=a104_0x4ba7,_0xf24c2e=resolve(_0x1efee0,SKILL_FILE);if(!existsSync(_0xf24c2e)||!lstatSync(_0xf24c2e)[_0x3e3c67(0x194)]())return undefined;const _0x3b5c09=readFileSync(_0xf24c2e,_0x3e3c67(0x189)),_0x4a7e5d=_0x3b5c09[_0x3e3c67(0x166)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4a7e5d)return undefined;const _0x10fd38=parseFrontmatterObject(_0x4a7e5d[0x1]??''),_0xe95a57=scalarToString(_0x10fd38?.['name']);return _0xe95a57?slugifySkillName(_0xe95a57):undefined;}function readSkillDisplayName(_0x51bec0){const _0x11a5d1=a104_0x4ba7,_0x427849=_0x51bec0[_0x11a5d1(0x166)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x427849)return undefined;const _0x662ad7=parseFrontmatterObject(_0x427849[0x1]??'');return scalarToString(_0x662ad7?.['displayName']);}function slugifySkillName(_0x136ced){const _0x3eaa00=a104_0x4ba7,_0x1a57ed=_0x136ced[_0x3eaa00(0x177)]()[_0x3eaa00(0x172)]()[_0x3eaa00(0x162)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3eaa00(0x162)](/^-+/,'')[_0x3eaa00(0x162)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x1a57ed)throw CliErrors[_0x3eaa00(0x186)](_0x3eaa00(0x161)+SKILL_FILE+_0x3eaa00(0x17b));return _0x1a57ed;}function parseFrontmatterObject(_0x4424c2){const _0x4ea2a2=a104_0x4ba7;try{const _0x56c191=a104_0x3571a2(_0x4424c2);return _0x56c191&&typeof _0x56c191===_0x4ea2a2(0x187)&&!Array['isArray'](_0x56c191)?_0x56c191:undefined;}catch{return undefined;}}function scalarToString(_0x201836){const _0x3ba9df=a104_0x4ba7;if(typeof _0x201836===_0x3ba9df(0x181))return _0x201836[_0x3ba9df(0x177)]();if(typeof _0x201836==='number'||typeof _0x201836===_0x3ba9df(0x15e))return String(_0x201836);return undefined;}function resolvePushDirectoryRoot(_0x4c3f2f){const _0x31e9c6=a104_0x4ba7,_0x4000b1=resolve(_0x4c3f2f);if(!existsSync(_0x4000b1))throw CliErrors[_0x31e9c6(0x186)](_0x31e9c6(0x196)+_0x4c3f2f);const _0x442be4=lstatSync(_0x4000b1);if(_0x442be4[_0x31e9c6(0x180)]())return _0x4000b1;if(_0x442be4['isSymbolicLink']()){const _0x167c5d=realpathSync(_0x4000b1);if(lstatSync(_0x167c5d)['isDirectory']())return _0x167c5d;}throw CliErrors[_0x31e9c6(0x186)]('Skill\x20directory\x20not\x20found:\x20'+_0x4c3f2f);}function requireRemoteScope(_0x1895f7){const _0x49a5f5=a104_0x4ba7;if(_0x1895f7[_0x49a5f5(0x192)]===_0x49a5f5(0x16a)||_0x1895f7[_0x49a5f5(0x192)]===_0x49a5f5(0x15d)||_0x1895f7[_0x49a5f5(0x192)]===_0x49a5f5(0x160))return _0x1895f7['scope'];throw CliErrors[_0x49a5f5(0x186)](_0x49a5f5(0x17a)+(_0x1895f7[_0x49a5f5(0x182)]||_0x49a5f5(0x16d))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x1895f7[_0x49a5f5(0x192)]??_0x49a5f5(0x169))+'\x22.');}function readLocalSkillContent(_0xcd0009){const _0x2c5e11=a104_0x4ba7,_0xd1d1e2=resolve(_0xcd0009,SKILL_FILE);return existsSync(_0xd1d1e2)&&lstatSync(_0xd1d1e2)[_0x2c5e11(0x194)]()?readFileSync(_0xd1d1e2,_0x2c5e11(0x189)):'';}function readPushMetadataIfPresent(_0x4056ad,_0x5b6704={}){const _0x480ae4=a104_0x4ba7;try{return readMetadataIfPresent(_0x4056ad);}catch(_0x41cfae){if(_0x5b6704[_0x480ae4(0x17f)])return undefined;throw _0x41cfae;}}function a104_0x3421(){const _0x3ac1bf=['skillCode','version','description','files','validation','object','Skill\x20metadata\x20appCode\x20\x22','utf8','3832204qviXue','metadata','some','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','content','manifest','ignoreMetadataAppCodeMismatch','11czqZhZ','scope','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','isFile','2477559LbfGuz','Skill\x20directory\x20not\x20found:\x20','skillName','packageBase64','sourceSessionId','tags','ignoreMetadataScope','startsWith','isArray','517368atBvKo','company','boolean','101759PkoNjM','builtin','Invalid\x20','replace','340333gDiuLZ','path','appCode','match','256970KlYbZX','length','unknown','personal','5pKPrBK','2390607MhLKqL','(unknown)','ignoreMetadataForPayload','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','find',',\x20or\x20directory\x20name.','toLowerCase','Unable\x20to\x20resolve\x20skillCode\x20from\x20','dir','6QsgpWW','ignoreMetadataSkillCode','trim','60ExatUo','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Remote\x20Skill\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','filter','targetScope','Missing\x20','ignoreInvalidMetadata','isDirectory','string'];a104_0x3421=function(){return _0x3ac1bf;};return a104_0x3421();}
|
|
1
|
+
(function(_0x46d130,_0x1ed444){const _0xe51bfe=a104_0x259e,_0x1bce76=_0x46d130();while(!![]){try{const _0x28b7c6=-parseInt(_0xe51bfe(0x1cb))/0x1*(parseInt(_0xe51bfe(0x1bc))/0x2)+-parseInt(_0xe51bfe(0x1ca))/0x3+parseInt(_0xe51bfe(0x1a2))/0x4+parseInt(_0xe51bfe(0x19e))/0x5+-parseInt(_0xe51bfe(0x1c6))/0x6+-parseInt(_0xe51bfe(0x1b3))/0x7+parseInt(_0xe51bfe(0x1ce))/0x8;if(_0x28b7c6===_0x1ed444)break;else _0x1bce76['push'](_0x1bce76['shift']());}catch(_0x4ee6b8){_0x1bce76['push'](_0x1bce76['shift']());}}}(a104_0x7b1c,0xca738));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x5e2cd2}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a104_0x7b1c(){const _0x1341f2=['skillCode','ignoreMetadataScope','targetScope','validation','ignoreMetadataForPayload','Skill\x20metadata\x20appCode\x20\x22','builtin','pushedAt','6623070cBbQDH','string','number','Invalid\x20','4999384JoYQzh','allowAppCodeRetarget','ignoreMetadataSkillCode','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','name','Skill\x20directory\x20not\x20found:\x20','dir','path','description','personal','company','sourceSessionId','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','trim','tags','ignoreInvalidMetadata','\x20has\x20scope=\x22','707035iKpHnP','content','isArray','manifest','match','boolean','metadata','files','Remote\x20Skill\x20','4UjIhwH','startsWith','skillName','refreshedAt','(unknown)','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','length','scope','isSymbolicLink','8639268pBrfJL','unknown','isFile','replace','1724361QbzNUy','230473LjdYqd','isDirectory','\x20has\x20unsupported\x20scope\x20\x22','6651168LHOwyH','object','\x20name\x20for\x20SkillHub\x20slug\x20generation.','toLowerCase','appCode','Missing\x20'];a104_0x7b1c=function(){return _0x1341f2;};return a104_0x7b1c();}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(_0x1ebac2,_0x46d4c1,_0xa7ffe2={}){const _0x533286=a104_0x259e,_0x27cd3e=resolvePushDirectoryRoot(_0x1ebac2),_0x45c2d3=readPushMetadataIfPresent(resolve(_0x27cd3e,METADATA_FILE),{'ignoreInvalidMetadata':_0xa7ffe2[_0x533286(0x1b1)]});if(_0x45c2d3?.[_0x533286(0x1d2)]&&_0x45c2d3[_0x533286(0x1d2)]!==_0x46d4c1&&!_0xa7ffe2[_0x533286(0x1a3)]&&!_0xa7ffe2['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x533286(0x199)](_0x533286(0x19b)+_0x45c2d3['appCode']+_0x533286(0x1c1)+_0x46d4c1+'\x22.');const _0x104fbd=resolvePushSkillCode(_0x27cd3e,_0x46d4c1,_0x45c2d3,_0xa7ffe2);if(!_0x104fbd)throw CliErrors[_0x533286(0x199)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x27cd3e,'skillCode':_0x104fbd,'metadata':_0x45c2d3};}export function readPushDirectory(_0x28ab4d,_0x5bd4eb,_0x413923={}){const _0x98f357=a104_0x259e,_0x40767=resolvePushDirectoryIdentity(_0x28ab4d,_0x5bd4eb,_0x413923),_0x2c476e=_0x40767[_0x98f357(0x1a8)],_0x33ee27=resolve(_0x2c476e,SKILL_FILE);if(!existsSync(_0x33ee27)||!lstatSync(_0x33ee27)[_0x98f357(0x1c8)]())throw CliErrors[_0x98f357(0x199)](_0x98f357(0x1d3)+SKILL_FILE+':\x20'+_0x33ee27);const _0x2d895a=_0x40767[_0x98f357(0x1b9)],_0x1f29c8=_0x413923[_0x98f357(0x198)]??_0x98f357(0x1ab);if(!_0x413923[_0x98f357(0x197)]&&_0x2d895a?.[_0x98f357(0x1c4)]===_0x98f357(0x19c))throw CliErrors[_0x98f357(0x199)](_0x98f357(0x1c2)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x2d895a['scope']+'\x22.');if(!_0x413923[_0x98f357(0x197)]&&_0x1f29c8===_0x98f357(0x1ab)&&_0x2d895a?.['scope']&&_0x2d895a[_0x98f357(0x1c4)]!==_0x98f357(0x1ab))throw CliErrors[_0x98f357(0x199)](_0x98f357(0x1ae)+METADATA_FILE+_0x98f357(0x1b2)+_0x2d895a[_0x98f357(0x1c4)]+'\x22.',_0x98f357(0x1a5)+_0x2c476e+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x338a84=scanSkillDirectory(_0x2c476e),_0x21b4bf=buildSkillPackage(_0x338a84),_0x12cf52=readFileSync(_0x33ee27,'utf8'),_0x32cc01=_0x40767[_0x98f357(0x196)],_0x25cf86=_0x413923[_0x98f357(0x19a)]?undefined:_0x2d895a,_0x8f2af8=readSkillDisplayName(_0x12cf52);return{'skillCode':_0x32cc01,'metadata':_0x2d895a,'frontmatterDisplayName':_0x8f2af8,'input':{'skillCode':_0x32cc01,'skillName':_0x8f2af8??_0x25cf86?.[_0x98f357(0x1be)],'description':_0x25cf86?.[_0x98f357(0x1aa)],'content':_0x12cf52,'files':_0x21b4bf[_0x98f357(0x1b6)],'packageBase64':_0x21b4bf['packageBase64'],'tags':_0x25cf86?.[_0x98f357(0x1b0)],'version':_0x25cf86?.['version'],'sourceSessionId':_0x25cf86?.[_0x98f357(0x1ad)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3c0a52,_0x3e93e8,_0x51a178,_0x4cec77={}){const _0x47cf22=a104_0x259e,_0x53522b=resolvePushDirectoryRoot(_0x3c0a52),_0xebf941=readPushMetadataIfPresent(resolve(_0x53522b,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x94aea4=requireRemoteScope(_0x3e93e8),_0x217543=readLocalSkillContent(_0x53522b),_0x3265ca={..._0x3e93e8,'appCode':_0x3e93e8[_0x47cf22(0x1d2)]??_0x51a178,'skillName':_0x3e93e8[_0x47cf22(0x1be)]??_0xebf941?.['skillName'],'description':_0x3e93e8['description']??_0xebf941?.[_0x47cf22(0x1aa)],'tags':Array['isArray'](_0x3e93e8[_0x47cf22(0x1b0)])?_0x3e93e8['tags']:_0xebf941?.[_0x47cf22(0x1b0)],'sourceSessionId':_0x3e93e8['sourceSessionId']??_0xebf941?.[_0x47cf22(0x1ad)],'content':_0x3e93e8[_0x47cf22(0x1b4)]??_0x217543},_0x35b75a=buildMetadata(_0x3265ca,_0x94aea4,_0x51a178,contentHash(_0x217543),_0x4cec77[_0x47cf22(0x1bf)]);writeJsonAtomic(resolve(_0x53522b,METADATA_FILE),_0x35b75a);}export function recordPushedRuntimeSkill(_0x5b16ca,_0x19d5dc,_0x40f7dd,_0x21a72e={}){const _0x1a9af7=a104_0x259e,_0x55a5e7=resolvePushDirectoryRoot(_0x5b16ca),_0x123513=scanSkillDirectory(_0x55a5e7),_0x4d19db=_0x123513['find'](_0x28dcc1=>_0x28dcc1[_0x1a9af7(0x1a9)]===SKILL_FILE),_0x24a220=_0x4d19db?fileText(_0x4d19db):'',_0x2b32fc=tryNormalizePackageManifest(_0x19d5dc[_0x1a9af7(0x1ba)]),_0x1da4cb={..._0x19d5dc,'content':_0x19d5dc['content']??_0x24a220,'files':_0x2b32fc},_0x22a94f=_0x2b32fc?normalizeLocalFiles(_0x123513)['filter'](_0x2eb637=>_0x2b32fc[_0x1a9af7(0x1ba)]['some'](_0xbdb27c=>_0xbdb27c['path']===_0x2eb637[_0x1a9af7(0x1a9)])):undefined,_0x414f2d=buildMetadata(_0x1da4cb,_0x21a72e[_0x1a9af7(0x1c4)]??'personal',_0x40f7dd,contentHash(_0x1da4cb['content']??''),_0x21a72e[_0x1a9af7(0x19d)],_0x22a94f);writeJsonAtomic(resolve(_0x55a5e7,METADATA_FILE),_0x414f2d);}export function deriveSkillCodeFromDirectory(_0xe9ee32,_0x394519){const _0x52bc47=a104_0x259e,_0x2a48b9=basename(resolve(_0xe9ee32)),_0x23d450=_0x394519+'--';return _0x2a48b9[_0x52bc47(0x1bd)](_0x23d450)?_0x2a48b9['slice'](_0x23d450[_0x52bc47(0x1c3)]):_0x2a48b9;}function resolvePushSkillCode(_0x118ec2,_0x3c2a43,_0x4b4387,_0x76429f){const _0x1b34b7=a104_0x259e,_0x172d20=deriveSkillCodeFromSkillFile(_0x118ec2)||deriveSkillCodeFromDirectory(_0x118ec2,_0x3c2a43);if(_0x76429f[_0x1b34b7(0x1a4)])return _0x172d20;return _0x4b4387?.[_0x1b34b7(0x196)]?.[_0x1b34b7(0x1af)]()||_0x172d20;}function deriveSkillCodeFromSkillFile(_0xd1c173){const _0x368d15=a104_0x259e,_0xce81b9=resolve(_0xd1c173,SKILL_FILE);if(!existsSync(_0xce81b9)||!lstatSync(_0xce81b9)[_0x368d15(0x1c8)]())return undefined;const _0x360987=readFileSync(_0xce81b9,'utf8'),_0x363e34=_0x360987[_0x368d15(0x1b7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x363e34)return undefined;const _0x516928=parseFrontmatterObject(_0x363e34[0x1]??''),_0x542dd9=scalarToString(_0x516928?.[_0x368d15(0x1a6)]);return _0x542dd9?slugifySkillName(_0x542dd9):undefined;}function a104_0x259e(_0x4d0f58,_0x2e870a){_0x4d0f58=_0x4d0f58-0x196;const _0x7b1cc6=a104_0x7b1c();let _0x259e93=_0x7b1cc6[_0x4d0f58];return _0x259e93;}function readSkillDisplayName(_0x5a85c9){const _0x4902c0=a104_0x259e,_0x28d892=_0x5a85c9[_0x4902c0(0x1b7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x28d892)return undefined;const _0x4d4933=parseFrontmatterObject(_0x28d892[0x1]??'');return scalarToString(_0x4d4933?.['displayName']);}function slugifySkillName(_0x1ed2cc){const _0x5e6978=a104_0x259e,_0x2fb034=_0x1ed2cc[_0x5e6978(0x1af)]()[_0x5e6978(0x1d1)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x5e6978(0x1c9)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x2fb034)throw CliErrors[_0x5e6978(0x199)](_0x5e6978(0x1a1)+SKILL_FILE+_0x5e6978(0x1d0));return _0x2fb034;}function parseFrontmatterObject(_0x18dee0){const _0x4dc92a=a104_0x259e;try{const _0x2157bd=a104_0x5e2cd2(_0x18dee0);return _0x2157bd&&typeof _0x2157bd===_0x4dc92a(0x1cf)&&!Array[_0x4dc92a(0x1b5)](_0x2157bd)?_0x2157bd:undefined;}catch{return undefined;}}function scalarToString(_0x153db4){const _0x454335=a104_0x259e;if(typeof _0x153db4===_0x454335(0x19f))return _0x153db4[_0x454335(0x1af)]();if(typeof _0x153db4===_0x454335(0x1a0)||typeof _0x153db4===_0x454335(0x1b8))return String(_0x153db4);return undefined;}function resolvePushDirectoryRoot(_0x2ae017){const _0x27105a=a104_0x259e,_0x5e1d81=resolve(_0x2ae017);if(!existsSync(_0x5e1d81))throw CliErrors[_0x27105a(0x199)](_0x27105a(0x1a7)+_0x2ae017);const _0x46507d=lstatSync(_0x5e1d81);if(_0x46507d[_0x27105a(0x1cc)]())return _0x5e1d81;if(_0x46507d[_0x27105a(0x1c5)]()){const _0x54db60=realpathSync(_0x5e1d81);if(lstatSync(_0x54db60)[_0x27105a(0x1cc)]())return _0x54db60;}throw CliErrors[_0x27105a(0x199)](_0x27105a(0x1a7)+_0x2ae017);}function requireRemoteScope(_0x31a197){const _0x1dff93=a104_0x259e;if(_0x31a197[_0x1dff93(0x1c4)]===_0x1dff93(0x1ab)||_0x31a197[_0x1dff93(0x1c4)]===_0x1dff93(0x1ac)||_0x31a197[_0x1dff93(0x1c4)]===_0x1dff93(0x19c))return _0x31a197['scope'];throw CliErrors['validation'](_0x1dff93(0x1bb)+(_0x31a197[_0x1dff93(0x196)]||_0x1dff93(0x1c0))+_0x1dff93(0x1cd)+(_0x31a197['scope']??_0x1dff93(0x1c7))+'\x22.');}function readLocalSkillContent(_0xed5b7d){const _0x52eb73=resolve(_0xed5b7d,SKILL_FILE);return existsSync(_0x52eb73)&&lstatSync(_0x52eb73)['isFile']()?readFileSync(_0x52eb73,'utf8'):'';}function readPushMetadataIfPresent(_0x44ca8f,_0x4dbb1d={}){const _0x55d55d=a104_0x259e;try{return readMetadataIfPresent(_0x44ca8f);}catch(_0x425263){if(_0x4dbb1d[_0x55d55d(0x1b1)])return undefined;throw _0x425263;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5626f8,_0x4763cb){const _0x58146f=a105_0x1807,_0x2a0850=_0x5626f8();while(!![]){try{const _0x7c9f1c=-parseInt(_0x58146f(0x1f6))/0x1+-parseInt(_0x58146f(0x1f7))/0x2*(parseInt(_0x58146f(0x1f2))/0x3)+parseInt(_0x58146f(0x1ee))/0x4*(parseInt(_0x58146f(0x1e9))/0x5)+parseInt(_0x58146f(0x1ec))/0x6+parseInt(_0x58146f(0x1ef))/0x7+-parseInt(_0x58146f(0x1e7))/0x8*(-parseInt(_0x58146f(0x1f5))/0x9)+-parseInt(_0x58146f(0x1f3))/0xa;if(_0x7c9f1c===_0x4763cb)break;else _0x2a0850['push'](_0x2a0850['shift']());}catch(_0x2789c5){_0x2a0850['push'](_0x2a0850['shift']());}}}(a105_0x54b3,0x82aa7));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0xff17bc){const _0x35e03a=a105_0x1807,_0x4576f6=_0xff17bc&&_0xff17bc[_0x35e03a(0x1ed)]>0x0?_0xff17bc:[_0x35e03a(0x1f4),_0x35e03a(0x1e8),'builtin'],_0x3e8605=[];for(const _0x52d8e4 of _0x4576f6){if(!isRuntimeSkillScope(_0x52d8e4))throw CliErrors[_0x35e03a(0x1f1)](_0x35e03a(0x1eb)+_0x52d8e4);!_0x3e8605[_0x35e03a(0x1f0)](_0x52d8e4)&&_0x3e8605['push'](_0x52d8e4);}return _0x3e8605;}function a105_0x54b3(){const _0x258d0b=['5463208QNStsQ','company','882445cqLTeQ','builtin','Unsupported\x20runtime\x20Skill\x20scope:\x20','891996orCzIG','length','12bsgoCq','3967852pobjZp','includes','validation','3dBldDx','1852360BwhPKt','personal','9LigfwZ','1037904ejzddc','339046QDdvEw'];a105_0x54b3=function(){return _0x258d0b;};return a105_0x54b3();}function a105_0x1807(_0x303b29,_0x283869){_0x303b29=_0x303b29-0x1e7;const _0x54b3c6=a105_0x54b3();let _0x18073e=_0x54b3c6[_0x303b29];return _0x18073e;}export function isRuntimeSkillScope(_0x2d3ca2){const _0x316248=a105_0x1807;return _0x2d3ca2===_0x316248(0x1f4)||_0x2d3ca2===_0x316248(0x1e8)||_0x2d3ca2===_0x316248(0x1ea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a107_0x278992=a107_0x4d11;(function(_0x801218,_0xc78c1){const _0x5e519c=a107_0x4d11,_0x3503af=_0x801218();while(!![]){try{const _0x50ac1b=-parseInt(_0x5e519c(0xcb))/0x1+parseInt(_0x5e519c(0xbc))/0x2*(parseInt(_0x5e519c(0xc2))/0x3)+-parseInt(_0x5e519c(0xbb))/0x4+parseInt(_0x5e519c(0xb8))/0x5*(-parseInt(_0x5e519c(0xb6))/0x6)+parseInt(_0x5e519c(0xc1))/0x7+-parseInt(_0x5e519c(0xba))/0x8*(-parseInt(_0x5e519c(0xb7))/0x9)+parseInt(_0x5e519c(0xbf))/0xa;if(_0x50ac1b===_0xc78c1)break;else _0x3503af['push'](_0x3503af['shift']());}catch(_0x987246){_0x3503af['push'](_0x3503af['shift']());}}}(a107_0x5135,0x4e5ab));import{unzipSync,zipSync}from'fflate';function a107_0x5135(){const _0x34212d=['length','174228OgHFrY','78aDVsOj','3136059HTstXs','152060zxnyBx','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','8iVqRnG','630808ukkwoP','6nmeiKY','name','entries','1048060XDzuPj','object','2858177ZgBLzQ','186657FSxlGh','validation','1980-01-01T00:00:00.000Z','from','sort','map','code','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a107_0x5135=function(){return _0x34212d;};return a107_0x5135();}function a107_0x4d11(_0x1d96a7,_0x52a7a7){_0x1d96a7=_0x1d96a7-0xb6;const _0x513552=a107_0x5135();let _0x4d115b=_0x513552[_0x1d96a7];return _0x4d115b;}import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x278992(0xc4));export function createDeterministicZipPackage(_0x4172c8){const _0x5c6f66=a107_0x278992,_0xb5cc73={};for(const _0x6f4215 of normalizeLocalFiles(_0x4172c8)){_0xb5cc73[_0x6f4215['path']]=fileContent(_0x6f4215);}return Buffer[_0x5c6f66(0xc5)](zipSync(_0xb5cc73,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0xef0099){const _0x5da0c6=a107_0x278992;if(_0xef0099[_0x5da0c6(0xca)]<0x16)throw CliErrors[_0x5da0c6(0xc3)](_0x5da0c6(0xb9));let _0xf00a8d;try{_0xf00a8d=unzipSync(_0xef0099,{'filter'(_0x128ca7){const _0x413a37=_0x5da0c6,_0x875bf9=normalizeSkillRelativePath(_0x128ca7[_0x413a37(0xbd)]);if(_0x875bf9['endsWith']('/'))throw CliErrors[_0x413a37(0xc3)](_0x413a37(0xc9)+_0x875bf9);return!![];}});}catch(_0x1e4466){if(isRuntimeSkillValidationError(_0x1e4466))throw _0x1e4466;throw CliErrors[_0x5da0c6(0xc3)](_0x5da0c6(0xb9));}return Object[_0x5da0c6(0xbe)](_0xf00a8d)[_0x5da0c6(0xc7)](([_0x3ca614,_0x1a33bd])=>({'path':normalizeSkillRelativePath(_0x3ca614),'bytes':Buffer[_0x5da0c6(0xc5)](_0x1a33bd)}))[_0x5da0c6(0xc6)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x5e713f){const _0x1b1de1=a107_0x278992;return typeof _0x5e713f===_0x1b1de1(0xc0)&&_0x5e713f!==null&&'code'in _0x5e713f&&_0x5e713f[_0x1b1de1(0xc8)]==='validation_error';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x290f6b,_0x2af809){const _0x287c30=a108_0x13d5,_0x292f36=_0x290f6b();while(!![]){try{const _0x393572=parseInt(_0x287c30(0x157))/0x1+parseInt(_0x287c30(0x153))/0x2+parseInt(_0x287c30(0x140))/0x3+-parseInt(_0x287c30(0x13d))/0x4+-parseInt(_0x287c30(0x141))/0x5+parseInt(_0x287c30(0x14c))/0x6+-parseInt(_0x287c30(0x13f))/0x7*(-parseInt(_0x287c30(0x148))/0x8);if(_0x393572===_0x2af809)break;else _0x292f36['push'](_0x292f36['shift']());}catch(_0x4aff37){_0x292f36['push'](_0x292f36['shift']());}}}(a108_0x5821,0x99d82));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 a108_0x13d5(_0x53cf0b,_0x5b7b17){_0x53cf0b=_0x53cf0b-0x139;const _0x582101=a108_0x5821();let _0x13d58f=_0x582101[_0x53cf0b];return _0x13d58f;}export function buildSkillPackage(_0x4024d2){const _0x28032c=a108_0x13d5,_0x56acf0=normalizeLocalFiles(_0x4024d2);if(!_0x56acf0[_0x28032c(0x149)](_0x38cbd1=>_0x38cbd1[_0x28032c(0x158)]===SKILL_FILE))throw CliErrors[_0x28032c(0x13b)](_0x28032c(0x152)+SKILL_FILE+_0x28032c(0x162));const _0x5917e1=localFilesToManifestFiles(_0x56acf0),_0x2e6b32=createDeterministicZipPackage(_0x56acf0);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5917e1),'zipSha256':bufferSha256(_0x2e6b32),'zipSize':_0x2e6b32[_0x28032c(0x143)],'files':_0x5917e1},'packageBytes':_0x2e6b32,'packageBase64':_0x2e6b32[_0x28032c(0x139)]('base64')};}export function verifyRuntimeSkillPackage(_0x566677,_0x475495){const _0x270dca=a108_0x13d5,_0x2600b1=normalizePackageManifest(_0x566677,{'requireOssPath':![]});if(!_0x2600b1)throw CliErrors['validation'](_0x270dca(0x14f));return extractAndVerifyPackage(_0x2600b1,_0x475495);}export function verifyRuntimeSkillBundle(_0x1c2d11,_0x3b3299){const _0x54a25b=a108_0x13d5,_0x47fbe0=normalizePackageManifest(_0x1c2d11,{'requireOssPath':![]});if(!_0x47fbe0)throw CliErrors['validation'](_0x54a25b(0x14f));return extractAndVerifyPackageFiles(_0x47fbe0,_0x3b3299);}function a108_0x5821(){const _0x55d581=['Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','isSafeInteger','object','toString','files','validation','string','3559792IUqNHt','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','679SsnWXs','1631547tFHkNO','5672060baawPu','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','length','get','has','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','treeSha256','3256UtYJLh','some','Runtime\x20Skill\x20package\x20is\x20missing\x20','isArray','2132298CRYdFH','zipSize','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','ossPath','Duplicate\x20Skill\x20package\x20entry:\x20','Missing\x20','2159888oqTGOg','toLowerCase','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','635851xqGcAM','path','Runtime\x20Skill\x20package\x20size\x20mismatch.','sha256','schemaVersion','trim','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','zipSha256','bytes','map','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','\x20in\x20Skill\x20file\x20package.','size'];a108_0x5821=function(){return _0x55d581;};return a108_0x5821();}export function tryNormalizePackageManifest(_0x2b32bf){return normalizePackageManifest(_0x2b32bf,{'requireOssPath':![]});}export function requirePackageBytes(_0xaa53f4,_0xd15732){const _0x474306=a108_0x13d5;if(!_0xd15732||_0xd15732['length']===0x0)throw CliErrors['validation'](_0x474306(0x146)+_0xaa53f4);return _0xd15732;}export function extractDownloadedPackage(_0x5c7fac){const _0x184e5=a108_0x13d5,_0x4254d9=parseZipPackage(_0x5c7fac)[_0x184e5(0x160)](_0x2455db=>({'path':_0x2455db['path'],'bytes':_0x2455db[_0x184e5(0x15f)]}));if(!_0x4254d9[_0x184e5(0x149)](_0x2fde83=>_0x2fde83[_0x184e5(0x158)]===SKILL_FILE))throw CliErrors[_0x184e5(0x13b)](_0x184e5(0x14a)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4254d9);}export function localFilesToManifestFiles(_0xdb294d){const _0xdc808e=a108_0x13d5;return normalizeLocalFiles(_0xdb294d)[_0xdc808e(0x160)](_0x33179e=>({'path':_0x33179e[_0xdc808e(0x158)],'sha256':fileHash(_0x33179e),'size':fileContent(_0x33179e)[_0xdc808e(0x143)]}));}function normalizePackageManifest(_0x4ee40d,_0x3a098f){const _0x1338ee=a108_0x13d5;if(!_0x4ee40d||typeof _0x4ee40d!==_0x1338ee(0x166)||Array[_0x1338ee(0x14b)](_0x4ee40d))return undefined;const _0x36f381=_0x4ee40d,_0x2ace7c=typeof _0x36f381['ossPath']===_0x1338ee(0x13c)?_0x36f381[_0x1338ee(0x150)][_0x1338ee(0x15c)]():undefined;if(_0x3a098f['requireOssPath']&&!_0x2ace7c)return undefined;if(!Array[_0x1338ee(0x14b)](_0x36f381['files'])||_0x36f381['files']['length']===0x0)return undefined;if(!isSha256Hex(_0x36f381[_0x1338ee(0x147)]))throw CliErrors['validation'](_0x1338ee(0x164));if(!isSha256Hex(_0x36f381[_0x1338ee(0x15e)]))throw CliErrors['validation'](_0x1338ee(0x13e));if(!Number[_0x1338ee(0x165)](_0x36f381[_0x1338ee(0x14d)])||_0x36f381[_0x1338ee(0x14d)]<0x0)throw CliErrors[_0x1338ee(0x13b)](_0x1338ee(0x15d));const _0x156bc1=normalizeManifestFiles(_0x36f381[_0x1338ee(0x13a)]);if(!_0x156bc1[_0x1338ee(0x149)](_0x5121c3=>_0x5121c3['path']===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x1428ee=fileTreeHash(_0x156bc1);if(_0x1428ee!==_0x36f381[_0x1338ee(0x147)][_0x1338ee(0x154)]())throw CliErrors[_0x1338ee(0x13b)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x1338ee(0x165)](_0x36f381[_0x1338ee(0x15b)])?_0x36f381['schemaVersion']:0x2,'ossPath':_0x2ace7c,'treeSha256':_0x1428ee,'zipSha256':_0x36f381[_0x1338ee(0x15e)][_0x1338ee(0x154)](),'zipSize':_0x36f381[_0x1338ee(0x14d)],'files':_0x156bc1};}function extractAndVerifyPackage(_0x273abf,_0x4e91a7){const _0xcda647=a108_0x13d5,_0x2381fe=normalizePackageManifest(_0x273abf,{'requireOssPath':![]});if(!_0x2381fe)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x4e91a7['length']!==_0x2381fe[_0xcda647(0x14d)])throw CliErrors[_0xcda647(0x13b)](_0xcda647(0x159));const _0x203797=bufferSha256(_0x4e91a7);if(_0x203797!==_0x2381fe[_0xcda647(0x15e)])throw CliErrors[_0xcda647(0x13b)](_0xcda647(0x156));return extractAndVerifyPackageFiles(_0x2381fe,_0x4e91a7);}function extractAndVerifyPackageFiles(_0x36ff95,_0x340cc7){const _0x286b38=a108_0x13d5,_0x22e6e8=parseZipPackage(_0x340cc7);if(_0x22e6e8['length']!==_0x36ff95[_0x286b38(0x13a)][_0x286b38(0x143)])throw CliErrors['validation'](_0x286b38(0x161));const _0x2d6d45=new Map();for(const _0x494029 of _0x22e6e8){if(_0x2d6d45[_0x286b38(0x145)](_0x494029['path']))throw CliErrors['validation'](_0x286b38(0x151)+_0x494029[_0x286b38(0x158)]);_0x2d6d45['set'](_0x494029[_0x286b38(0x158)],_0x494029);}const _0x16ce7d=[];for(const _0x8c50ce of _0x36ff95[_0x286b38(0x13a)]){const _0x159652=_0x2d6d45[_0x286b38(0x144)](_0x8c50ce[_0x286b38(0x158)]);if(!_0x159652)throw CliErrors[_0x286b38(0x13b)](_0x286b38(0x142)+_0x8c50ce[_0x286b38(0x158)]);if(_0x159652[_0x286b38(0x15f)]['length']!==_0x8c50ce[_0x286b38(0x163)])throw CliErrors['validation'](_0x286b38(0x14e)+_0x8c50ce[_0x286b38(0x158)]);const _0x3ab7de=bufferSha256(_0x159652[_0x286b38(0x15f)]);if(_0x3ab7de!==_0x8c50ce[_0x286b38(0x15a)])throw CliErrors['validation'](_0x286b38(0x155)+_0x8c50ce['path']);_0x16ce7d['push']({'path':_0x8c50ce[_0x286b38(0x158)],'bytes':_0x159652[_0x286b38(0x15f)]});}return normalizeLocalFiles(_0x16ce7d);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e16d0,_0x59c840){var _0x4e09cd=a109_0x1930,_0x3a897c=_0x3e16d0();while(!![]){try{var _0x417897=parseInt(_0x4e09cd(0xc9))/0x1+parseInt(_0x4e09cd(0xc6))/0x2*(-parseInt(_0x4e09cd(0xc5))/0x3)+-parseInt(_0x4e09cd(0xca))/0x4*(-parseInt(_0x4e09cd(0xcb))/0x5)+-parseInt(_0x4e09cd(0xc8))/0x6*(-parseInt(_0x4e09cd(0xc7))/0x7)+parseInt(_0x4e09cd(0xc3))/0x8+parseInt(_0x4e09cd(0xcc))/0x9+-parseInt(_0x4e09cd(0xc4))/0xa*(parseInt(_0x4e09cd(0xc2))/0xb);if(_0x417897===_0x59c840)break;else _0x3a897c['push'](_0x3a897c['shift']());}catch(_0x339830){_0x3a897c['push'](_0x3a897c['shift']());}}}(a109_0x4296,0x1ef30));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';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';function a109_0x1930(_0x5a4030,_0x46edc0){_0x5a4030=_0x5a4030-0xc2;var _0x429673=a109_0x4296();var _0x1930d9=_0x429673[_0x5a4030];return _0x1930d9;}function a109_0x4296(){var _0xa8bd80=['525oyscxu','13710llYtdt','64686ZGmkaG','4THBhGo','824905eqBZUx','1510290EjbRnA','6734387bRhxKn','1382480abDoUA','10xkvAMv','8031UZPCvu','2bRfGCv'];a109_0x4296=function(){return _0xa8bd80;};return a109_0x4296();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a110_0x5b25(){const _0x26a1e1=['724785JlpbZI','9554625BmndPQ','203AeKdWj','4676448jzvaHF','54176hFgAuW','182255MjHghq','236190PPJMnY','162rXAJnq','325303RvjFvB','90oUhtpn','9QPZjoL'];a110_0x5b25=function(){return _0x26a1e1;};return a110_0x5b25();}(function(_0x13987d,_0x310eb2){const _0x4c9995=a110_0x49cc,_0x6b23bb=_0x13987d();while(!![]){try{const _0x56b406=parseInt(_0x4c9995(0xa2))/0x1*(-parseInt(_0x4c9995(0xa9))/0x2)+parseInt(_0x4c9995(0xa3))/0x3+parseInt(_0x4c9995(0xa6))/0x4+-parseInt(_0x4c9995(0xa8))/0x5*(-parseInt(_0x4c9995(0xaa))/0x6)+parseInt(_0x4c9995(0xa5))/0x7*(parseInt(_0x4c9995(0xa7))/0x8)+-parseInt(_0x4c9995(0xa4))/0x9+-parseInt(_0x4c9995(0xac))/0xa*(-parseInt(_0x4c9995(0xab))/0xb);if(_0x56b406===_0x310eb2)break;else _0x6b23bb['push'](_0x6b23bb['shift']());}catch(_0x4b4bd5){_0x6b23bb['push'](_0x6b23bb['shift']());}}}(a110_0x5b25,0xb2f15));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a110_0x49cc(_0x2f7db0,_0x4dff25){_0x2f7db0=_0x2f7db0-0xa2;const _0x5b2567=a110_0x5b25();let _0x49cc20=_0x5b2567[_0x2f7db0];return _0x49cc20;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a111_0x1c0f6d=a111_0x37b5;function a111_0x4df3(){const _0x17b797=['11493370LuSxoP','readFileSync','Failed\x20to\x20read\x20logs:','dirname','10hpoCHa','435NWQzsx','2234826vIoYxR','success','getWinstonInstance','map','createLogger','blue','130383yuVKym','200057HdTZXZ','winstonLogger','errors','join','logFileName','command','log','parse','warn','trim','1289892mpQIeS','printf','filter','error','existsSync','808xoxhEP','message','details','info','stringify','setRawCommand','utf8','Completed:\x20','duration','toISOString','format','clearLogs','now','yellow','green','Failed\x20to\x20clear\x20logs:','logFilePath','rawCommand','initWinstonLogger','red','timestamp','23752kvJRLU','13923400NMAqzj','currentRawCommand'];a111_0x4df3=function(){return _0x17b797;};return a111_0x4df3();}(function(_0x53aacf,_0x64f503){const _0x3dbd27=a111_0x37b5,_0x1e3e60=_0x53aacf();while(!![]){try{const _0x44b610=-parseInt(_0x3dbd27(0x1d3))/0x1+parseInt(_0x3dbd27(0x1f7))/0x2*(parseInt(_0x3dbd27(0x1ff))/0x3)+parseInt(_0x3dbd27(0x1dd))/0x4+parseInt(_0x3dbd27(0x1fe))/0x5*(parseInt(_0x3dbd27(0x200))/0x6)+-parseInt(_0x3dbd27(0x1fa))/0x7+-parseInt(_0x3dbd27(0x1e2))/0x8*(parseInt(_0x3dbd27(0x1d2))/0x9)+parseInt(_0x3dbd27(0x1f8))/0xa;if(_0x44b610===_0x64f503)break;else _0x1e3e60['push'](_0x1e3e60['shift']());}catch(_0x18e5f3){_0x1e3e60['push'](_0x1e3e60['shift']());}}}(a111_0x4df3,0xd604d));import a111_0x2d56a8 from'winston';import a111_0x55628c from'node:fs';import a111_0x2523cd from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];[a111_0x1c0f6d(0x1f2)]='';[a111_0x1c0f6d(0x1f9)]='';constructor(){}[a111_0x1c0f6d(0x1e7)](_0x4f4e2e){this['currentRawCommand']=_0x4f4e2e;}['setLogPath'](_0x1f5eb7){const _0x8e9891=a111_0x1c0f6d;this[_0x8e9891(0x1f2)]=a111_0x2523cd[_0x8e9891(0x1d6)](_0x1f5eb7,PRODUCT_CONFIG[_0x8e9891(0x1d7)]),this[_0x8e9891(0x1d4)]&&this[_0x8e9891(0x1d4)]['clear'](),this[_0x8e9891(0x1f4)]();}[a111_0x1c0f6d(0x1f4)](){const _0x37e275=a111_0x1c0f6d,_0xeac4a9=a111_0x2523cd[_0x37e275(0x1fd)](this[_0x37e275(0x1f2)]);!a111_0x55628c[_0x37e275(0x1e1)](_0xeac4a9)&&a111_0x55628c['mkdirSync'](_0xeac4a9,{'recursive':!![]});const _0x4500db=a111_0x2d56a8[_0x37e275(0x1ec)]['combine'](a111_0x2d56a8[_0x37e275(0x1ec)][_0x37e275(0x1f6)](),a111_0x2d56a8[_0x37e275(0x1ec)][_0x37e275(0x1d5)]({'stack':!![]}),a111_0x2d56a8[_0x37e275(0x1ec)][_0x37e275(0x1de)](_0x18457c=>{const _0x3eb234=_0x37e275,_0x54ba14={'timestamp':_0x18457c[_0x3eb234(0x1f6)]||new Date()[_0x3eb234(0x1eb)](),'level':_0x18457c['level']||'info','command':_0x18457c[_0x3eb234(0x1d8)]||'unknown','rawCommand':_0x18457c[_0x3eb234(0x1f3)]||this['currentRawCommand']||undefined,'message':_0x18457c[_0x3eb234(0x1e3)]||'','duration':_0x18457c[_0x3eb234(0x1ea)]||undefined,'details':_0x18457c[_0x3eb234(0x1e4)]||undefined};return JSON[_0x3eb234(0x1e6)](_0x54ba14);}));this[_0x37e275(0x1d4)]=a111_0x2d56a8[_0x37e275(0x1d0)]({'level':'info','format':_0x4500db,'transports':[new a111_0x2d56a8['transports']['File']({'filename':this[_0x37e275(0x1f2)],'level':_0x37e275(0x1e5)})],'silent':![]}),a111_0x2d56a8['addColors']({'success':_0x37e275(0x1f0),'error':_0x37e275(0x1f5),'warn':_0x37e275(0x1ef),'info':_0x37e275(0x1d1)});}[a111_0x1c0f6d(0x1e5)](_0x4a3622,_0x160784,_0x32fdcc){const _0x4150de=a111_0x1c0f6d;if(!this[_0x4150de(0x1f2)]||!this[_0x4150de(0x1d4)])return;this[_0x4150de(0x1d4)][_0x4150de(0x1e5)](_0x160784,{'command':_0x4a3622,'details':_0x32fdcc});}[a111_0x1c0f6d(0x1cd)](_0x2d8df7,_0x416db8,_0x22225a,_0x222f14){const _0x487fdf=a111_0x1c0f6d;if(!this['logFilePath']||!this[_0x487fdf(0x1d4)])return;this[_0x487fdf(0x1d4)][_0x487fdf(0x1d9)](_0x487fdf(0x1e5),_0x416db8,{'level':_0x487fdf(0x1cd),'command':_0x2d8df7,'duration':_0x22225a,'details':_0x222f14});}[a111_0x1c0f6d(0x1e0)](_0x260af1,_0x26889b,_0x18f87d){const _0x223b8f=a111_0x1c0f6d;if(!this['logFilePath']||!this[_0x223b8f(0x1d4)])return;this['winstonLogger'][_0x223b8f(0x1e0)](_0x26889b,{'command':_0x260af1,'details':_0x18f87d});}[a111_0x1c0f6d(0x1db)](_0x39d072,_0x3038f9,_0x4ebc16){const _0x3b389a=a111_0x1c0f6d;if(!this[_0x3b389a(0x1f2)]||!this['winstonLogger'])return;this[_0x3b389a(0x1d4)][_0x3b389a(0x1db)](_0x3038f9,{'command':_0x39d072,'details':_0x4ebc16});}async['logTask'](_0xdc679e,_0x3a2e03,_0x332e16){const _0x261598=a111_0x1c0f6d,_0x20683b=Date[_0x261598(0x1ee)]();this[_0x261598(0x1e5)](_0xdc679e,'Starting:\x20'+_0x3a2e03);try{const _0x3f37ec=await _0x332e16(),_0x4ddadf=Date['now']()-_0x20683b;return this[_0x261598(0x1cd)](_0xdc679e,_0x261598(0x1e9)+_0x3a2e03,_0x4ddadf),_0x3f37ec;}catch(_0x8e3601){const _0x3f7a88=Date[_0x261598(0x1ee)]()-_0x20683b;this['error'](_0xdc679e,'Failed:\x20'+_0x3a2e03,{'error':_0x8e3601 instanceof Error?_0x8e3601[_0x261598(0x1e3)]:String(_0x8e3601),'duration':_0x3f7a88});throw _0x8e3601;}}['readLogs'](){const _0x2affe5=a111_0x1c0f6d;try{if(!a111_0x55628c[_0x2affe5(0x1e1)](this[_0x2affe5(0x1f2)]))return[];const _0x563d09=a111_0x55628c[_0x2affe5(0x1fb)](this[_0x2affe5(0x1f2)],_0x2affe5(0x1e8));return _0x563d09['split'](/\r?\n/)[_0x2affe5(0x1df)](_0x1c4296=>_0x1c4296[_0x2affe5(0x1dc)]())[_0x2affe5(0x1cf)](_0xc92985=>JSON[_0x2affe5(0x1da)](_0xc92985));}catch(_0x269c51){return console[_0x2affe5(0x1db)](_0x2affe5(0x1fc),_0x269c51),[];}}[a111_0x1c0f6d(0x1ed)](){const _0x29aeb8=a111_0x1c0f6d;try{a111_0x55628c[_0x29aeb8(0x1e1)](this['logFilePath'])&&a111_0x55628c['writeFileSync'](this[_0x29aeb8(0x1f2)],'',_0x29aeb8(0x1e8));}catch(_0x35e945){console[_0x29aeb8(0x1db)](_0x29aeb8(0x1f1),_0x35e945);}}[a111_0x1c0f6d(0x1ce)](){const _0xe3e558=a111_0x1c0f6d;return this[_0xe3e558(0x1d4)];}}function a111_0x37b5(_0x5e5e34,_0x5b0070){_0x5e5e34=_0x5e5e34-0x1cd;const _0x4df375=a111_0x4df3();let _0x37b558=_0x4df375[_0x5e5e34];return _0x37b558;}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a112_0x51f9(_0x234be9,_0xc89c97){_0x234be9=_0x234be9-0x17b;const _0x438475=a112_0x4384();let _0x51f978=_0x438475[_0x234be9];return _0x51f978;}(function(_0x541207,_0xba8b10){const _0x3c488f=a112_0x51f9,_0x23b3a0=_0x541207();while(!![]){try{const _0x378868=-parseInt(_0x3c488f(0x18b))/0x1+parseInt(_0x3c488f(0x189))/0x2*(-parseInt(_0x3c488f(0x190))/0x3)+parseInt(_0x3c488f(0x198))/0x4*(parseInt(_0x3c488f(0x18c))/0x5)+-parseInt(_0x3c488f(0x193))/0x6+-parseInt(_0x3c488f(0x183))/0x7+parseInt(_0x3c488f(0x194))/0x8+parseInt(_0x3c488f(0x18a))/0x9;if(_0x378868===_0xba8b10)break;else _0x23b3a0['push'](_0x23b3a0['shift']());}catch(_0x351853){_0x23b3a0['push'](_0x23b3a0['shift']());}}}(a112_0x4384,0x5f4b7));import{CliErrors}from'../errors.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x1f9f37){const _0x3ab099=a112_0x51f9;if(!_0x1f9f37)return undefined;try{return JSON[_0x3ab099(0x196)](_0x1f9f37);}catch{throw CliErrors[_0x3ab099(0x18d)](_0x3ab099(0x17e)+_0x1f9f37);}}export function parseJsonParamsValue(_0x145dcc){const _0xfb531c=a112_0x51f9;if(!_0x145dcc)return undefined;try{return JSON[_0xfb531c(0x196)](_0x145dcc);}catch{throw CliErrors['validation'](_0xfb531c(0x17e)+_0x145dcc);}}export function parseBatchCreateItemsFromParams(_0x397803){const _0xd8d3a8=a112_0x51f9;if(Array[_0xd8d3a8(0x17d)](_0x397803))return _0x397803;if(_0x397803!==null&&_0x397803!==undefined&&typeof _0x397803==='object'&&Array[_0xd8d3a8(0x17d)](_0x397803[_0xd8d3a8(0x188)]))return _0x397803[_0xd8d3a8(0x188)];throw CliErrors[_0xd8d3a8(0x18d)](_0xd8d3a8(0x197),_0xd8d3a8(0x186));}function parseDataUpdateId(_0x4b492e,_0x4e27e6){const _0xfcc7a7=a112_0x51f9;if(typeof _0x4b492e===_0xfcc7a7(0x18f)&&Number['isSafeInteger'](_0x4b492e)&&_0x4b492e>0x0)return _0x4b492e;if(typeof _0x4b492e===_0xfcc7a7(0x180)){if(/^[1-9]\d*$/[_0xfcc7a7(0x17c)](_0x4b492e))return _0x4b492e;}throw CliErrors['validation'](_0xfcc7a7(0x185)+_0x4e27e6+_0xfcc7a7(0x182));}function a112_0x4384(){const _0x56fb75=['id[','\x20records\x20per\x20call;\x20received\x20','1254174DaogGz','5931248XSNnGw','join','parse','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','10392gpMzru','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','map','test','isArray','Invalid\x20JSON\x20for\x20--params:\x20','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','string','length','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','3338671hEMYWj','data\x20update\x20can\x20update\x20at\x20most\x20','data\x20update\x20--params.','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','items','28676rzkHRQ','2711277VsrSzd','235194BrYzST','545kumBYq','validation','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','number','3VcayUm'];a112_0x4384=function(){return _0x56fb75;};return a112_0x4384();}export function parseUpdateIdsFromParams(_0x1c3c12){const _0x27ff57=a112_0x51f9;if(_0x1c3c12===null||_0x1c3c12===undefined||typeof _0x1c3c12!=='object'||Array[_0x27ff57(0x17d)](_0x1c3c12))throw CliErrors[_0x27ff57(0x18d)](_0x27ff57(0x199),_0x27ff57(0x18e));const _0x51af0b=_0x1c3c12['id'];if(_0x51af0b===undefined||_0x51af0b===null)throw CliErrors[_0x27ff57(0x18d)](_0x27ff57(0x17f),_0x27ff57(0x18e));const _0x5c0baa=Array[_0x27ff57(0x17d)](_0x51af0b)?_0x51af0b:[_0x51af0b];if(_0x5c0baa[_0x27ff57(0x181)]===0x0)throw CliErrors['validation'](_0x27ff57(0x187));if(_0x5c0baa['length']>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x27ff57(0x18d)](_0x27ff57(0x184)+MAX_DATA_UPDATE_IDS+_0x27ff57(0x192)+_0x5c0baa['length']+'.');return _0x5c0baa[_0x27ff57(0x17b)]((_0x1ab5a1,_0x235372)=>parseDataUpdateId(_0x1ab5a1,Array[_0x27ff57(0x17d)](_0x51af0b)?_0x27ff57(0x191)+_0x235372+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x2ec4cd,_0x2e4a5c){const _0x31a87=a112_0x51f9;if(Array[_0x31a87(0x17d)](_0x2ec4cd['id'])&&_0x2e4a5c['length']>0x1)return{..._0x2ec4cd,'id':_0x2e4a5c[_0x31a87(0x195)](',')};return _0x2ec4cd;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a113_0x2e37(){const _0x560aa7=['platform','71210KZydrA','6729iuoGYk','14SYpzeR','2203580lRaeIL','191232RjFbQv','60846460okZZmj','win32','3337772zDqQXx','3183546olhApl','2348ITqVLb','11AdMyTP','576hgHUlD'];a113_0x2e37=function(){return _0x560aa7;};return a113_0x2e37();}function a113_0x400b(_0x3d2fca,_0x50275e){_0x3d2fca=_0x3d2fca-0x165;const _0x2e37f2=a113_0x2e37();let _0x400b85=_0x2e37f2[_0x3d2fca];return _0x400b85;}const a113_0x6a9285=a113_0x400b;(function(_0x53ebeb,_0x23f6b7){const _0x355a12=a113_0x400b,_0x4a89d5=_0x53ebeb();while(!![]){try{const _0x5b6013=-parseInt(_0x355a12(0x166))/0x1+-parseInt(_0x355a12(0x16d))/0x2+-parseInt(_0x355a12(0x167))/0x3*(parseInt(_0x355a12(0x16f))/0x4)+parseInt(_0x355a12(0x169))/0x5+parseInt(_0x355a12(0x16e))/0x6*(-parseInt(_0x355a12(0x168))/0x7)+-parseInt(_0x355a12(0x16a))/0x8*(parseInt(_0x355a12(0x171))/0x9)+-parseInt(_0x355a12(0x16b))/0xa*(-parseInt(_0x355a12(0x170))/0xb);if(_0x5b6013===_0x23f6b7)break;else _0x4a89d5['push'](_0x4a89d5['shift']());}catch(_0x5715ca){_0x4a89d5['push'](_0x4a89d5['shift']());}}}(a113_0x2e37,0xd6413));export const isWindows=process[a113_0x6a9285(0x165)]===a113_0x6a9285(0x16c);export function resolveNpmBin(_0x3c04f3){return isWindows?_0x3c04f3+'.cmd':_0x3c04f3;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x406b57,_0x2f2101){const _0x4a648e=a114_0x16db,_0x9d22b1=_0x406b57();while(!![]){try{const _0x4516c7=parseInt(_0x4a648e(0x7c))/0x1*(-parseInt(_0x4a648e(0x81))/0x2)+-parseInt(_0x4a648e(0x76))/0x3*(-parseInt(_0x4a648e(0x93))/0x4)+parseInt(_0x4a648e(0x78))/0x5*(-parseInt(_0x4a648e(0x97))/0x6)+-parseInt(_0x4a648e(0x85))/0x7+-parseInt(_0x4a648e(0x82))/0x8+-parseInt(_0x4a648e(0x77))/0x9+-parseInt(_0x4a648e(0x96))/0xa*(-parseInt(_0x4a648e(0x83))/0xb);if(_0x4516c7===_0x2f2101)break;else _0x9d22b1['push'](_0x9d22b1['shift']());}catch(_0x49066b){_0x9d22b1['push'](_0x9d22b1['shift']());}}}(a114_0x1fed,0x1a92c));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 a114_0x16db(_0x597b73,_0x45afdb){_0x597b73=_0x597b73-0x76;const _0x1fedb1=a114_0x1fed();let _0x16db42=_0x1fedb1[_0x597b73];return _0x16db42;}import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';function a114_0x1fed(){const _0xad1ec9=['number','6GMyMOG','584685iYAxEI','21905XMsWUn','map','stringify','string','24943EIpmXW','/v/','fromEntries','\x20available,\x20current\x20','utf8','8jjsenS','326952gjLCLI','78243uGfslA','latest','771015EZwnmp','/-/package/','/dist-tags',',\x20run:\x20','minor','prerelease','Invalid\x20semver','lastNotifiedAt','update-check.json','https://www.npmjs.com/package/','lovrabet-cli','major','entries','yes','394252OOfzJe','true','timeout','560AqRRBz','234lbccdj','toLowerCase','now','trim','object','patch'];a114_0x1fed=function(){return _0xad1ec9;};return a114_0x1fed();}const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x4d1959){const _0x4ab2e6=a114_0x16db,_0x395c57=_0x4d1959[_0x4ab2e6(0x9a)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x395c57)return null;return{'major':Number(_0x395c57[0x1]),'minor':Number(_0x395c57[0x2]),'patch':Number(_0x395c57[0x3]),'prerelease':_0x395c57[0x4]};}function compareSemver(_0x233527,_0x340501){const _0x3b3580=a114_0x16db,_0x573d62=parseSemver(_0x233527),_0x1b6975=parseSemver(_0x340501);if(!_0x573d62||!_0x1b6975)throw new Error(_0x3b3580(0x8b));for(const _0x537f5c of[_0x3b3580(0x90),_0x3b3580(0x89),_0x3b3580(0x9c)]){if(_0x573d62[_0x537f5c]<_0x1b6975[_0x537f5c])return-0x1;if(_0x573d62[_0x537f5c]>_0x1b6975[_0x537f5c])return 0x1;}if(!_0x573d62[_0x3b3580(0x8a)]&&!_0x1b6975[_0x3b3580(0x8a)])return 0x0;if(!_0x573d62[_0x3b3580(0x8a)])return 0x1;if(!_0x1b6975[_0x3b3580(0x8a)])return-0x1;if(_0x573d62[_0x3b3580(0x8a)]===_0x1b6975[_0x3b3580(0x8a)])return 0x0;return _0x573d62[_0x3b3580(0x8a)]<_0x1b6975['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x5611a4=a114_0x16db,_0x347099=process.env.LOVRABET_NO_UPDATE_NOTICE?.['trim']()[_0x5611a4(0x98)]();return _0x347099==='1'||_0x347099===_0x5611a4(0x94)||_0x347099===_0x5611a4(0x92);}function cacheRoot(){return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),'.cache');}export function getUpdateNoticeCachePath(){const _0x9d3e23=a114_0x16db;return join(cacheRoot(),_0x9d3e23(0x8f),_0x9d3e23(0x8d));}async function readUpdateNoticeCache(){const _0x5dec63=a114_0x16db;try{const _0x36f778=await readFile(getUpdateNoticeCachePath(),_0x5dec63(0x80)),_0x5c5dba=JSON['parse'](_0x36f778);if(!_0x5c5dba||typeof _0x5c5dba!==_0x5dec63(0x9b))return{};return _0x5c5dba;}catch{return{};}}async function writeUpdateNoticeCache(_0xf64239){const _0x3ae8d0=a114_0x16db;try{const _0x29d62a=getUpdateNoticeCachePath();await mkdir(dirname(_0x29d62a),{'recursive':!![]}),await writeFile(_0x29d62a,JSON[_0x3ae8d0(0x7a)](_0xf64239,null,0x2)+'\x0a',_0x3ae8d0(0x80));}catch{}}function isFreshCheck(_0x2e2c6c,_0x18871c){const _0x4612eb=a114_0x16db;return typeof _0x2e2c6c['checkedAt']===_0x4612eb(0x9d)&&_0x18871c-_0x2e2c6c['checkedAt']<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x2b441c,_0x3b6c4a,_0x5b0609){const _0x493d78=a114_0x16db;return _0x2b441c['lastNotifiedVersion']===_0x3b6c4a&&typeof _0x2b441c['lastNotifiedAt']===_0x493d78(0x9d)&&_0x5b0609-_0x2b441c[_0x493d78(0x8c)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x388d27=0x5dc){const _0x8d1b89=a114_0x16db;try{const _0x2687a1=NPM_REGISTRY_BASE_URL+_0x8d1b89(0x86)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x8d1b89(0x87),_0x390b84=await fetch(_0x2687a1,{'signal':AbortSignal[_0x8d1b89(0x95)](_0x388d27)});if(!_0x390b84['ok'])return null;const _0x470bbe=await _0x390b84['json']();if(!_0x470bbe||typeof _0x470bbe!==_0x8d1b89(0x9b))return null;return Object[_0x8d1b89(0x7e)](Object[_0x8d1b89(0x91)](_0x470bbe)['filter'](([,_0x272288])=>typeof _0x272288===_0x8d1b89(0x7b)&&_0x272288[_0x8d1b89(0x9a)]())[_0x8d1b89(0x79)](([_0x5a7c1f,_0x56608e])=>[_0x5a7c1f,String(_0x56608e)[_0x8d1b89(0x9a)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x2e3938){const _0x20c62=a114_0x16db;return _0x20c62(0x8e)+LOVRABET_NPM_PACKAGE_NAME+_0x20c62(0x7d)+_0x2e3938;}export async function resolveLatestUpdateNotice(){const _0x4e4bff=a114_0x16db;if(isUpdateNoticeDisabled())return null;try{const _0x455033=Date[_0x4e4bff(0x99)](),_0x40ed65=getCliVersion(),_0x17161b=await readUpdateNoticeCache();let _0x47fd10=isFreshCheck(_0x17161b,_0x455033)?_0x17161b['latest']?.[_0x4e4bff(0x9a)]():undefined;if(!_0x47fd10&&!isFreshCheck(_0x17161b,_0x455033)){const _0x83757e=await fetchNpmDistTags();_0x47fd10=_0x83757e?.[_0x4e4bff(0x84)]?.[_0x4e4bff(0x9a)](),await writeUpdateNoticeCache({..._0x17161b,'checkedAt':_0x455033,'latest':_0x47fd10,'failed':!_0x47fd10});}if(!_0x47fd10||compareSemver(_0x40ed65,_0x47fd10)>=0x0)return null;if(isRecentlyNotified(_0x17161b,_0x47fd10,_0x455033))return null;const _0x53bcc1=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x17161b,'checkedAt':isFreshCheck(_0x17161b,_0x455033)?_0x17161b['checkedAt']:_0x455033,'latest':_0x47fd10,'failed':![],'lastNotifiedVersion':_0x47fd10,'lastNotifiedAt':_0x455033}),{'command':_0x53bcc1,'current':_0x40ed65,'latest':_0x47fd10,'url':buildNpmVersionUrl(_0x47fd10),'message':CLI_BIN_NAME+'\x20'+_0x47fd10+_0x4e4bff(0x7f)+_0x40ed65+_0x4e4bff(0x88)+_0x53bcc1};}catch{return null;}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5460f7,_0x573c95){const _0x3d96f1=a115_0x5a28,_0x1feebd=_0x5460f7();while(!![]){try{const _0x31d700=-parseInt(_0x3d96f1(0x92))/0x1+-parseInt(_0x3d96f1(0x8e))/0x2*(parseInt(_0x3d96f1(0x90))/0x3)+-parseInt(_0x3d96f1(0x97))/0x4*(parseInt(_0x3d96f1(0x94))/0x5)+-parseInt(_0x3d96f1(0x93))/0x6+-parseInt(_0x3d96f1(0x91))/0x7+parseInt(_0x3d96f1(0x95))/0x8*(parseInt(_0x3d96f1(0x98))/0x9)+-parseInt(_0x3d96f1(0x8f))/0xa*(-parseInt(_0x3d96f1(0x8c))/0xb);if(_0x31d700===_0x573c95)break;else _0x1feebd['push'](_0x1feebd['shift']());}catch(_0x514228){_0x1feebd['push'](_0x1feebd['shift']());}}}(a115_0x53a2,0x747c7));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a115_0x53a2(){const _0x2002c8=['407pWHOwz','slice','553678emcElU','745100VPurKJ','6CAVCte','1269653WCrqNX','859399uREmqE','1061508eEYYCF','560hwLaMH','10376YxQLlx','unknown','29968ZDPQbW','2295WPslVY'];a115_0x53a2=function(){return _0x2002c8;};return a115_0x53a2();}function a115_0x5a28(_0x5f4fd1,_0xc79384){_0x5f4fd1=_0x5f4fd1-0x8c;const _0x53a211=a115_0x53a2();let _0x5a28ca=_0x53a211[_0x5f4fd1];return _0x5a28ca;}export function getCliGitCommit(){const _0x2db687=a115_0x5a28,_0x14abcb=String(GIT_COMMIT);return _0x14abcb&&_0x14abcb!==_0x2db687(0x96)?_0x14abcb:'';}export function getCliVersionDisplay(){const _0x4d507d=a115_0x5a28,_0x29623e=getCliGitCommit(),_0x3c741e=BUILD_TIME[_0x4d507d(0x8d)](0x0,0xa);if(!_0x29623e||!_0x3c741e)return VERSION;return VERSION+'\x20('+_0x29623e+',\x20'+_0x3c741e+')';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a116_0x811e(_0xedae54,_0x114021){_0xedae54=_0xedae54-0x140;var _0x542c12=a116_0x542c();var _0x811e7c=_0x542c12[_0xedae54];return _0x811e7c;}(function(_0x4cc32e,_0x4f69b5){var _0x57d493=a116_0x811e,_0x4012f6=_0x4cc32e();while(!![]){try{var _0x507191=-parseInt(_0x57d493(0x147))/0x1+parseInt(_0x57d493(0x148))/0x2*(-parseInt(_0x57d493(0x140))/0x3)+-parseInt(_0x57d493(0x145))/0x4*(-parseInt(_0x57d493(0x14a))/0x5)+-parseInt(_0x57d493(0x141))/0x6+parseInt(_0x57d493(0x146))/0x7+parseInt(_0x57d493(0x142))/0x8+parseInt(_0x57d493(0x149))/0x9*(parseInt(_0x57d493(0x14b))/0xa);if(_0x507191===_0x4f69b5)break;else _0x4012f6['push'](_0x4012f6['shift']());}catch(_0x84f338){_0x4012f6['push'](_0x4012f6['shift']());}}}(a116_0x542c,0x68fe7));function a116_0x542c(){var _0xa96d=['10isPVNe','1150aXtjhw','9651IhSpPN','2688378fUVPUR','5250088IuUpos','stderr','write','127276gSsitm','1550073EcvrIc','80581pldVGI','534AeeIid','68580fHLxPP'];a116_0x542c=function(){return _0xa96d;};return a116_0x542c();}export function writeCliSideChannelLine(_0x31f4ed){var _0x468991=a116_0x811e;process[_0x468991(0x143)][_0x468991(0x144)](_0x31f4ed+'\x0a');}
|
package/package.json
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/lovrabet-cli",
|
|
3
|
-
"version": "2.1.9-beta.
|
|
3
|
+
"version": "2.1.9-beta.4",
|
|
4
|
+
"description": "Runtime CLI for Lovrabet apps, datasets, SQL, BFF, skills, and AI agent workflows.",
|
|
4
5
|
"license": "Apache-2.0",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"lovrabet",
|
|
8
|
+
"cli",
|
|
9
|
+
"runtime",
|
|
10
|
+
"ai-agent",
|
|
11
|
+
"agent-tools",
|
|
12
|
+
"dataset",
|
|
13
|
+
"bff",
|
|
14
|
+
"sql",
|
|
15
|
+
"business-automation"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://open.lovrabet.com/",
|
|
5
18
|
"repository": {
|
|
6
19
|
"type": "git",
|
|
7
20
|
"url": "git@codeup.aliyun.com:yuntoo/open/lovrabet-runtime-cli.git"
|
|
@@ -45,7 +58,10 @@
|
|
|
45
58
|
"test:coverage": "vitest run --coverage"
|
|
46
59
|
},
|
|
47
60
|
"files": [
|
|
48
|
-
"lib"
|
|
61
|
+
"lib",
|
|
62
|
+
"README.md",
|
|
63
|
+
"LICENSE",
|
|
64
|
+
"NOTICE"
|
|
49
65
|
],
|
|
50
66
|
"dependencies": {
|
|
51
67
|
"@lovrabet/cli-framework": "1.0.5",
|