@lovrabet/lovrabet-cli 2.2.1 → 2.2.2-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/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/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/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/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/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 +2 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a114_0x2e10(_0x1832af,_0x2b49fa){_0x1832af=_0x1832af-0xcb;const _0x5bb42c=a114_0x5bb4();let _0x2e10c1=_0x5bb42c[_0x1832af];return _0x2e10c1;}(function(_0x1fe05c,_0x56af50){const _0x22fd6e=a114_0x2e10,_0x54141c=_0x1fe05c();while(!![]){try{const _0x3899b4=parseInt(_0x22fd6e(0xe3))/0x1+parseInt(_0x22fd6e(0xe8))/0x2+-parseInt(_0x22fd6e(0xcb))/0x3+parseInt(_0x22fd6e(0xdc))/0x4*(parseInt(_0x22fd6e(0xda))/0x5)+parseInt(_0x22fd6e(0xe0))/0x6+-parseInt(_0x22fd6e(0xd5))/0x7+parseInt(_0x22fd6e(0xd8))/0x8;if(_0x3899b4===_0x56af50)break;else _0x54141c['push'](_0x54141c['shift']());}catch(_0x350416){_0x54141c['push'](_0x54141c['shift']());}}}(a114_0x5bb4,0x95899));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';function a114_0x5bb4(){const _0x53bf20=['filter','sort','scope','project','map','code','push','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','8148714HdvlzL','skillRoots','cache','3929744XxzSYY','localeCompare','765365TBlZQf','scopes','16UkosIj','cacheDir','includes','isSymbolicLink','1215258hvrmsH','from','name','1217034OvHuHS','linkedPath','builtin','trim','tags','585066qJHUkL','skillCode','linkedPaths','appCode','dir','local','isArray','source','isDirectory','3117039jKtiCH','has'];a114_0x5bb4=function(){return _0x53bf20;};return a114_0x5bb4();}import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x41860c,_0x25ae52,_0x1f2905={}){const _0x1cba38=a114_0x2e10,_0x25db32=safePathSegment(_0x41860c[_0x1cba38(0xeb)],_0x1cba38(0xeb));if(_0x25ae52[_0x1cba38(0xeb)]!==_0x25db32)throw CliErrors['validation'](_0x1cba38(0xd4)+_0x25ae52['appCode']+'\x20!=\x20'+_0x25db32);const _0x572801=normalizeRuntimeSkillScopes(_0x41860c[_0x1cba38(0xdb)]),_0x452b8a=new Set(_0x572801),_0x1bc00d=_0x41860c[_0x1cba38(0xd2)]?.['trim'](),_0x51e6ba=new Map(),_0x58a99b=resolve(getRuntimeSkillCacheRoot(_0x41860c['env'],_0x41860c['accessKey'],_0x1f2905),_0x25db32);for(const _0x33b561 of _0x572801){for(const _0x103074 of localSkillEntryDirs(resolve(_0x58a99b,_0x33b561))){collectLocalRuntimeSkill(_0x51e6ba,_0x103074,{'appCode':_0x25db32,'scopes':_0x452b8a,'code':_0x1bc00d,'source':'cache'});}}for(const _0xba60c1 of _0x25ae52[_0x1cba38(0xd6)]){for(const _0x245ca1 of localSkillLinkCandidates(_0xba60c1,_0x25ae52,_0x452b8a)){collectLocalRuntimeSkill(_0x51e6ba,_0x245ca1,{'appCode':_0x25db32,'scopes':_0x452b8a,'code':_0x1bc00d,'source':'link','linkedPath':_0x245ca1});}}return Array[_0x1cba38(0xe1)](_0x51e6ba['values']())[_0x1cba38(0xce)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x1c0553){const _0x18e60a=a114_0x2e10;if(!existsSync(_0x1c0553))return[];return readdirSync(_0x1c0553,{'withFileTypes':!![]})['filter'](_0x4f138c=>_0x4f138c[_0x18e60a(0xf0)]()||_0x4f138c[_0x18e60a(0xdf)]())[_0x18e60a(0xd1)](_0x28bdb3=>resolve(_0x1c0553,_0x28bdb3['name']));}function localSkillLinkCandidates(_0x31f8ce,_0x81f222,_0xaa111a){const _0x99ccb7=a114_0x2e10;if(!existsSync(_0x31f8ce))return[];const _0x1c85f3=_0x81f222['appCode']+'--';return readdirSync(_0x31f8ce,{'withFileTypes':!![]})['filter'](_0x3848eb=>_0x3848eb[_0x99ccb7(0xf0)]()||_0x3848eb[_0x99ccb7(0xdf)]())[_0x99ccb7(0xcd)](_0x4f08b3=>_0x81f222[_0x99ccb7(0xcf)]===_0x99ccb7(0xd0)||_0x4f08b3[_0x99ccb7(0xe2)]['startsWith'](_0x1c85f3)||_0xaa111a[_0x99ccb7(0xcc)](_0x99ccb7(0xe5)))[_0x99ccb7(0xd1)](_0x40454c=>resolve(_0x31f8ce,_0x40454c[_0x99ccb7(0xe2)]));}function collectLocalRuntimeSkill(_0x59b30c,_0x838ed3,_0x39bd35){const _0x74a795=a114_0x2e10,_0x52ded3=resolve(_0x838ed3,METADATA_FILE),_0x24afc1=readMetadataIfPresent(_0x52ded3);if(!_0x24afc1)return;if(_0x24afc1[_0x74a795(0xeb)]!==_0x39bd35['appCode'])return;if(!isRuntimeSkillScope(_0x24afc1['scope'])||!_0x39bd35[_0x74a795(0xdb)][_0x74a795(0xcc)](_0x24afc1[_0x74a795(0xcf)]))return;const _0x1a7011=_0x24afc1[_0x74a795(0xe9)]?.[_0x74a795(0xe6)]();if(!_0x1a7011)return;if(_0x39bd35[_0x74a795(0xd2)]&&_0x1a7011!==_0x39bd35[_0x74a795(0xd2)])return;const _0x2f4a32=_0x24afc1[_0x74a795(0xcf)]+':'+_0x1a7011,_0x29bd3a=_0x39bd35[_0x74a795(0xe4)]?[_0x39bd35[_0x74a795(0xe4)]]:[],_0x20b0d4=_0x59b30c['get'](_0x2f4a32);if(_0x20b0d4){_0x39bd35[_0x74a795(0xef)]===_0x74a795(0xd7)&&(_0x20b0d4[_0x74a795(0xec)]=_0x838ed3,_0x20b0d4[_0x74a795(0xdd)]=_0x838ed3,_0x20b0d4['skillMdPath']=resolve(_0x838ed3,SKILL_FILE),_0x20b0d4['metadataPath']=_0x52ded3);for(const _0x41a79a of _0x29bd3a){!_0x20b0d4[_0x74a795(0xea)][_0x74a795(0xde)](_0x41a79a)&&_0x20b0d4[_0x74a795(0xea)][_0x74a795(0xd3)](_0x41a79a);}_0x20b0d4[_0x74a795(0xea)][_0x74a795(0xce)]();return;}_0x59b30c['set'](_0x2f4a32,{..._0x24afc1,'tags':Array[_0x74a795(0xee)](_0x24afc1[_0x74a795(0xe7)])?_0x24afc1['tags']:[],'scope':_0x24afc1['scope'],'source':_0x74a795(0xed),'dir':_0x838ed3,'cacheDir':_0x39bd35[_0x74a795(0xef)]==='cache'?_0x838ed3:undefined,'skillMdPath':resolve(_0x838ed3,SKILL_FILE),'metadataPath':_0x52ded3,'linkedPaths':_0x29bd3a});}function compareLocalRuntimeSkills(_0x34e4ff,_0x559ef7){const _0x604f49=a114_0x2e10,_0x1f244a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1f244a[_0x34e4ff[_0x604f49(0xcf)]]-_0x1f244a[_0x559ef7['scope']]||_0x34e4ff[_0x604f49(0xe9)][_0x604f49(0xd9)](_0x559ef7[_0x604f49(0xe9)])||_0x34e4ff['dir'][_0x604f49(0xd9)](_0x559ef7[_0x604f49(0xec)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3645d8,_0x6b2d41){const _0x441243=a115_0x3034,_0x46468b=_0x3645d8();while(!![]){try{const _0x21dc91=-parseInt(_0x441243(0x17c))/0x1*(parseInt(_0x441243(0x153))/0x2)+parseInt(_0x441243(0x158))/0x3+-parseInt(_0x441243(0x17e))/0x4*(-parseInt(_0x441243(0x16b))/0x5)+parseInt(_0x441243(0x160))/0x6+-parseInt(_0x441243(0x175))/0x7+-parseInt(_0x441243(0x156))/0x8*(parseInt(_0x441243(0x166))/0x9)+-parseInt(_0x441243(0x15e))/0xa;if(_0x21dc91===_0x6b2d41)break;else _0x46468b['push'](_0x46468b['shift']());}catch(_0x3d4cca){_0x46468b['push'](_0x46468b['shift']());}}}(a115_0x2596,0x47b69));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x2ebba4){const _0x1b1554=a115_0x3034;return _0x2ebba4[_0x1b1554(0x157)]??Buffer[_0x1b1554(0x16d)](_0x2ebba4['content']??'',_0x1b1554(0x14c));}export function fileText(_0x22ecff){const _0x5bd399=a115_0x3034;return fileContent(_0x22ecff)[_0x5bd399(0x162)](_0x5bd399(0x14c));}export function normalizeLocalFiles(_0x556fe4){const _0x2aaf99=a115_0x3034;if(!Array[_0x2aaf99(0x15c)](_0x556fe4)||_0x556fe4[_0x2aaf99(0x15d)]===0x0)return[];const _0x53d06b=new Map();for(const _0x2be096 of _0x556fe4){if(!_0x2be096||typeof _0x2be096!==_0x2aaf99(0x151)||typeof _0x2be096[_0x2aaf99(0x17d)]!==_0x2aaf99(0x16f))throw CliErrors[_0x2aaf99(0x165)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2ad12b=normalizeSkillRelativePath(_0x2be096['path']);if(_0x53d06b[_0x2aaf99(0x167)](_0x2ad12b))throw CliErrors[_0x2aaf99(0x165)](_0x2aaf99(0x15f)+_0x2ad12b);if(_0x2be096[_0x2aaf99(0x157)]!==undefined&&!Buffer[_0x2aaf99(0x14f)](_0x2be096[_0x2aaf99(0x157)]))throw CliErrors['validation'](_0x2aaf99(0x14e)+_0x2ad12b);if(_0x2be096['bytes']===undefined&&typeof _0x2be096[_0x2aaf99(0x173)]!==_0x2aaf99(0x16f))throw CliErrors['validation'](_0x2aaf99(0x176)+_0x2ad12b);const _0x54e091=fileContent(_0x2be096);_0x53d06b['set'](_0x2ad12b,{'path':_0x2ad12b,'bytes':_0x54e091});}return Array['from'](_0x53d06b[_0x2aaf99(0x159)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3e0895){const _0x507e78=a115_0x3034;if(!Array[_0x507e78(0x15c)](_0x3e0895)||_0x3e0895[_0x507e78(0x15d)]===0x0)return[];const _0x135d42=new Map();for(const _0x35bac0 of _0x3e0895){if(!_0x35bac0||typeof _0x35bac0!==_0x507e78(0x151)||typeof _0x35bac0[_0x507e78(0x17d)]!==_0x507e78(0x16f))throw CliErrors[_0x507e78(0x165)](_0x507e78(0x161));const _0x599c0d=normalizeSkillRelativePath(_0x35bac0[_0x507e78(0x17d)]);if(_0x135d42['has'](_0x599c0d))throw CliErrors[_0x507e78(0x165)](_0x507e78(0x15f)+_0x599c0d);if(!isSha256Hex(_0x35bac0[_0x507e78(0x17b)]))throw CliErrors['validation'](_0x507e78(0x171)+_0x599c0d);if(!Number[_0x507e78(0x16c)](_0x35bac0[_0x507e78(0x177)])||_0x35bac0[_0x507e78(0x177)]<0x0)throw CliErrors['validation'](_0x507e78(0x172)+_0x599c0d);_0x135d42[_0x507e78(0x174)](_0x599c0d,{'path':_0x599c0d,'sha256':_0x35bac0[_0x507e78(0x17b)][_0x507e78(0x16e)](),'size':_0x35bac0['size']});}return Array[_0x507e78(0x16d)](_0x135d42[_0x507e78(0x159)]())[_0x507e78(0x15b)](compareSkillFiles);}export function scanSkillDirectory(_0x3bb83b,_0x3715a8={}){const _0x48c3d6=a115_0x3034,_0x48b0ce=realpathSync(_0x3bb83b),_0x5c8bec=canonicalExcludedFilePaths(_0x3715a8[_0x48c3d6(0x170)]),_0x555065=[];function _0x2df4a1(_0x3b19dd){const _0x4edf33=_0x48c3d6,_0x488383=readdirSync(_0x3b19dd,{'withFileTypes':!![]})[_0x4edf33(0x15b)]((_0x534fc2,_0x27566d)=>_0x534fc2[_0x4edf33(0x169)][_0x4edf33(0x17f)](_0x27566d['name']));for(const _0x2a9633 of _0x488383){if(_0x2a9633[_0x4edf33(0x178)]()&&IGNORED_DIR_NAMES[_0x4edf33(0x167)](_0x2a9633[_0x4edf33(0x169)]))continue;if(IGNORED_FILE_NAMES['has'](_0x2a9633['name']))continue;const _0x27c6e2=resolve(_0x3b19dd,_0x2a9633['name']);if(isExcludedFilePath(_0x27c6e2,_0x5c8bec))continue;if(_0x2a9633[_0x4edf33(0x14d)]())throw CliErrors['validation'](_0x4edf33(0x17a)+_0x27c6e2);const _0x590fcb=toPosixPath(relative(_0x48b0ce,_0x27c6e2));if(_0x2a9633[_0x4edf33(0x178)]()){_0x2df4a1(_0x27c6e2);continue;}if(!_0x2a9633[_0x4edf33(0x168)]())continue;validateSkillRelativePath(_0x590fcb);const _0x49f498=readFileSync(_0x27c6e2);_0x555065[_0x4edf33(0x154)]({'path':_0x590fcb,'bytes':_0x49f498});}}return _0x2df4a1(_0x48b0ce),normalizeLocalFiles(_0x555065);}function canonicalExcludedFilePaths(_0x2fb2ff){const _0x4f9361=a115_0x3034,_0x5945a9=new Set();for(const _0x2993c4 of _0x2fb2ff??[]){const _0x1600a5=resolve(_0x2993c4);_0x5945a9[_0x4f9361(0x180)](_0x1600a5);try{_0x5945a9[_0x4f9361(0x180)](realpathSync(_0x1600a5));}catch{}}return _0x5945a9;}function isExcludedFilePath(_0x6644f6,_0x5b74f5){if(_0x5b74f5['has'](_0x6644f6))return!![];if(_0x5b74f5['size']===0x0)return![];try{return _0x5b74f5['has'](realpathSync(_0x6644f6));}catch{return![];}}export function compareSkillFiles(_0x3b2b37,_0x4303a1){const _0x4115ea=a115_0x3034;if(_0x3b2b37[_0x4115ea(0x17d)]===SKILL_FILE)return _0x4303a1[_0x4115ea(0x17d)]===SKILL_FILE?0x0:-0x1;if(_0x4303a1[_0x4115ea(0x17d)]===SKILL_FILE)return 0x1;return Buffer[_0x4115ea(0x163)](Buffer['from'](_0x3b2b37['path'],_0x4115ea(0x14c)),Buffer[_0x4115ea(0x16d)](_0x4303a1[_0x4115ea(0x17d)],_0x4115ea(0x14c)));}export function normalizeSkillRelativePath(_0x1be748){const _0x23f16d=a115_0x3034,_0x5dfa2f=toPosixPath(_0x1be748[_0x23f16d(0x155)]());return validateSkillRelativePath(_0x5dfa2f),_0x5dfa2f;}export function validateSkillRelativePath(_0x466ea7){const _0x445801=a115_0x3034;if(!_0x466ea7||_0x466ea7[_0x445801(0x16a)]('/')||_0x466ea7[_0x445801(0x152)]('//'))throw CliErrors['validation'](_0x445801(0x179)+_0x466ea7);for(const _0x5da871 of _0x466ea7[_0x445801(0x150)]('/')){if(!_0x5da871||_0x5da871==='.'||_0x5da871==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x466ea7);}}export function toPosixPath(_0x273ff5){const _0x46ae4d=a115_0x3034;return _0x273ff5[_0x46ae4d(0x15a)](/\\/g,'/');}function a115_0x2596(){const _0x260346=['2jOJztw','push','trim','117256ZzAbpA','bytes','937611snZEIm','values','replace','sort','isArray','length','41200wAtTFD','Duplicate\x20Skill\x20file\x20path:\x20','2769396pdqtoG','Skill\x20file\x20path\x20must\x20be\x20text.','toString','compare','test','validation','333euaJaN','has','isFile','name','startsWith','1416400MNpoAw','isSafeInteger','from','toLowerCase','string','excludedFilePaths','Skill\x20file\x20sha256\x20is\x20invalid:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','content','set','1362228OnXqOd','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','size','isDirectory','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','sha256','22613rRyppw','path','4kuUAWs','localeCompare','add','utf8','isSymbolicLink','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isBuffer','split','object','includes'];a115_0x2596=function(){return _0x260346;};return a115_0x2596();}function a115_0x3034(_0x3bb5ac,_0xa5fedc){_0x3bb5ac=_0x3bb5ac-0x14c;const _0x259648=a115_0x2596();let _0x30349b=_0x259648[_0x3bb5ac];return _0x30349b;}export function isSha256Hex(_0x516231){const _0x1b529e=a115_0x3034;return typeof _0x516231===_0x1b529e(0x16f)&&/^[a-fA-F0-9]{64}$/[_0x1b529e(0x164)](_0x516231);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xefa25,_0x5c1b5f){const _0xc0eb5c=a116_0x2d22,_0x272c72=_0xefa25();while(!![]){try{const _0x43e03d=-parseInt(_0xc0eb5c(0x187))/0x1*(parseInt(_0xc0eb5c(0x199))/0x2)+-parseInt(_0xc0eb5c(0x180))/0x3+parseInt(_0xc0eb5c(0x190))/0x4+parseInt(_0xc0eb5c(0x19c))/0x5+parseInt(_0xc0eb5c(0x174))/0x6+-parseInt(_0xc0eb5c(0x19e))/0x7*(parseInt(_0xc0eb5c(0x186))/0x8)+-parseInt(_0xc0eb5c(0x196))/0x9*(-parseInt(_0xc0eb5c(0x18d))/0xa);if(_0x43e03d===_0x5c1b5f)break;else _0x272c72['push'](_0x272c72['shift']());}catch(_0x11ff68){_0x272c72['push'](_0x272c72['shift']());}}}(a116_0x5597,0x27518));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x833c72,_0x50e852,_0x35fe79){const _0x30060a=a116_0x2d22,_0x2e0144=requireSkillCode(_0x833c72),_0x113d91=requirePackageBytes(_0x2e0144,_0x35fe79[_0x30060a(0x197)]),_0x537f7a=extractDownloadedPackage(_0x113d91),_0x574520=_0x537f7a[_0x30060a(0x17e)](_0x5b0112=>_0x5b0112[_0x30060a(0x184)]===SKILL_FILE);if(!_0x574520)throw CliErrors[_0x30060a(0x19a)](_0x30060a(0x19b)+SKILL_FILE+':\x20'+_0x2e0144);const _0x2754fb=withMaterializedSkillFrontmatter(_0x537f7a,_0x833c72,_0x2e0144),_0x316961=_0x2754fb[_0x30060a(0x17e)](_0x2ba8b7=>_0x2ba8b7[_0x30060a(0x184)]===SKILL_FILE),_0x1243f5=fileText(_0x316961),_0x2c4851=getRuntimeSkillDir(_0x35fe79[_0x30060a(0x189)],_0x35fe79['accessKey'],_0x35fe79[_0x30060a(0x193)],_0x50e852,_0x2e0144,_0x35fe79[_0x30060a(0x176)]),_0x3e609b=resolve(_0x2c4851,SKILL_FILE),_0x335b11=resolve(_0x2c4851,METADATA_FILE),_0x3e16a4=contentHash(_0x1243f5),_0x4dac9d=readMetadataIfPresent(_0x335b11)?.[_0x30060a(0x18b)];ensurePulledFilesCanBeOverwritten(_0x2c4851,_0x335b11,_0x2754fb,_0x35fe79[_0x30060a(0x1a3)]===!![]),mkdirSync(_0x2c4851,{'recursive':!![],'mode':0x1c0});const _0x598f89=existsSync(_0x3e609b)?readFileSync(_0x3e609b,'utf8'):undefined;return materializeFiles(_0x2c4851,_0x2754fb),removeStaleManagedFiles(_0x2c4851,_0x4dac9d,_0x2754fb),writeJsonAtomic(_0x335b11,buildMetadata(_0x833c72,_0x50e852,_0x35fe79[_0x30060a(0x193)],_0x3e16a4,_0x35fe79[_0x30060a(0x18e)],_0x2754fb,_0x113d91)),{'skill':_0x833c72,'scope':_0x50e852,'dir':_0x2c4851,'skillMdPath':_0x3e609b,'metadataPath':_0x335b11,'contentHash':_0x3e16a4,'changed':_0x598f89!==_0x1243f5};}function a116_0x2d22(_0x4f900c,_0x3883dd){_0x4f900c=_0x4f900c-0x172;const _0x559790=a116_0x5597();let _0x2d2229=_0x559790[_0x4f900c];return _0x2d2229;}function withMaterializedSkillFrontmatter(_0x1dcf7c,_0x53fa14,_0x1ceca4){const _0x2adf02=a116_0x2d22,_0x268608=skillDisplayName(_0x53fa14,_0x1ceca4),_0x33e6b4=_0x53fa14['description']?.[_0x2adf02(0x178)]()||_0x268608||_0x1ceca4;return normalizeLocalFiles(_0x1dcf7c)['map'](_0x584bf0=>{const _0x373c66=_0x2adf02,_0x2df6e7=fileText(_0x584bf0);if(_0x584bf0[_0x373c66(0x184)]!==SKILL_FILE)return _0x584bf0;if(hasYamlFrontmatter(_0x2df6e7))return{'path':_0x584bf0[_0x373c66(0x184)],'content':withSyncedDisplayName(_0x2df6e7,_0x268608)};return{'path':_0x584bf0[_0x373c66(0x184)],'content':prependSkillFrontmatter(_0x2df6e7,{'name':_0x1ceca4,'displayName':_0x268608,'description':_0x33e6b4})};});}function hasYamlFrontmatter(_0x2017a6){const _0x44c1b8=a116_0x2d22;return/^\uFEFF?---\s*\r?\n/[_0x44c1b8(0x17c)](_0x2017a6);}function prependSkillFrontmatter(_0x52d687,_0x1df0ec){const _0x21796f=a116_0x2d22,_0x597f8c=_0x52d687[_0x21796f(0x1a1)](/^\uFEFF/,'');return[_0x21796f(0x183),'name:\x20'+yamlString(_0x1df0ec[_0x21796f(0x17b)]),_0x1df0ec[_0x21796f(0x1a2)]?'displayName:\x20'+yamlString(_0x1df0ec[_0x21796f(0x1a2)]):undefined,_0x21796f(0x17f)+yamlString(_0x1df0ec[_0x21796f(0x188)]),'---','',_0x597f8c][_0x21796f(0x177)](_0x2ccd0a=>_0x2ccd0a!==undefined)['join']('\x0a');}function yamlString(_0x23de3e){const _0x9c4a98=a116_0x2d22;return JSON[_0x9c4a98(0x18a)](_0x23de3e['replace'](/\r/g,'')['trim']());}function skillDisplayName(_0x2b53f5,_0x5df4bb){const _0x457f71=a116_0x2d22,_0x34f5dd=_0x2b53f5[_0x457f71(0x172)]?.[_0x457f71(0x178)]();return _0x34f5dd||_0x5df4bb;}function withSyncedDisplayName(_0x496e6c,_0x40b29c){const _0x489d67=a116_0x2d22,_0xb2a1f4=_0x496e6c['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xb2a1f4)return _0x496e6c;const _0x21ece8=_0xb2a1f4[0x1]??'',_0x4d155a=_0xb2a1f4[0x2]??'',_0x2bb0a0=parseDocument(_0x4d155a);if(_0x2bb0a0[_0x489d67(0x198)][_0x489d67(0x191)]>0x0||!isMap(_0x2bb0a0[_0x489d67(0x19d)]))return _0x496e6c;if(_0x40b29c)_0x2bb0a0['set'](_0x489d67(0x1a2),_0x40b29c);else{if(_0x2bb0a0[_0x489d67(0x17a)](_0x489d67(0x1a2)))_0x2bb0a0[_0x489d67(0x17d)]('displayName');else return _0x496e6c;}forceBlockCollections(_0x2bb0a0['contents']);const _0xbde8d2=_0x2bb0a0['toString']({'lineWidth':0x0})[_0x489d67(0x195)](),_0x2cf199=_0x496e6c['slice'](_0xb2a1f4[0x0][_0x489d67(0x191)])[_0x489d67(0x1a1)](/^\r?\n/,'');return _0x21ece8+_0x489d67(0x18f)+_0xbde8d2+_0x489d67(0x1a5)+_0x2cf199;}function forceBlockCollections(_0x269ca0){if(!isNode(_0x269ca0))return;visit(_0x269ca0,(_0x5ecc49,_0x39dbc4)=>{isCollection(_0x39dbc4)&&(_0x39dbc4['flow']=![]);});}function a116_0x5597(){const _0x1df205=['113465CWdMvO','contents','696346AnheKK','keys','Managed\x20file\x20was\x20removed\x20locally:\x20','replace','displayName','force','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','\x0a---\x0a\x0a','skillName','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','1869774pgybfk','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','paths','filter','trim','entries','has','name','test','delete','find','description:\x20','43440Svfvwg','contentHash','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---','path','isFile','8LLiiTd','1191NfPNvo','description','env','stringify','fileHashes','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','10sFGGAo','pulledAt','---\x0a','812912vHLpYv','length','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','appCode','map','trimEnd','391887TMLtXP','packageBytes','errors','514jkPqcL','validation','Runtime\x20Skill\x20package\x20is\x20missing\x20'];a116_0x5597=function(){return _0x1df205;};return a116_0x5597();}function ensurePulledFilesCanBeOverwritten(_0xe55267,_0x163e3c,_0xd07140,_0x5022cd){const _0x51fc2a=a116_0x2d22;if(_0x5022cd||!existsSync(_0x163e3c))return;const _0x4433ae=readMetadataIfPresent(_0x163e3c);if(!_0x4433ae)return;const _0x5a7c46=_0x4433ae[_0x51fc2a(0x18b)]&&Object[_0x51fc2a(0x19f)](_0x4433ae[_0x51fc2a(0x18b)])[_0x51fc2a(0x191)]>0x0?_0x4433ae[_0x51fc2a(0x18b)]:undefined;if(_0x5a7c46)for(const [_0x53c5d2,_0x4fcf16]of Object[_0x51fc2a(0x179)](_0x5a7c46)){const _0x1c1b7c=resolveManagedFilePath(_0xe55267,_0x53c5d2);if(!existsSync(_0x1c1b7c))throw CliErrors['validation'](_0x51fc2a(0x182)+_0xe55267,_0x51fc2a(0x1a0)+_0x53c5d2);const _0x2fb1b7=lstatSync(_0x1c1b7c);if(!_0x2fb1b7['isFile']())throw CliErrors[_0x51fc2a(0x19a)](_0x51fc2a(0x182)+_0xe55267,_0x51fc2a(0x1a4)+_0x53c5d2);const _0x1b6d74=bufferSha256(readFileSync(_0x1c1b7c));if(_0x1b6d74!==_0x4fcf16)throw CliErrors['validation'](_0x51fc2a(0x182)+_0xe55267+'.\x20Changed\x20file:\x20'+_0x53c5d2,_0x51fc2a(0x175)+_0x53c5d2);}else{const _0x446fbd=resolve(_0xe55267,SKILL_FILE);if(existsSync(_0x446fbd)&&_0x4433ae[_0x51fc2a(0x181)]){const _0x1f2a0a=contentHash(readFileSync(_0x446fbd,'utf8'));if(_0x1f2a0a!==_0x4433ae[_0x51fc2a(0x181)])throw CliErrors[_0x51fc2a(0x19a)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x446fbd,_0x51fc2a(0x173));}}for(const _0x4b9e08 of normalizeLocalFiles(_0xd07140)){if(_0x5a7c46?.[_0x4b9e08[_0x51fc2a(0x184)]])continue;if(!_0x5a7c46&&_0x4b9e08['path']===SKILL_FILE)continue;const _0x4603fd=resolveManagedFilePath(_0xe55267,_0x4b9e08[_0x51fc2a(0x184)]);if(!existsSync(_0x4603fd))continue;const _0x102d7f=lstatSync(_0x4603fd);if(!_0x102d7f[_0x51fc2a(0x185)]())throw CliErrors[_0x51fc2a(0x19a)](_0x51fc2a(0x182)+_0xe55267,_0x51fc2a(0x18c)+_0x4b9e08[_0x51fc2a(0x184)]);const _0x500039=bufferSha256(readFileSync(_0x4603fd));if(_0x500039!==fileHash(_0x4b9e08))throw CliErrors[_0x51fc2a(0x19a)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xe55267,_0x51fc2a(0x192)+_0x4b9e08['path']);}}function materializeFiles(_0x1f35d5,_0x18b5f6){const _0x4a32af=a116_0x2d22;for(const _0x5293f4 of normalizeLocalFiles(_0x18b5f6)){const _0x52170a=resolveManagedFilePath(_0x1f35d5,_0x5293f4[_0x4a32af(0x184)]);mkdirSync(dirname(_0x52170a),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x52170a,fileContent(_0x5293f4),0x180);}}function removeStaleManagedFiles(_0x2eb4fe,_0x84083,_0x5c1c11){const _0x4e0859=a116_0x2d22;if(!_0x84083)return;const _0x5ae568=new Set(normalizeLocalFiles(_0x5c1c11)[_0x4e0859(0x194)](_0x300339=>_0x300339[_0x4e0859(0x184)]));for(const _0x2059ab of Object[_0x4e0859(0x19f)](_0x84083)){if(_0x5ae568[_0x4e0859(0x17a)](_0x2059ab))continue;const _0x21bc83=resolveManagedFilePath(_0x2eb4fe,_0x2059ab);existsSync(_0x21bc83)&&lstatSync(_0x21bc83)['isFile']()&&rmSync(_0x21bc83,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18218f,_0x2248ea){const _0x25e95c=a117_0x5e45,_0x17de68=_0x18218f();while(!![]){try{const _0x55ee2a=parseInt(_0x25e95c(0x151))/0x1+-parseInt(_0x25e95c(0x156))/0x2+parseInt(_0x25e95c(0x14b))/0x3*(parseInt(_0x25e95c(0x15f))/0x4)+-parseInt(_0x25e95c(0x14f))/0x5*(-parseInt(_0x25e95c(0x15e))/0x6)+-parseInt(_0x25e95c(0x14d))/0x7*(-parseInt(_0x25e95c(0x142))/0x8)+parseInt(_0x25e95c(0x15b))/0x9+-parseInt(_0x25e95c(0x158))/0xa;if(_0x55ee2a===_0x2248ea)break;else _0x17de68['push'](_0x17de68['shift']());}catch(_0x11f530){_0x17de68['push'](_0x17de68['shift']());}}}(a117_0x4957,0x3ea23));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a117_0x5e45(_0x2cf96e,_0x9c2fd7){_0x2cf96e=_0x2cf96e-0x140;const _0x49578e=a117_0x4957();let _0x5e4552=_0x49578e[_0x2cf96e];return _0x5e4552;}function a117_0x4957(){const _0x1c4ecc=['zipSize','sourceSessionId','isArray','readonly','personal','Invalid\x20','string','tenantCode','209968LwdJgk','ossPath','validation','tags','skillName','path','zipSha256','object','files','77538hwaLWp','userId','42yWehYj','fromEntries','44335LOwlfx','parse','377689NlwtOD','forkedFromVersion','length','forkedFromSkillId','description','634256mgudiA','Runtime\x20Skill\x20is\x20missing\x20skillCode.','10273470APCSyI','trim','version','4600836pNjSYK','manifest','map','78gCujen','68vYSVPO'];a117_0x4957=function(){return _0x1c4ecc;};return a117_0x4957();}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4da2bb,_0x35b7fe,_0x3e1d2a,_0x4e2ff2,_0x571d17,_0x27c2d4,_0x39dae7){const _0xf4a869=a117_0x5e45,_0x32512e=_0x27c2d4?normalizeLocalFiles(_0x27c2d4):[],_0x2b2e96=!_0x39dae7&&_0x32512e['length']>0x0?buildSkillPackage(_0x32512e):undefined,_0x34b78d=_0x39dae7?bufferSha256(_0x39dae7):_0x2b2e96?.[_0xf4a869(0x15c)][_0xf4a869(0x148)],_0x542800=_0x39dae7?.[_0xf4a869(0x153)]??_0x2b2e96?.['manifest'][_0xf4a869(0x160)],_0x3a807b=_0x32512e[_0xf4a869(0x153)]>0x0?Object[_0xf4a869(0x14e)](_0x32512e[_0xf4a869(0x15d)](_0x143efc=>[_0x143efc['path'],fileHash(_0x143efc)])):undefined;return{'schemaVersion':_0x32512e['length']>0x0?0x2:0x1,'id':_0x4da2bb['id'],'appCode':_0x3e1d2a,'skillCode':requireSkillCode(_0x4da2bb),'skillName':_0x4da2bb[_0xf4a869(0x146)],'description':_0x4da2bb[_0xf4a869(0x155)],'scope':_0x35b7fe,'readonly':_0x35b7fe!==_0xf4a869(0x164)||_0x4da2bb[_0xf4a869(0x163)]===!![],'tenantCode':_0x4da2bb[_0xf4a869(0x141)],'userId':_0x4da2bb[_0xf4a869(0x14c)],'version':_0x4da2bb[_0xf4a869(0x15a)],'status':_0x4da2bb['status'],'tags':Array[_0xf4a869(0x162)](_0x4da2bb[_0xf4a869(0x145)])?_0x4da2bb[_0xf4a869(0x145)]:[],'hasUpstreamUpdate':_0x4da2bb['hasUpstreamUpdate'],'forkedFromSkillId':_0x4da2bb[_0xf4a869(0x154)],'forkedFromVersion':_0x4da2bb[_0xf4a869(0x152)],'sourceSessionId':_0x4da2bb[_0xf4a869(0x161)],'contentHash':_0x4e2ff2,'fileHashes':_0x3a807b,'treeHash':_0x32512e['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x32512e)):undefined,'ossPath':remoteManifestOssPath(_0x4da2bb[_0xf4a869(0x14a)]),'zipSha256':_0x34b78d,'zipSize':_0x542800,'files':_0x32512e['length']>0x0?_0x32512e['map'](_0x4b5ccd=>({'path':_0x4b5ccd[_0xf4a869(0x147)],'hash':fileHash(_0x4b5ccd),'size':fileContent(_0x4b5ccd)[_0xf4a869(0x153)]})):undefined,'pulledAt':_0x571d17??new Date()['toISOString']()};}export function requireSkillCode(_0x1404e0){const _0x471f6b=a117_0x5e45,_0x7d6aa1=_0x1404e0['skillCode']?.[_0x471f6b(0x159)]();if(!_0x7d6aa1)throw CliErrors[_0x471f6b(0x144)](_0x471f6b(0x157));return _0x7d6aa1;}export function readMetadataIfPresent(_0x400ebc){const _0x363b1f=a117_0x5e45;if(!existsSync(_0x400ebc))return undefined;try{const _0x3488e4=JSON[_0x363b1f(0x150)](readFileSync(_0x400ebc,'utf8'));return _0x3488e4;}catch{throw CliErrors[_0x363b1f(0x144)](_0x363b1f(0x165)+METADATA_FILE+':\x20'+_0x400ebc);}}function remoteManifestOssPath(_0x49b073){const _0x47324a=a117_0x5e45;if(!_0x49b073||typeof _0x49b073!==_0x47324a(0x149)||Array[_0x47324a(0x162)](_0x49b073))return undefined;const _0x11cb14=_0x49b073[_0x47324a(0x143)];return typeof _0x11cb14===_0x47324a(0x140)&&_0x11cb14[_0x47324a(0x159)]()?_0x11cb14[_0x47324a(0x159)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a118_0x1385ed=a118_0x4c6c;(function(_0x3a715a,_0x3b191e){const _0x1961f1=a118_0x4c6c,_0x230231=_0x3a715a();while(!![]){try{const _0x5cffc5=parseInt(_0x1961f1(0x204))/0x1*(parseInt(_0x1961f1(0x208))/0x2)+parseInt(_0x1961f1(0x1fd))/0x3+parseInt(_0x1961f1(0x1f7))/0x4*(parseInt(_0x1961f1(0x1f2))/0x5)+parseInt(_0x1961f1(0x202))/0x6+parseInt(_0x1961f1(0x1fc))/0x7*(-parseInt(_0x1961f1(0x1ef))/0x8)+parseInt(_0x1961f1(0x1ed))/0x9+parseInt(_0x1961f1(0x1f8))/0xa*(-parseInt(_0x1961f1(0x200))/0xb);if(_0x5cffc5===_0x3b191e)break;else _0x230231['push'](_0x230231['shift']());}catch(_0x1ff493){_0x230231['push'](_0x230231['shift']());}}}(a118_0x523b,0x76e9f));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';function a118_0x523b(){const _0x3619fd=['26816WyRdwP','Unsafe\x20','.workbuddy','1138925liqRoJ','CLAUDE_SKILL_ROOT','filter','path\x20segment','\x20for\x20local\x20path:\x20','12dEcIAG','10YHMEfH','includes','.agents','SKILL_ROOT','1246PLMhfU','2157417JnJxhc','appCode','claudeSkillsDir','23085667GvFEYi','cacheRoot','5536524ewLQsu','homeDirName','3697qkjDkd','.claude','validation','homeDir','26sYKbIs','skills','workbuddySkillsDir','7282035LXROHk','agentsSkillsDir'];a118_0x523b=function(){return _0x3619fd;};return a118_0x523b();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x2c8a73={}){const _0x209308=a118_0x4c6c,_0x3cd995=_0x2c8a73[_0x209308(0x207)]??homedir(),_0x260261=resolve(_0x3cd995,PRODUCT_CONFIG['homeDirName'],'cache'),_0x26ac3a=trimmedEnv(_0x209308(0x1fb)),_0x251b89=trimmedEnv(_0x209308(0x1f3)),_0x245037=resolve(_0x3cd995,_0x209308(0x1f1)),_0x11d68a=_0x2c8a73[_0x209308(0x1ec)]??(existsSync(_0x245037)?resolve(_0x245037,'skills'):undefined);return{'homeDir':_0x3cd995,'cacheRoot':_0x260261,'managedRoot':resolve(_0x3cd995,PRODUCT_CONFIG[_0x209308(0x203)]),'agentsSkillsDir':_0x2c8a73['agentsSkillsDir']??_0x26ac3a??resolve(_0x3cd995,_0x209308(0x1fa),_0x209308(0x209)),'claudeSkillsDir':_0x2c8a73[_0x209308(0x1ff)]??_0x251b89??resolve(_0x3cd995,_0x209308(0x205),_0x209308(0x209)),'workbuddySkillsDir':_0x11d68a};}export function runtimeAgentSkillRoots(_0x2bd930){const _0x16c276=a118_0x4c6c;return[_0x2bd930[_0x16c276(0x1ee)],_0x2bd930[_0x16c276(0x1ff)],_0x2bd930[_0x16c276(0x1ec)]][_0x16c276(0x1f4)](_0x5ba305=>Boolean(_0x5ba305));}export function getRuntimeSkillCacheRoot(_0x4175b3,_0x61c3ca,_0x2d36a0={}){const _0x2d8789=a118_0x4c6c,_0x1f01ae=resolveSkillSyncPaths(_0x2d36a0);return resolve(_0x1f01ae[_0x2d8789(0x201)],_0x4175b3,fingerprintAccessKey(_0x61c3ca),_0x2d8789(0x209));}function a118_0x4c6c(_0xce5e51,_0x44e258){_0xce5e51=_0xce5e51-0x1ec;const _0x523b51=a118_0x523b();let _0x4c6c7b=_0x523b51[_0xce5e51];return _0x4c6c7b;}export function getRuntimeSkillDir(_0x84c9a2,_0x1c4cdd,_0x57bdfc,_0x143748,_0x561e13,_0x4b2951={}){const _0x2073e2=a118_0x4c6c;return resolve(getRuntimeSkillCacheRoot(_0x84c9a2,_0x1c4cdd,_0x4b2951),safePathSegment(_0x57bdfc,_0x2073e2(0x1fe)),_0x143748,safePathSegment(_0x561e13,'skillCode'));}export function safePathSegment(_0x4ab762,_0x90d51d=a118_0x1385ed(0x1f5)){const _0x53d180=a118_0x1385ed;if(!_0x4ab762||_0x4ab762[_0x53d180(0x1f9)]('/')||_0x4ab762[_0x53d180(0x1f9)]('\x5c')||_0x4ab762['includes']('..'))throw CliErrors[_0x53d180(0x206)](_0x53d180(0x1f0)+_0x90d51d+_0x53d180(0x1f6)+_0x4ab762);return _0x4ab762;}function trimmedEnv(_0x46d730){const _0x40909f=productEnv(_0x46d730)?.['trim']();return _0x40909f?_0x40909f:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x31a9c6,_0x20ffca){const _0x98d904=a119_0x1116,_0x188d62=_0x31a9c6();while(!![]){try{const _0x4e44e4=parseInt(_0x98d904(0x74))/0x1+-parseInt(_0x98d904(0x8b))/0x2+-parseInt(_0x98d904(0x82))/0x3+parseInt(_0x98d904(0xb4))/0x4*(parseInt(_0x98d904(0x8c))/0x5)+-parseInt(_0x98d904(0x7d))/0x6*(parseInt(_0x98d904(0xa4))/0x7)+-parseInt(_0x98d904(0xb1))/0x8+parseInt(_0x98d904(0x7b))/0x9;if(_0x4e44e4===_0x20ffca)break;else _0x188d62['push'](_0x188d62['shift']());}catch(_0x58c894){_0x188d62['push'](_0x188d62['shift']());}}}(a119_0x4a7c,0x4de65));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a119_0x8c94ce}from'yaml';function a119_0x1116(_0x2e82b6,_0x27380b){_0x2e82b6=_0x2e82b6-0x72;const _0x4a7ce0=a119_0x4a7c();let _0x11165c=_0x4a7ce0[_0x2e82b6];return _0x11165c;}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(_0xb63ad2,_0x5d9b44,_0xb7ef78={}){const _0x47f228=a119_0x1116,_0x4a1146=resolvePushDirectoryRoot(_0xb63ad2),_0x35ea7b=readPushMetadataIfPresent(resolve(_0x4a1146,METADATA_FILE),{'ignoreInvalidMetadata':_0xb7ef78[_0x47f228(0xa8)]});if(_0x35ea7b?.[_0x47f228(0xb3)]&&_0x35ea7b['appCode']!==_0x5d9b44&&!_0xb7ef78[_0x47f228(0x7f)]&&!_0xb7ef78[_0x47f228(0x81)])throw CliErrors[_0x47f228(0xa6)]('Skill\x20metadata\x20appCode\x20\x22'+_0x35ea7b['appCode']+_0x47f228(0x9c)+_0x5d9b44+'\x22.');const _0x4f8073=resolvePushSkillCode(_0x4a1146,_0x5d9b44,_0x35ea7b,_0xb7ef78);if(!_0x4f8073)throw CliErrors['validation'](_0x47f228(0x78)+SKILL_FILE+',\x20'+METADATA_FILE+_0x47f228(0xb5));return{'dir':_0x4a1146,'skillCode':_0x4f8073,'metadata':_0x35ea7b};}export function readPushDirectory(_0x2e2f60,_0x3d3e39,_0x5c6a8f={}){const _0x4d3307=a119_0x1116,_0x35dbaf=resolvePushDirectoryIdentity(_0x2e2f60,_0x3d3e39,_0x5c6a8f),_0x1fe15b=_0x35dbaf[_0x4d3307(0x88)],_0x5ef3a9=resolve(_0x1fe15b,SKILL_FILE);if(!existsSync(_0x5ef3a9)||!lstatSync(_0x5ef3a9)[_0x4d3307(0x99)]())throw CliErrors['validation'](_0x4d3307(0x73)+SKILL_FILE+':\x20'+_0x5ef3a9);const _0x1a6e11=_0x35dbaf[_0x4d3307(0x9e)],_0x2ff717=_0x5c6a8f[_0x4d3307(0xa5)]??_0x4d3307(0xae);if(!_0x5c6a8f['ignoreMetadataScope']&&_0x1a6e11?.[_0x4d3307(0x8f)]===_0x4d3307(0x84))throw CliErrors[_0x4d3307(0xa6)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x4d3307(0x96)+_0x1a6e11[_0x4d3307(0x8f)]+'\x22.');if(!_0x5c6a8f[_0x4d3307(0xb0)]&&_0x2ff717===_0x4d3307(0xae)&&_0x1a6e11?.[_0x4d3307(0x8f)]&&_0x1a6e11[_0x4d3307(0x8f)]!==_0x4d3307(0xae))throw CliErrors['validation'](_0x4d3307(0x8e)+METADATA_FILE+_0x4d3307(0x96)+_0x1a6e11['scope']+'\x22.',_0x4d3307(0x87)+_0x1fe15b+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0xe6d60e=scanSkillDirectory(_0x1fe15b,{'excludedFilePaths':_0x5c6a8f[_0x4d3307(0x8d)]}),_0x27ba3a=buildSkillPackage(_0xe6d60e),_0x333d31=readFileSync(_0x5ef3a9,_0x4d3307(0xa9)),_0x5822e9=_0x35dbaf[_0x4d3307(0xa2)],_0x244128=_0x5c6a8f[_0x4d3307(0xa0)]?undefined:_0x1a6e11,_0x177922=readSkillDisplayName(_0x333d31);return{'skillCode':_0x5822e9,'metadata':_0x1a6e11,'frontmatterDisplayName':_0x177922,'input':{'skillCode':_0x5822e9,'skillName':_0x177922??_0x244128?.[_0x4d3307(0x7a)],'description':_0x244128?.[_0x4d3307(0x94)],'content':_0x333d31,'files':_0x27ba3a['manifest'],'packageBase64':_0x27ba3a[_0x4d3307(0x9d)],'tags':_0x244128?.[_0x4d3307(0x72)],'version':_0x244128?.[_0x4d3307(0x98)],'sourceSessionId':_0x244128?.[_0x4d3307(0xa1)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x267ef1,_0x478111,_0x265faa,_0x5da35c={}){const _0x937c79=a119_0x1116,_0x325534=resolvePushDirectoryRoot(_0x267ef1),_0x1eb02c=readPushMetadataIfPresent(resolve(_0x325534,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5c7eb6=requireRemoteScope(_0x478111),_0x3b2ab4=readLocalSkillContent(_0x325534),_0x1cd6c0={..._0x478111,'appCode':_0x478111[_0x937c79(0xb3)]??_0x265faa,'skillName':_0x478111[_0x937c79(0x7a)]??_0x1eb02c?.[_0x937c79(0x7a)],'description':_0x478111[_0x937c79(0x94)]??_0x1eb02c?.[_0x937c79(0x94)],'tags':Array['isArray'](_0x478111['tags'])?_0x478111[_0x937c79(0x72)]:_0x1eb02c?.[_0x937c79(0x72)],'sourceSessionId':_0x478111[_0x937c79(0xa1)]??_0x1eb02c?.[_0x937c79(0xa1)],'content':_0x478111[_0x937c79(0xaf)]??_0x3b2ab4},_0x379672=buildMetadata(_0x1cd6c0,_0x5c7eb6,_0x265faa,contentHash(_0x3b2ab4),_0x5da35c[_0x937c79(0xb2)]);writeJsonAtomic(resolve(_0x325534,METADATA_FILE),_0x379672);}export function recordPushedRuntimeSkill(_0xb65f6d,_0x4c17bc,_0x26be59,_0x38ff0f={}){const _0x5c0ed0=a119_0x1116,_0x582fa9=resolvePushDirectoryRoot(_0xb65f6d),_0x3c8288=scanSkillDirectory(_0x582fa9),_0x1579c2=_0x3c8288[_0x5c0ed0(0x91)](_0x4f8c01=>_0x4f8c01[_0x5c0ed0(0xa3)]===SKILL_FILE),_0x365581=_0x1579c2?fileText(_0x1579c2):'',_0x122487=tryNormalizePackageManifest(_0x4c17bc[_0x5c0ed0(0x9a)]),_0x49b29c={..._0x4c17bc,'content':_0x4c17bc[_0x5c0ed0(0xaf)]??_0x365581,'files':_0x122487},_0x15e7ce=_0x122487?normalizeLocalFiles(_0x3c8288)[_0x5c0ed0(0x95)](_0x47abf4=>_0x122487[_0x5c0ed0(0x9a)][_0x5c0ed0(0x86)](_0x5c6dfc=>_0x5c6dfc[_0x5c0ed0(0xa3)]===_0x47abf4[_0x5c0ed0(0xa3)])):undefined,_0xeba0c3=buildMetadata(_0x49b29c,_0x38ff0f[_0x5c0ed0(0x8f)]??_0x5c0ed0(0xae),_0x26be59,contentHash(_0x49b29c[_0x5c0ed0(0xaf)]??''),_0x38ff0f[_0x5c0ed0(0x76)],_0x15e7ce);writeJsonAtomic(resolve(_0x582fa9,METADATA_FILE),_0xeba0c3);}export function deriveSkillCodeFromDirectory(_0x34a51a,_0x42fc5f){const _0x13dc45=a119_0x1116,_0x50a10e=basename(resolve(_0x34a51a)),_0x32e149=_0x42fc5f+'--';return _0x50a10e[_0x13dc45(0x93)](_0x32e149)?_0x50a10e[_0x13dc45(0xa7)](_0x32e149[_0x13dc45(0x79)]):_0x50a10e;}function resolvePushSkillCode(_0x3fffbf,_0x5aa173,_0x189b20,_0x3bd505){const _0x1069fa=a119_0x1116,_0x4a4e54=deriveSkillCodeFromSkillFile(_0x3fffbf)||deriveSkillCodeFromDirectory(_0x3fffbf,_0x5aa173);if(_0x3bd505['ignoreMetadataSkillCode'])return _0x4a4e54;return _0x189b20?.[_0x1069fa(0xa2)]?.['trim']()||_0x4a4e54;}function deriveSkillCodeFromSkillFile(_0x197f10){const _0x4a5571=a119_0x1116,_0xd1c594=resolve(_0x197f10,SKILL_FILE);if(!existsSync(_0xd1c594)||!lstatSync(_0xd1c594)[_0x4a5571(0x99)]())return undefined;const _0x25bae9=readFileSync(_0xd1c594,_0x4a5571(0xa9)),_0x279c88=_0x25bae9[_0x4a5571(0x7e)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x279c88)return undefined;const _0x5971db=parseFrontmatterObject(_0x279c88[0x1]??''),_0x521230=scalarToString(_0x5971db?.[_0x4a5571(0x92)]);return _0x521230?slugifySkillName(_0x521230):undefined;}function a119_0x4a7c(){const _0x58f1d8=['builtin','\x20name\x20for\x20SkillHub\x20slug\x20generation.','some','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','dir','number','replace','777100Pxoyux','817995VFirlv','excludedFilePaths','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','scope','unknown','find','name','startsWith','description','filter','\x20has\x20scope=\x22','isSymbolicLink','version','isFile','files','string','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','packageBase64','metadata','Skill\x20directory\x20not\x20found:\x20','ignoreMetadataForPayload','sourceSessionId','skillCode','path','63294uAKqMA','targetScope','validation','slice','ignoreInvalidMetadata','utf8','object','toLowerCase','(unknown)','displayName','personal','content','ignoreMetadataScope','4322152gYLhHS','refreshedAt','appCode','12XPlAYM',',\x20or\x20directory\x20name.','tags','Missing\x20','447695YtGLoC','isDirectory','pushedAt','Remote\x20Skill\x20','Unable\x20to\x20resolve\x20skillCode\x20from\x20','length','skillName','6974397eREJsV','\x20has\x20unsupported\x20scope\x20\x22','144pthlPr','match','allowAppCodeRetarget','company','ignoreMetadataAppCodeMismatch','745563ENpXxj','isArray'];a119_0x4a7c=function(){return _0x58f1d8;};return a119_0x4a7c();}function readSkillDisplayName(_0x18a7d0){const _0x3bb7d8=a119_0x1116,_0x4a7054=_0x18a7d0[_0x3bb7d8(0x7e)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4a7054)return undefined;const _0x417023=parseFrontmatterObject(_0x4a7054[0x1]??'');return scalarToString(_0x417023?.[_0x3bb7d8(0xad)]);}function slugifySkillName(_0x320ab1){const _0x34ce78=a119_0x1116,_0x195c17=_0x320ab1['trim']()[_0x34ce78(0xab)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x34ce78(0x8a)](/^-+/,'')[_0x34ce78(0x8a)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x195c17)throw CliErrors['validation']('Invalid\x20'+SKILL_FILE+_0x34ce78(0x85));return _0x195c17;}function parseFrontmatterObject(_0x1ccd54){const _0xe35b5c=a119_0x1116;try{const _0x596a07=a119_0x8c94ce(_0x1ccd54);return _0x596a07&&typeof _0x596a07===_0xe35b5c(0xaa)&&!Array[_0xe35b5c(0x83)](_0x596a07)?_0x596a07:undefined;}catch{return undefined;}}function scalarToString(_0x1492c8){const _0x1503a8=a119_0x1116;if(typeof _0x1492c8===_0x1503a8(0x9b))return _0x1492c8['trim']();if(typeof _0x1492c8===_0x1503a8(0x89)||typeof _0x1492c8==='boolean')return String(_0x1492c8);return undefined;}function resolvePushDirectoryRoot(_0x1e7438){const _0x4fd2c9=a119_0x1116,_0x22f26e=resolve(_0x1e7438);if(!existsSync(_0x22f26e))throw CliErrors[_0x4fd2c9(0xa6)](_0x4fd2c9(0x9f)+_0x1e7438);const _0x2fb3ec=lstatSync(_0x22f26e);if(_0x2fb3ec['isDirectory']())return _0x22f26e;if(_0x2fb3ec[_0x4fd2c9(0x97)]()){const _0x27597d=realpathSync(_0x22f26e);if(lstatSync(_0x27597d)[_0x4fd2c9(0x75)]())return _0x27597d;}throw CliErrors[_0x4fd2c9(0xa6)](_0x4fd2c9(0x9f)+_0x1e7438);}function requireRemoteScope(_0x224a1c){const _0x17edfb=a119_0x1116;if(_0x224a1c['scope']==='personal'||_0x224a1c[_0x17edfb(0x8f)]===_0x17edfb(0x80)||_0x224a1c[_0x17edfb(0x8f)]===_0x17edfb(0x84))return _0x224a1c[_0x17edfb(0x8f)];throw CliErrors[_0x17edfb(0xa6)](_0x17edfb(0x77)+(_0x224a1c[_0x17edfb(0xa2)]||_0x17edfb(0xac))+_0x17edfb(0x7c)+(_0x224a1c['scope']??_0x17edfb(0x90))+'\x22.');}function readLocalSkillContent(_0xc9ab85){const _0x44c50c=a119_0x1116,_0x8b1c54=resolve(_0xc9ab85,SKILL_FILE);return existsSync(_0x8b1c54)&&lstatSync(_0x8b1c54)['isFile']()?readFileSync(_0x8b1c54,_0x44c50c(0xa9)):'';}function readPushMetadataIfPresent(_0x959477,_0x378e67={}){try{return readMetadataIfPresent(_0x959477);}catch(_0x11c77b){if(_0x378e67['ignoreInvalidMetadata'])return undefined;throw _0x11c77b;}}
|
|
1
|
+
(function(_0x1899be,_0x4144d1){const _0x5dda7d=a119_0x1306,_0x36b34b=_0x1899be();while(!![]){try{const _0x1c9642=-parseInt(_0x5dda7d(0x1b4))/0x1+parseInt(_0x5dda7d(0x1ad))/0x2*(parseInt(_0x5dda7d(0x1cc))/0x3)+parseInt(_0x5dda7d(0x1d6))/0x4*(parseInt(_0x5dda7d(0x1af))/0x5)+-parseInt(_0x5dda7d(0x1c1))/0x6*(-parseInt(_0x5dda7d(0x1d1))/0x7)+parseInt(_0x5dda7d(0x1be))/0x8+-parseInt(_0x5dda7d(0x1cb))/0x9*(-parseInt(_0x5dda7d(0x1b7))/0xa)+parseInt(_0x5dda7d(0x1d7))/0xb*(-parseInt(_0x5dda7d(0x1ca))/0xc);if(_0x1c9642===_0x4144d1)break;else _0x36b34b['push'](_0x36b34b['shift']());}catch(_0xe1d221){_0x36b34b['push'](_0x36b34b['shift']());}}}(a119_0x2061,0xb2d96));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a119_0x27d64b}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a119_0x2061(){const _0x311673=['697092zVFYWQ','218471wydVTn','trim','version','replace','appCode','files','description','object','toLowerCase','scope','allowAppCodeRetarget','isFile','slice','manifest','name','some','find','pushedAt','ignoreMetadataSkillCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','string','metadata','(unknown)','10OLPeXS','skillCode','10eDydgz','\x20has\x20scope=\x22','ignoreMetadataScope','Skill\x20metadata\x20appCode\x20\x22','isArray','1317670IHFovt','ignoreInvalidMetadata','isDirectory','20rEFBys','builtin','utf8','packageBase64','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','personal','tags','4282040gGnvNd','dir','content','47880TrxMoh','sourceSessionId','skillName',',\x20or\x20directory\x20name.','validation','ignoreMetadataForPayload','refreshedAt','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','828IGZFrj','1766223QbzZCq','793446FleuYl','excludedFilePaths','path','filter','targetScope','721nJWedz','\x20name\x20for\x20SkillHub\x20slug\x20generation.','Remote\x20Skill\x20','unknown','Unable\x20to\x20resolve\x20skillCode\x20from\x20'];a119_0x2061=function(){return _0x311673;};return a119_0x2061();}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(_0x186889,_0x544f90,_0x408006={}){const _0x350276=a119_0x1306,_0x1f9199=resolvePushDirectoryRoot(_0x186889),_0x2ca345=readPushMetadataIfPresent(resolve(_0x1f9199,METADATA_FILE),{'ignoreInvalidMetadata':_0x408006[_0x350276(0x1b5)]});if(_0x2ca345?.[_0x350276(0x1db)]&&_0x2ca345[_0x350276(0x1db)]!==_0x544f90&&!_0x408006[_0x350276(0x1e1)]&&!_0x408006['ignoreMetadataAppCodeMismatch'])throw CliErrors['validation'](_0x350276(0x1b2)+_0x2ca345['appCode']+_0x350276(0x1c9)+_0x544f90+'\x22.');const _0x43abc3=resolvePushSkillCode(_0x1f9199,_0x544f90,_0x2ca345,_0x408006);if(!_0x43abc3)throw CliErrors[_0x350276(0x1c5)](_0x350276(0x1d5)+SKILL_FILE+',\x20'+METADATA_FILE+_0x350276(0x1c4));return{'dir':_0x1f9199,'skillCode':_0x43abc3,'metadata':_0x2ca345};}export function readPushDirectory(_0x5910af,_0x34806f,_0x46f259={}){const _0x5bd87d=a119_0x1306,_0x1af94a=resolvePushDirectoryIdentity(_0x5910af,_0x34806f,_0x46f259),_0x131fcc=_0x1af94a[_0x5bd87d(0x1bf)],_0x5e15c8=resolve(_0x131fcc,SKILL_FILE);if(!existsSync(_0x5e15c8)||!lstatSync(_0x5e15c8)[_0x5bd87d(0x1e2)]())throw CliErrors[_0x5bd87d(0x1c5)]('Missing\x20'+SKILL_FILE+':\x20'+_0x5e15c8);const _0x4724dc=_0x1af94a[_0x5bd87d(0x1ab)],_0x207f13=_0x46f259[_0x5bd87d(0x1d0)]??_0x5bd87d(0x1bc);if(!_0x46f259[_0x5bd87d(0x1b1)]&&_0x4724dc?.[_0x5bd87d(0x1e0)]===_0x5bd87d(0x1b8))throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x5bd87d(0x1b0)+_0x4724dc[_0x5bd87d(0x1e0)]+'\x22.');if(!_0x46f259[_0x5bd87d(0x1b1)]&&_0x207f13==='personal'&&_0x4724dc?.[_0x5bd87d(0x1e0)]&&_0x4724dc['scope']!==_0x5bd87d(0x1bc))throw CliErrors[_0x5bd87d(0x1c5)](_0x5bd87d(0x1a9)+METADATA_FILE+_0x5bd87d(0x1b0)+_0x4724dc[_0x5bd87d(0x1e0)]+'\x22.',_0x5bd87d(0x1bb)+_0x131fcc+_0x5bd87d(0x1c8));const _0x3f79b9=scanSkillDirectory(_0x131fcc,{'excludedFilePaths':_0x46f259[_0x5bd87d(0x1cd)]}),_0x2237df=buildSkillPackage(_0x3f79b9),_0x3dd76d=readFileSync(_0x5e15c8,_0x5bd87d(0x1b9)),_0x5a405e=_0x1af94a[_0x5bd87d(0x1ae)],_0xc31f88=_0x46f259[_0x5bd87d(0x1c6)]?undefined:_0x4724dc,_0x5deba9=readSkillDisplayName(_0x3dd76d);return{'skillCode':_0x5a405e,'metadata':_0x4724dc,'frontmatterDisplayName':_0x5deba9,'input':{'skillCode':_0x5a405e,'skillName':_0x5deba9??_0xc31f88?.[_0x5bd87d(0x1c3)],'description':_0xc31f88?.['description'],'content':_0x3dd76d,'files':_0x2237df[_0x5bd87d(0x1e4)],'packageBase64':_0x2237df[_0x5bd87d(0x1ba)],'tags':_0xc31f88?.[_0x5bd87d(0x1bd)],'version':_0xc31f88?.[_0x5bd87d(0x1d9)],'sourceSessionId':_0xc31f88?.[_0x5bd87d(0x1c2)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5c7a4,_0x104c67,_0x564f3f,_0x3fb83d={}){const _0x1a759c=a119_0x1306,_0x84c1e2=resolvePushDirectoryRoot(_0x5c7a4),_0xcf7952=readPushMetadataIfPresent(resolve(_0x84c1e2,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x488a2e=requireRemoteScope(_0x104c67),_0x587eac=readLocalSkillContent(_0x84c1e2),_0x32ba6f={..._0x104c67,'appCode':_0x104c67['appCode']??_0x564f3f,'skillName':_0x104c67[_0x1a759c(0x1c3)]??_0xcf7952?.['skillName'],'description':_0x104c67[_0x1a759c(0x1dd)]??_0xcf7952?.['description'],'tags':Array[_0x1a759c(0x1b3)](_0x104c67[_0x1a759c(0x1bd)])?_0x104c67['tags']:_0xcf7952?.['tags'],'sourceSessionId':_0x104c67[_0x1a759c(0x1c2)]??_0xcf7952?.['sourceSessionId'],'content':_0x104c67['content']??_0x587eac},_0x9a2a72=buildMetadata(_0x32ba6f,_0x488a2e,_0x564f3f,contentHash(_0x587eac),_0x3fb83d[_0x1a759c(0x1c7)]);writeJsonAtomic(resolve(_0x84c1e2,METADATA_FILE),_0x9a2a72);}export function recordPushedRuntimeSkill(_0x40caf1,_0x59cce0,_0x2efd52,_0x29462a={}){const _0x28eebb=a119_0x1306,_0x252bda=resolvePushDirectoryRoot(_0x40caf1),_0x23b3bd=scanSkillDirectory(_0x252bda),_0x164003=_0x23b3bd[_0x28eebb(0x1e7)](_0x2b9907=>_0x2b9907['path']===SKILL_FILE),_0x1cb26b=_0x164003?fileText(_0x164003):'',_0x144c88=tryNormalizePackageManifest(_0x59cce0[_0x28eebb(0x1dc)]),_0x2b2893={..._0x59cce0,'content':_0x59cce0[_0x28eebb(0x1c0)]??_0x1cb26b,'files':_0x144c88},_0x59fb80=_0x144c88?normalizeLocalFiles(_0x23b3bd)[_0x28eebb(0x1cf)](_0x388716=>_0x144c88[_0x28eebb(0x1dc)][_0x28eebb(0x1e6)](_0x2e41f3=>_0x2e41f3[_0x28eebb(0x1ce)]===_0x388716[_0x28eebb(0x1ce)])):undefined,_0x3b80a2=buildMetadata(_0x2b2893,_0x29462a[_0x28eebb(0x1e0)]??_0x28eebb(0x1bc),_0x2efd52,contentHash(_0x2b2893['content']??''),_0x29462a[_0x28eebb(0x1a7)],_0x59fb80);writeJsonAtomic(resolve(_0x252bda,METADATA_FILE),_0x3b80a2);}export function deriveSkillCodeFromDirectory(_0xde269e,_0x28774c){const _0xa08083=a119_0x1306,_0xa058c9=basename(resolve(_0xde269e)),_0x189869=_0x28774c+'--';return _0xa058c9['startsWith'](_0x189869)?_0xa058c9[_0xa08083(0x1e3)](_0x189869['length']):_0xa058c9;}function a119_0x1306(_0x2f99b1,_0x4f896f){_0x2f99b1=_0x2f99b1-0x1a7;const _0x2061b6=a119_0x2061();let _0x13061=_0x2061b6[_0x2f99b1];return _0x13061;}function resolvePushSkillCode(_0x22092c,_0x374029,_0x24cb40,_0x5ddeb1){const _0x2763c3=a119_0x1306,_0xf41d3e=deriveSkillCodeFromSkillFile(_0x22092c)||deriveSkillCodeFromDirectory(_0x22092c,_0x374029);if(_0x5ddeb1[_0x2763c3(0x1a8)])return _0xf41d3e;return _0x24cb40?.['skillCode']?.['trim']()||_0xf41d3e;}function deriveSkillCodeFromSkillFile(_0x51091a){const _0x136afd=a119_0x1306,_0x80814b=resolve(_0x51091a,SKILL_FILE);if(!existsSync(_0x80814b)||!lstatSync(_0x80814b)[_0x136afd(0x1e2)]())return undefined;const _0x3be4c2=readFileSync(_0x80814b,_0x136afd(0x1b9)),_0xa8772b=_0x3be4c2['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa8772b)return undefined;const _0x38c0c0=parseFrontmatterObject(_0xa8772b[0x1]??''),_0x3b2866=scalarToString(_0x38c0c0?.[_0x136afd(0x1e5)]);return _0x3b2866?slugifySkillName(_0x3b2866):undefined;}function readSkillDisplayName(_0x4f90ac){const _0x1fdd78=_0x4f90ac['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1fdd78)return undefined;const _0x16ac39=parseFrontmatterObject(_0x1fdd78[0x1]??'');return scalarToString(_0x16ac39?.['displayName']);}function slugifySkillName(_0x27b80c){const _0x5aaffd=a119_0x1306,_0x276c40=_0x27b80c[_0x5aaffd(0x1d8)]()[_0x5aaffd(0x1df)]()[_0x5aaffd(0x1da)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x5aaffd(0x1da)](/^-+/,'')[_0x5aaffd(0x1da)](/-+$/,'')[_0x5aaffd(0x1da)](/-{2,}/g,'-');if(!_0x276c40)throw CliErrors[_0x5aaffd(0x1c5)]('Invalid\x20'+SKILL_FILE+_0x5aaffd(0x1d2));return _0x276c40;}function parseFrontmatterObject(_0x1b1f34){const _0x4fb491=a119_0x1306;try{const _0x243c22=a119_0x27d64b(_0x1b1f34);return _0x243c22&&typeof _0x243c22===_0x4fb491(0x1de)&&!Array['isArray'](_0x243c22)?_0x243c22:undefined;}catch{return undefined;}}function scalarToString(_0x4b10be){const _0x10a24f=a119_0x1306;if(typeof _0x4b10be===_0x10a24f(0x1aa))return _0x4b10be[_0x10a24f(0x1d8)]();if(typeof _0x4b10be==='number'||typeof _0x4b10be==='boolean')return String(_0x4b10be);return undefined;}function resolvePushDirectoryRoot(_0x4dee2a){const _0x375bcf=a119_0x1306,_0x34cb96=resolve(_0x4dee2a);if(!existsSync(_0x34cb96))throw CliErrors[_0x375bcf(0x1c5)]('Skill\x20directory\x20not\x20found:\x20'+_0x4dee2a);const _0x2ebebf=lstatSync(_0x34cb96);if(_0x2ebebf['isDirectory']())return _0x34cb96;if(_0x2ebebf['isSymbolicLink']()){const _0x44df21=realpathSync(_0x34cb96);if(lstatSync(_0x44df21)[_0x375bcf(0x1b6)]())return _0x44df21;}throw CliErrors[_0x375bcf(0x1c5)]('Skill\x20directory\x20not\x20found:\x20'+_0x4dee2a);}function requireRemoteScope(_0x5d4aaf){const _0x132ec0=a119_0x1306;if(_0x5d4aaf[_0x132ec0(0x1e0)]===_0x132ec0(0x1bc)||_0x5d4aaf[_0x132ec0(0x1e0)]==='company'||_0x5d4aaf[_0x132ec0(0x1e0)]===_0x132ec0(0x1b8))return _0x5d4aaf['scope'];throw CliErrors[_0x132ec0(0x1c5)](_0x132ec0(0x1d3)+(_0x5d4aaf[_0x132ec0(0x1ae)]||_0x132ec0(0x1ac))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x5d4aaf['scope']??_0x132ec0(0x1d4))+'\x22.');}function readLocalSkillContent(_0x47411e){const _0x149dbe=a119_0x1306,_0x9e3e9=resolve(_0x47411e,SKILL_FILE);return existsSync(_0x9e3e9)&&lstatSync(_0x9e3e9)[_0x149dbe(0x1e2)]()?readFileSync(_0x9e3e9,_0x149dbe(0x1b9)):'';}function readPushMetadataIfPresent(_0x5e14a0,_0x4c3126={}){const _0x3e2195=a119_0x1306;try{return readMetadataIfPresent(_0x5e14a0);}catch(_0x5c6785){if(_0x4c3126[_0x3e2195(0x1b5)])return undefined;throw _0x5c6785;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a120_0x4b05(){const _0x41d14a=['length','1763328VPmQrF','personal','push','578355KIsnsn','1561PYCydZ','6Reaxcq','validation','2406627iSPiXg','builtin','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','77907BipPfi','17848EPHjVk','1700964UIiqov','2855208gFceNM','company'];a120_0x4b05=function(){return _0x41d14a;};return a120_0x4b05();}(function(_0x4290fb,_0x59ea80){const _0xf0b22e=a120_0x1869,_0x2f4008=_0x4290fb();while(!![]){try{const _0x39d0b9=parseInt(_0xf0b22e(0x9d))/0x1*(parseInt(_0xf0b22e(0x97))/0x2)+parseInt(_0xf0b22e(0xa3))/0x3+parseInt(_0xf0b22e(0x9f))/0x4+-parseInt(_0xf0b22e(0x95))/0x5+-parseInt(_0xf0b22e(0xa0))/0x6+parseInt(_0xf0b22e(0x96))/0x7*(-parseInt(_0xf0b22e(0x9e))/0x8)+parseInt(_0xf0b22e(0x99))/0x9;if(_0x39d0b9===_0x59ea80)break;else _0x2f4008['push'](_0x2f4008['shift']());}catch(_0x149201){_0x2f4008['push'](_0x2f4008['shift']());}}}(a120_0x4b05,0x67c81));import{CliErrors}from'../../errors.js';function a120_0x1869(_0x151480,_0x23477b){_0x151480=_0x151480-0x94;const _0x4b0538=a120_0x4b05();let _0x186925=_0x4b0538[_0x151480];return _0x186925;}export function normalizeRuntimeSkillScopes(_0x155d9c){const _0x37ce0a=a120_0x1869,_0x42be13=_0x155d9c&&_0x155d9c[_0x37ce0a(0xa2)]>0x0?_0x155d9c:['personal',_0x37ce0a(0xa1),_0x37ce0a(0x9a)],_0x3d5831=[];for(const _0x1566db of _0x42be13){if(!isRuntimeSkillScope(_0x1566db))throw CliErrors[_0x37ce0a(0x98)](_0x37ce0a(0x9c)+_0x1566db);!_0x3d5831[_0x37ce0a(0x9b)](_0x1566db)&&_0x3d5831[_0x37ce0a(0x94)](_0x1566db);}return _0x3d5831;}export function isRuntimeSkillScope(_0x1fe381){const _0x2c3b2f=a120_0x1869;return _0x1fe381===_0x2c3b2f(0xa4)||_0x1fe381==='company'||_0x1fe381==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x556f9b,_0x2a9b11){const _0x25a13e=a122_0x4c34,_0xc7b7e=_0x556f9b();while(!![]){try{const _0x1a490d=parseInt(_0x25a13e(0x162))/0x1+-parseInt(_0x25a13e(0x160))/0x2+-parseInt(_0x25a13e(0x164))/0x3+-parseInt(_0x25a13e(0x161))/0x4*(-parseInt(_0x25a13e(0x16c))/0x5)+parseInt(_0x25a13e(0x15f))/0x6*(-parseInt(_0x25a13e(0x16e))/0x7)+-parseInt(_0x25a13e(0x15d))/0x8+parseInt(_0x25a13e(0x165))/0x9;if(_0x1a490d===_0x2a9b11)break;else _0xc7b7e['push'](_0xc7b7e['shift']());}catch(_0x3a0143){_0xc7b7e['push'](_0xc7b7e['shift']());}}}(a122_0x4d88,0x4c26a));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x408d7a){const _0x852d69=a122_0x4c34,_0x185251={};for(const _0x29039d of normalizeLocalFiles(_0x408d7a)){_0x185251[_0x29039d[_0x852d69(0x16d)]]=fileContent(_0x29039d);}return Buffer[_0x852d69(0x168)](zipSync(_0x185251,{'level':0x0,'mtime':ZIP_MTIME}));}function a122_0x4c34(_0x13e090,_0x5710bc){_0x13e090=_0x13e090-0x15c;const _0x4d88a9=a122_0x4d88();let _0x4c3466=_0x4d88a9[_0x13e090];return _0x4c3466;}function a122_0x4d88(){const _0x1e9805=['Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','12KonHeB','443588xWkZee','865684nKcPeW','288922qzKWxH','object','1669389XVAsjI','10823004qZyIYm','validation','map','from','code','validation_error','entries','5KhYRUT','path','273595ZrSbdd','length','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','4316464dyRuAP'];a122_0x4d88=function(){return _0x1e9805;};return a122_0x4d88();}export function parseZipPackage(_0x58c004){const _0x5d3212=a122_0x4c34;if(_0x58c004[_0x5d3212(0x16f)]<0x16)throw CliErrors[_0x5d3212(0x166)](_0x5d3212(0x15e));let _0x212fe8;try{_0x212fe8=unzipSync(_0x58c004,{'filter'(_0x24f76e){const _0x301b51=_0x5d3212,_0xb9196d=normalizeSkillRelativePath(_0x24f76e['name']);if(_0xb9196d['endsWith']('/'))throw CliErrors['validation'](_0x301b51(0x15c)+_0xb9196d);return!![];}});}catch(_0xf4b974){if(isRuntimeSkillValidationError(_0xf4b974))throw _0xf4b974;throw CliErrors[_0x5d3212(0x166)](_0x5d3212(0x15e));}return Object[_0x5d3212(0x16b)](_0x212fe8)[_0x5d3212(0x167)](([_0x240133,_0x19b637])=>({'path':normalizeSkillRelativePath(_0x240133),'bytes':Buffer[_0x5d3212(0x168)](_0x19b637)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x19257a){const _0x559b1f=a122_0x4c34;return typeof _0x19257a===_0x559b1f(0x163)&&_0x19257a!==null&&_0x559b1f(0x169)in _0x19257a&&_0x19257a[_0x559b1f(0x169)]===_0x559b1f(0x16a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a123_0x4826(_0x14e165,_0x262444){_0x14e165=_0x14e165-0x1bc;const _0x56bae8=a123_0x56ba();let _0x482693=_0x56bae8[_0x14e165];return _0x482693;}(function(_0x56cc3b,_0x1764c3){const _0x276ff7=a123_0x4826,_0x5d4a18=_0x56cc3b();while(!![]){try{const _0x234ac3=parseInt(_0x276ff7(0x1d5))/0x1+-parseInt(_0x276ff7(0x1c7))/0x2+-parseInt(_0x276ff7(0x1e4))/0x3*(-parseInt(_0x276ff7(0x1de))/0x4)+parseInt(_0x276ff7(0x1ca))/0x5+parseInt(_0x276ff7(0x1e7))/0x6*(-parseInt(_0x276ff7(0x1bd))/0x7)+parseInt(_0x276ff7(0x1c4))/0x8*(parseInt(_0x276ff7(0x1d0))/0x9)+-parseInt(_0x276ff7(0x1d8))/0xa;if(_0x234ac3===_0x1764c3)break;else _0x5d4a18['push'](_0x5d4a18['shift']());}catch(_0x141ff5){_0x5d4a18['push'](_0x5d4a18['shift']());}}}(a123_0x56ba,0x90247));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';export function buildSkillPackage(_0x520000){const _0x111b56=a123_0x4826,_0x54d99f=normalizeLocalFiles(_0x520000);if(!_0x54d99f['some'](_0x3e3a11=>_0x3e3a11['path']===SKILL_FILE))throw CliErrors[_0x111b56(0x1cf)](_0x111b56(0x1e9)+SKILL_FILE+_0x111b56(0x1d9));const _0x381c12=localFilesToManifestFiles(_0x54d99f),_0x24f3f8=createDeterministicZipPackage(_0x54d99f);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x381c12),'zipSha256':bufferSha256(_0x24f3f8),'zipSize':_0x24f3f8[_0x111b56(0x1db)],'files':_0x381c12},'packageBytes':_0x24f3f8,'packageBase64':_0x24f3f8['toString'](_0x111b56(0x1cb))};}export function verifyRuntimeSkillPackage(_0x218c40,_0x1425f1){const _0x665ab1=normalizePackageManifest(_0x218c40,{'requireOssPath':![]});if(!_0x665ab1)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x665ab1,_0x1425f1);}export function verifyRuntimeSkillBundle(_0x1898e1,_0x5abf4d){const _0x45c7e7=a123_0x4826,_0x17236b=normalizePackageManifest(_0x1898e1,{'requireOssPath':![]});if(!_0x17236b)throw CliErrors[_0x45c7e7(0x1cf)](_0x45c7e7(0x1d1));return extractAndVerifyPackageFiles(_0x17236b,_0x5abf4d);}export function tryNormalizePackageManifest(_0x162a8c){return normalizePackageManifest(_0x162a8c,{'requireOssPath':![]});}export function requirePackageBytes(_0x15fcaa,_0x59b8c2){const _0x3f624d=a123_0x4826;if(!_0x59b8c2||_0x59b8c2['length']===0x0)throw CliErrors[_0x3f624d(0x1cf)](_0x3f624d(0x1be)+_0x15fcaa);return _0x59b8c2;}export function extractDownloadedPackage(_0x1d78c7){const _0x3c3933=a123_0x4826,_0x9594aa=parseZipPackage(_0x1d78c7)[_0x3c3933(0x1cc)](_0x16e135=>({'path':_0x16e135[_0x3c3933(0x1eb)],'bytes':_0x16e135[_0x3c3933(0x1da)]}));if(!_0x9594aa[_0x3c3933(0x1c1)](_0x1e5ddd=>_0x1e5ddd[_0x3c3933(0x1eb)]===SKILL_FILE))throw CliErrors[_0x3c3933(0x1cf)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x9594aa);}export function localFilesToManifestFiles(_0x131094){const _0x45f2a2=a123_0x4826;return normalizeLocalFiles(_0x131094)['map'](_0x279b5f=>({'path':_0x279b5f[_0x45f2a2(0x1eb)],'sha256':fileHash(_0x279b5f),'size':fileContent(_0x279b5f)[_0x45f2a2(0x1db)]}));}function normalizePackageManifest(_0x38d4e,_0x40bb57){const _0x122a5b=a123_0x4826;if(!_0x38d4e||typeof _0x38d4e!==_0x122a5b(0x1c8)||Array['isArray'](_0x38d4e))return undefined;const _0x37d285=_0x38d4e,_0x2f7b35=typeof _0x37d285[_0x122a5b(0x1dc)]===_0x122a5b(0x1e3)?_0x37d285[_0x122a5b(0x1dc)][_0x122a5b(0x1e8)]():undefined;if(_0x40bb57[_0x122a5b(0x1d2)]&&!_0x2f7b35)return undefined;if(!Array[_0x122a5b(0x1e0)](_0x37d285[_0x122a5b(0x1d6)])||_0x37d285[_0x122a5b(0x1d6)]['length']===0x0)return undefined;if(!isSha256Hex(_0x37d285[_0x122a5b(0x1cd)]))throw CliErrors[_0x122a5b(0x1cf)](_0x122a5b(0x1dd));if(!isSha256Hex(_0x37d285[_0x122a5b(0x1ce)]))throw CliErrors[_0x122a5b(0x1cf)](_0x122a5b(0x1c2));if(!Number[_0x122a5b(0x1c6)](_0x37d285[_0x122a5b(0x1c9)])||_0x37d285[_0x122a5b(0x1c9)]<0x0)throw CliErrors[_0x122a5b(0x1cf)](_0x122a5b(0x1bf));const _0x3f2877=normalizeManifestFiles(_0x37d285[_0x122a5b(0x1d6)]);if(!_0x3f2877[_0x122a5b(0x1c1)](_0x3e0eb5=>_0x3e0eb5['path']===SKILL_FILE))throw CliErrors[_0x122a5b(0x1cf)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x11ef8c=fileTreeHash(_0x3f2877);if(_0x11ef8c!==_0x37d285[_0x122a5b(0x1cd)]['toLowerCase']())throw CliErrors[_0x122a5b(0x1cf)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number['isSafeInteger'](_0x37d285[_0x122a5b(0x1ea)])?_0x37d285[_0x122a5b(0x1ea)]:0x2,'ossPath':_0x2f7b35,'treeSha256':_0x11ef8c,'zipSha256':_0x37d285['zipSha256'][_0x122a5b(0x1e1)](),'zipSize':_0x37d285[_0x122a5b(0x1c9)],'files':_0x3f2877};}function a123_0x56ba(){const _0x50ae5e=['bytes','length','ossPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','173268FkvtDF','set','isArray','toLowerCase','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','string','69MvwDlB','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','has','964992zJEcUT','trim','Missing\x20','schemaVersion','path','size','28lWRYSi','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','some','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','8pmSmdy','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','isSafeInteger','591062AEOCpR','object','zipSize','3731870VQLvlh','base64','map','treeSha256','zipSha256','validation','1322559huQaqB','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','requireOssPath','Duplicate\x20Skill\x20package\x20entry:\x20','push','981842JnuBjz','files','sha256','13421920kgjRNw','\x20in\x20Skill\x20file\x20package.'];a123_0x56ba=function(){return _0x50ae5e;};return a123_0x56ba();}function extractAndVerifyPackage(_0x31049a,_0x50411f){const _0x124c78=a123_0x4826,_0x5ae50f=normalizePackageManifest(_0x31049a,{'requireOssPath':![]});if(!_0x5ae50f)throw CliErrors[_0x124c78(0x1cf)](_0x124c78(0x1d1));if(_0x50411f[_0x124c78(0x1db)]!==_0x5ae50f['zipSize'])throw CliErrors[_0x124c78(0x1cf)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x128d00=bufferSha256(_0x50411f);if(_0x128d00!==_0x5ae50f['zipSha256'])throw CliErrors[_0x124c78(0x1cf)](_0x124c78(0x1c3));return extractAndVerifyPackageFiles(_0x5ae50f,_0x50411f);}function extractAndVerifyPackageFiles(_0x1a07a1,_0x213d98){const _0x195eb5=a123_0x4826,_0x42fff1=parseZipPackage(_0x213d98);if(_0x42fff1['length']!==_0x1a07a1[_0x195eb5(0x1d6)][_0x195eb5(0x1db)])throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1e5));const _0x39c231=new Map();for(const _0x3d9453 of _0x42fff1){if(_0x39c231[_0x195eb5(0x1e6)](_0x3d9453[_0x195eb5(0x1eb)]))throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1d3)+_0x3d9453[_0x195eb5(0x1eb)]);_0x39c231[_0x195eb5(0x1df)](_0x3d9453[_0x195eb5(0x1eb)],_0x3d9453);}const _0x394027=[];for(const _0xc7eb37 of _0x1a07a1['files']){const _0x4babb5=_0x39c231['get'](_0xc7eb37[_0x195eb5(0x1eb)]);if(!_0x4babb5)throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1c0)+_0xc7eb37[_0x195eb5(0x1eb)]);if(_0x4babb5[_0x195eb5(0x1da)][_0x195eb5(0x1db)]!==_0xc7eb37[_0x195eb5(0x1bc)])throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1c5)+_0xc7eb37[_0x195eb5(0x1eb)]);const _0x1e4690=bufferSha256(_0x4babb5[_0x195eb5(0x1da)]);if(_0x1e4690!==_0xc7eb37[_0x195eb5(0x1d7)])throw CliErrors[_0x195eb5(0x1cf)](_0x195eb5(0x1e2)+_0xc7eb37[_0x195eb5(0x1eb)]);_0x394027[_0x195eb5(0x1d4)]({'path':_0xc7eb37['path'],'bytes':_0x4babb5[_0x195eb5(0x1da)]});}return normalizeLocalFiles(_0x394027);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e8e81,_0x26ee24){var _0x31eaa0=a124_0x4781,_0xe6e3aa=_0x3e8e81();while(!![]){try{var _0x11121b=-parseInt(_0x31eaa0(0x164))/0x1*(parseInt(_0x31eaa0(0x167))/0x2)+parseInt(_0x31eaa0(0x163))/0x3*(parseInt(_0x31eaa0(0x16c))/0x4)+parseInt(_0x31eaa0(0x166))/0x5*(parseInt(_0x31eaa0(0x169))/0x6)+-parseInt(_0x31eaa0(0x16d))/0x7+parseInt(_0x31eaa0(0x16b))/0x8+parseInt(_0x31eaa0(0x168))/0x9*(-parseInt(_0x31eaa0(0x165))/0xa)+-parseInt(_0x31eaa0(0x16a))/0xb*(parseInt(_0x31eaa0(0x16e))/0xc);if(_0x11121b===_0x26ee24)break;else _0xe6e3aa['push'](_0xe6e3aa['shift']());}catch(_0x140faa){_0xe6e3aa['push'](_0xe6e3aa['shift']());}}}(a124_0x2474,0xe8052));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';function a124_0x2474(){var _0x3c29c9=['723730gbLotE','182784wDPxRg','617307ylAnrG','685xwjPhH','850juikQt','105fwcXbi','3872SuUDsP','108729Tjqlzv','388416bFkswE','561uwogoz','7777952sGmylU','36ewSkXo'];a124_0x2474=function(){return _0x3c29c9;};return a124_0x2474();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a124_0x4781(_0x5fe373,_0x5ec242){_0x5fe373=_0x5fe373-0x163;var _0x2474a8=a124_0x2474();var _0x478155=_0x2474a8[_0x5fe373];return _0x478155;}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';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a125_0x4bf45d=a125_0x781c;function a125_0x781c(_0x3f0cb3,_0x3bf1ca){_0x3f0cb3=_0x3f0cb3-0x67;const _0x2f92f3=a125_0x2f92();let _0x781c26=_0x2f92f3[_0x3f0cb3];return _0x781c26;}(function(_0x38d315,_0xda0b25){const _0x24f255=a125_0x781c,_0x1bda5c=_0x38d315();while(!![]){try{const _0x50e059=parseInt(_0x24f255(0x86))/0x1*(parseInt(_0x24f255(0x67))/0x2)+parseInt(_0x24f255(0x77))/0x3+parseInt(_0x24f255(0x76))/0x4*(-parseInt(_0x24f255(0x81))/0x5)+parseInt(_0x24f255(0x80))/0x6*(parseInt(_0x24f255(0x6c))/0x7)+parseInt(_0x24f255(0x7f))/0x8+-parseInt(_0x24f255(0x8b))/0x9*(parseInt(_0x24f255(0x82))/0xa)+parseInt(_0x24f255(0x6f))/0xb*(-parseInt(_0x24f255(0x89))/0xc);if(_0x50e059===_0xda0b25)break;else _0x1bda5c['push'](_0x1bda5c['shift']());}catch(_0x412a59){_0x1bda5c['push'](_0x1bda5c['shift']());}}}(a125_0x2f92,0x19266));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a125_0x4bf45d(0x74));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a125_0x4bf45d(0x7b),a125_0x4bf45d(0x8a)),join('.claude',a125_0x4bf45d(0x8a))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x2bf544,_0x553369){const _0x45f4d8=a125_0x4bf45d;if(!existsSync(_0x2bf544))return{'kind':_0x45f4d8(0x7c)};let _0x219fdc;try{_0x219fdc=JSON['parse'](readFileSync(_0x2bf544,_0x45f4d8(0x88)));}catch(_0x11178c){return{'kind':_0x45f4d8(0x7d),'reason':_0x2bf544+_0x45f4d8(0x73)+_0x11178c['message']};}const _0x319295=_0x219fdc;if(typeof _0x319295?.[_0x45f4d8(0x84)]!==_0x45f4d8(0x7e)||!SUPPORTED_LOCK_VERSIONS[_0x45f4d8(0x68)](_0x319295['version']))return{'kind':_0x45f4d8(0x7d),'reason':_0x2bf544+_0x45f4d8(0x71)+String(_0x319295?.[_0x45f4d8(0x84)])};if(!_0x319295[_0x45f4d8(0x8a)]||typeof _0x319295[_0x45f4d8(0x8a)]!==_0x45f4d8(0x79))return{'kind':_0x45f4d8(0x7d),'reason':_0x2bf544+_0x45f4d8(0x7a)};return _0x319295[_0x45f4d8(0x8a)][_0x553369]?{'kind':_0x45f4d8(0x85)}:{'kind':_0x45f4d8(0x7c)};}export function resolveInstalledSkill(_0x24f19b,_0x1eaeee){const _0x39b1e8=a125_0x4bf45d,_0x55bf64=_0x1eaeee?.[_0x39b1e8(0x6a)]??homedir(),_0x2722cd=_0x1eaeee?.[_0x39b1e8(0x8d)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x39b1e8(0x75)](_0x6bf6a5=>join(_0x55bf64,_0x6bf6a5)),_0x2f6f2f=_0x1eaeee?.[_0x39b1e8(0x83)]??join(_0x55bf64,SKILL_LOCK_RELATIVE_PATH),_0x4007ff=_0x2722cd[_0x39b1e8(0x75)](_0x3517bd=>join(_0x3517bd,_0x24f19b,_0x39b1e8(0x6e))),_0x22b9d8=_0x4007ff[_0x39b1e8(0x78)](_0x3bcd99=>existsSync(_0x3bcd99));if(_0x22b9d8)return{'state':_0x39b1e8(0x70),'path':_0x22b9d8};const _0x108d46=readLockLookup(_0x2f6f2f,_0x24f19b);if(_0x108d46[_0x39b1e8(0x69)]===_0x39b1e8(0x7d))return{'state':_0x39b1e8(0x6b),'reason':_0x108d46[_0x39b1e8(0x8c)]};if(_0x108d46[_0x39b1e8(0x69)]===_0x39b1e8(0x85))return{'state':_0x39b1e8(0x6b),'reason':_0x2f6f2f+_0x39b1e8(0x72)+_0x24f19b+_0x39b1e8(0x6d)+('('+_0x4007ff[_0x39b1e8(0x87)](',\x20')+')')};return{'state':'absent','checked':_0x4007ff};}function a125_0x2f92(){const _0x4d272e=['314565HBoQbR','find','object','\x20has\x20no\x20skills\x20map','.agents','not-recorded','unusable','number','1185656dNtKlc','6HjqZOw','169485mKGIOV','10zvcSvS','lockFile','version','recorded','153ExYjcF','join','utf8','360vciFhO','skills','326421Azinqe','reason','globalSkillsDirs','1566wjYwxU','includes','kind','home','unverifiable','857171mtmRxd','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','SKILL.md','93258HbueeK','present','\x20uses\x20unsupported\x20version\x20','\x20records\x20\x22','\x20is\x20unreadable:\x20','.skill-lock.json','map','12GMnSKF'];a125_0x2f92=function(){return _0x4d272e;};return a125_0x2f92();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1fb507,_0x50d2fa){const _0x531b2e=a126_0x4e73,_0x568f8a=_0x1fb507();while(!![]){try{const _0x5887a6=parseInt(_0x531b2e(0x13d))/0x1+parseInt(_0x531b2e(0x13c))/0x2+-parseInt(_0x531b2e(0x13b))/0x3*(-parseInt(_0x531b2e(0x13a))/0x4)+-parseInt(_0x531b2e(0x138))/0x5+parseInt(_0x531b2e(0x139))/0x6+parseInt(_0x531b2e(0x13e))/0x7+-parseInt(_0x531b2e(0x137))/0x8;if(_0x5887a6===_0x50d2fa)break;else _0x568f8a['push'](_0x568f8a['shift']());}catch(_0x5d2a2e){_0x568f8a['push'](_0x568f8a['shift']());}}}(a126_0x1402,0xb6c92));function a126_0x1402(){const _0x1461e5=['7831692PMyzas','8RNErND','1778223UbWTLs','1164062qRBprC','83427oVxFxc','7285852IHiUwb','18715584Sldgbi','5544600DfbjrR'];a126_0x1402=function(){return _0x1461e5;};return a126_0x1402();}function a126_0x4e73(_0x501d93,_0x90beb1){_0x501d93=_0x501d93-0x137;const _0x14027d=a126_0x1402();let _0x4e7388=_0x14027d[_0x501d93];return _0x4e7388;}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 a127_0x40d31a=a127_0x5720;(function(_0x84e0dc,_0x8cb48){const _0x1d841f=a127_0x5720,_0x53e404=_0x84e0dc();while(!![]){try{const _0x547c54=parseInt(_0x1d841f(0x1f6))/0x1+parseInt(_0x1d841f(0x201))/0x2+-parseInt(_0x1d841f(0x205))/0x3*(-parseInt(_0x1d841f(0x21c))/0x4)+parseInt(_0x1d841f(0x217))/0x5*(parseInt(_0x1d841f(0x21d))/0x6)+parseInt(_0x1d841f(0x206))/0x7*(-parseInt(_0x1d841f(0x20b))/0x8)+-parseInt(_0x1d841f(0x20f))/0x9*(parseInt(_0x1d841f(0x1f2))/0xa)+-parseInt(_0x1d841f(0x1ed))/0xb*(parseInt(_0x1d841f(0x1f9))/0xc);if(_0x547c54===_0x8cb48)break;else _0x53e404['push'](_0x53e404['shift']());}catch(_0x70683a){_0x53e404['push'](_0x53e404['shift']());}}}(a127_0x42ea,0xe089a));import a127_0x260c2b from'winston';import a127_0x2dcea6 from'node:fs';import a127_0x2aa004 from'node:path';function a127_0x5720(_0x286e7b,_0x3c16b3){_0x286e7b=_0x286e7b-0x1eb;const _0x42ea4c=a127_0x42ea();let _0x5720c0=_0x42ea4c[_0x286e7b];return _0x5720c0;}function a127_0x42ea(){const _0x557098=['rawCommand','currentRawCommand','clear','split','logFileName','unknown','winstonLogger','2988392vXYLaj','setLogPath','initWinstonLogger','log','1293NJvjWM','4025847AfIbcg','format','transports','duration','logTask','16KPKgKt','dirname','combine','readLogs','9KEUAPk','Completed:\x20','green','Failed\x20to\x20clear\x20logs:','readFileSync','command','toISOString','success','730315ovXFiJ','blue','errors','writeFileSync','warn','4300XObNFE','54EFvTQN','getWinstonInstance','trim','stringify','info','parse','details','Starting:\x20','map','message','red','File','utf8','9691pzZvId','level','Failed:\x20','existsSync','Failed\x20to\x20read\x20logs:','3247630tvZCqw','now','yellow','error','1137470YuZmfl','timestamp','logFilePath','27444Rvogga'];a127_0x42ea=function(){return _0x557098;};return a127_0x42ea();}import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a127_0x40d31a(0x200)];[a127_0x40d31a(0x1f8)]='';[a127_0x40d31a(0x1fb)]='';constructor(){}['setRawCommand'](_0xe862ee){this['currentRawCommand']=_0xe862ee;}[a127_0x40d31a(0x202)](_0x5c972c){const _0xf8331=a127_0x40d31a;this['logFilePath']=a127_0x2aa004['join'](_0x5c972c,PRODUCT_CONFIG[_0xf8331(0x1fe)]),this[_0xf8331(0x200)]&&this[_0xf8331(0x200)][_0xf8331(0x1fc)](),this['initWinstonLogger']();}[a127_0x40d31a(0x203)](){const _0x385b8a=a127_0x40d31a,_0x4ea0da=a127_0x2aa004[_0x385b8a(0x20c)](this[_0x385b8a(0x1f8)]);!a127_0x2dcea6[_0x385b8a(0x1f0)](_0x4ea0da)&&a127_0x2dcea6['mkdirSync'](_0x4ea0da,{'recursive':!![]});const _0x4da191=a127_0x260c2b[_0x385b8a(0x207)][_0x385b8a(0x20d)](a127_0x260c2b[_0x385b8a(0x207)][_0x385b8a(0x1f7)](),a127_0x260c2b['format'][_0x385b8a(0x219)]({'stack':!![]}),a127_0x260c2b[_0x385b8a(0x207)]['printf'](_0x1d014f=>{const _0x576fc3=_0x385b8a,_0x56699b={'timestamp':_0x1d014f[_0x576fc3(0x1f7)]||new Date()[_0x576fc3(0x215)](),'level':_0x1d014f[_0x576fc3(0x1ee)]||_0x576fc3(0x221),'command':_0x1d014f[_0x576fc3(0x214)]||_0x576fc3(0x1ff),'rawCommand':_0x1d014f[_0x576fc3(0x1fa)]||this[_0x576fc3(0x1fb)]||undefined,'message':_0x1d014f[_0x576fc3(0x226)]||'','duration':_0x1d014f[_0x576fc3(0x209)]||undefined,'details':_0x1d014f[_0x576fc3(0x223)]||undefined};return JSON[_0x576fc3(0x220)](_0x56699b);}));this[_0x385b8a(0x200)]=a127_0x260c2b['createLogger']({'level':_0x385b8a(0x221),'format':_0x4da191,'transports':[new a127_0x260c2b[(_0x385b8a(0x208))][(_0x385b8a(0x1eb))]({'filename':this[_0x385b8a(0x1f8)],'level':_0x385b8a(0x221)})],'silent':![]}),a127_0x260c2b['addColors']({'success':_0x385b8a(0x211),'error':_0x385b8a(0x227),'warn':_0x385b8a(0x1f4),'info':_0x385b8a(0x218)});}[a127_0x40d31a(0x221)](_0x61fef6,_0x4e6b8a,_0xca3e8){const _0x32fd0c=a127_0x40d31a;if(!this[_0x32fd0c(0x1f8)]||!this[_0x32fd0c(0x200)])return;this[_0x32fd0c(0x200)][_0x32fd0c(0x221)](_0x4e6b8a,{'command':_0x61fef6,'details':_0xca3e8});}[a127_0x40d31a(0x216)](_0x673d29,_0x296561,_0x7aabea,_0x2afc63){const _0x16a5d1=a127_0x40d31a;if(!this[_0x16a5d1(0x1f8)]||!this['winstonLogger'])return;this[_0x16a5d1(0x200)][_0x16a5d1(0x204)](_0x16a5d1(0x221),_0x296561,{'level':_0x16a5d1(0x216),'command':_0x673d29,'duration':_0x7aabea,'details':_0x2afc63});}[a127_0x40d31a(0x1f5)](_0x3faa42,_0x54d96b,_0x5d90f5){const _0x2b0936=a127_0x40d31a;if(!this[_0x2b0936(0x1f8)]||!this[_0x2b0936(0x200)])return;this['winstonLogger']['error'](_0x54d96b,{'command':_0x3faa42,'details':_0x5d90f5});}[a127_0x40d31a(0x21b)](_0x273bb9,_0x5f0bb0,_0x1fc08c){const _0xc67524=a127_0x40d31a;if(!this[_0xc67524(0x1f8)]||!this[_0xc67524(0x200)])return;this[_0xc67524(0x200)][_0xc67524(0x21b)](_0x5f0bb0,{'command':_0x273bb9,'details':_0x1fc08c});}async[a127_0x40d31a(0x20a)](_0xabe637,_0x262200,_0x31ec6e){const _0x858df9=a127_0x40d31a,_0x463671=Date[_0x858df9(0x1f3)]();this['info'](_0xabe637,_0x858df9(0x224)+_0x262200);try{const _0x475f3d=await _0x31ec6e(),_0x502b4f=Date[_0x858df9(0x1f3)]()-_0x463671;return this[_0x858df9(0x216)](_0xabe637,_0x858df9(0x210)+_0x262200,_0x502b4f),_0x475f3d;}catch(_0x2f19ab){const _0x39fcab=Date['now']()-_0x463671;this[_0x858df9(0x1f5)](_0xabe637,_0x858df9(0x1ef)+_0x262200,{'error':_0x2f19ab instanceof Error?_0x2f19ab[_0x858df9(0x226)]:String(_0x2f19ab),'duration':_0x39fcab});throw _0x2f19ab;}}[a127_0x40d31a(0x20e)](){const _0x10b9d9=a127_0x40d31a;try{if(!a127_0x2dcea6['existsSync'](this[_0x10b9d9(0x1f8)]))return[];const _0x70bcf1=a127_0x2dcea6[_0x10b9d9(0x213)](this[_0x10b9d9(0x1f8)],'utf8');return _0x70bcf1[_0x10b9d9(0x1fd)](/\r?\n/)['filter'](_0x14f636=>_0x14f636[_0x10b9d9(0x21f)]())[_0x10b9d9(0x225)](_0x70e6e7=>JSON[_0x10b9d9(0x222)](_0x70e6e7));}catch(_0x1b0a0a){return console[_0x10b9d9(0x21b)](_0x10b9d9(0x1f1),_0x1b0a0a),[];}}['clearLogs'](){const _0x55c2fa=a127_0x40d31a;try{a127_0x2dcea6[_0x55c2fa(0x1f0)](this['logFilePath'])&&a127_0x2dcea6[_0x55c2fa(0x21a)](this[_0x55c2fa(0x1f8)],'',_0x55c2fa(0x1ec));}catch(_0x285eea){console[_0x55c2fa(0x21b)](_0x55c2fa(0x212),_0x285eea);}}[a127_0x40d31a(0x21e)](){const _0x409d36=a127_0x40d31a;return this[_0x409d36(0x200)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x40af7f,_0x405f48){const _0x31679c=a128_0x4d05,_0x3e6f43=_0x40af7f();while(!![]){try{const _0x55f810=-parseInt(_0x31679c(0xab))/0x1*(parseInt(_0x31679c(0xa7))/0x2)+-parseInt(_0x31679c(0x9b))/0x3+parseInt(_0x31679c(0x9d))/0x4+-parseInt(_0x31679c(0x9e))/0x5*(-parseInt(_0x31679c(0xa8))/0x6)+-parseInt(_0x31679c(0xa4))/0x7+-parseInt(_0x31679c(0x98))/0x8*(-parseInt(_0x31679c(0x97))/0x9)+parseInt(_0x31679c(0xa0))/0xa*(parseInt(_0x31679c(0xaa))/0xb);if(_0x55f810===_0x405f48)break;else _0x3e6f43['push'](_0x3e6f43['shift']());}catch(_0x38e02a){_0x3e6f43['push'](_0x3e6f43['shift']());}}}(a128_0x46a8,0x83c40));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number['MIN_SAFE_INTEGER']);function a128_0x4d05(_0x3eb9d9,_0x742753){_0x3eb9d9=_0x3eb9d9-0x97;const _0x46a8ca=a128_0x46a8();let _0x4d05a3=_0x46a8ca[_0x3eb9d9];return _0x4d05a3;}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x3856ff){const _0xbc13db=a128_0x4d05;if(_0x3856ff['includes']('.')||_0x3856ff[_0xbc13db(0xa6)]('e')||_0x3856ff[_0xbc13db(0xa6)]('E'))return![];const _0x414109=BigInt(_0x3856ff);return _0x414109>MAX_SAFE_INTEGER||_0x414109<MIN_SAFE_INTEGER;}function a128_0x46a8(){const _0x205cd9=['text','includes','64nZRljm','13092aOKjbM','undefined','11LfDmAi','5669BWwDzB','1925307tESiET','8jJNNod','json','slice','2680947HoGkQa','defineProperty','1960596TkXYuI','1710auXXYB','length','2357890OdAKaR','exec','parse','prototype','499352VsGLzX'];a128_0x46a8=function(){return _0x205cd9;};return a128_0x46a8();}function quoteUnsafeIntegerLiterals(_0x2d0d71){const _0x28bc2b=a128_0x4d05;let _0x4cdaa2='',_0x149c84=![],_0x32348a=![];for(let _0x4b1a21=0x0;_0x4b1a21<_0x2d0d71[_0x28bc2b(0x9f)];){const _0x1c89db=_0x2d0d71[_0x4b1a21];if(_0x149c84){_0x4cdaa2+=_0x1c89db,_0x4b1a21+=0x1;if(_0x32348a)_0x32348a=![];else{if(_0x1c89db==='\x5c')_0x32348a=!![];else _0x1c89db==='\x22'&&(_0x149c84=![]);}continue;}if(_0x1c89db==='\x22'){_0x149c84=!![],_0x4cdaa2+=_0x1c89db,_0x4b1a21+=0x1;continue;}if(_0x1c89db==='-'||_0x1c89db>='0'&&_0x1c89db<='9'){const _0x3d7875=JSON_NUMBER_PATTERN[_0x28bc2b(0xa1)](_0x2d0d71[_0x28bc2b(0x9a)](_0x4b1a21))?.[0x0];if(_0x3d7875){_0x4cdaa2+=isUnsafeIntegerLiteral(_0x3d7875)?'\x22'+_0x3d7875+'\x22':_0x3d7875,_0x4b1a21+=_0x3d7875[_0x28bc2b(0x9f)];continue;}}_0x4cdaa2+=_0x1c89db,_0x4b1a21+=0x1;}return _0x4cdaa2;}export function parseLosslessJson(_0x51838){const _0x4e2aaa=a128_0x4d05;return JSON[_0x4e2aaa(0xa2)](quoteUnsafeIntegerLiterals(_0x51838));}export function installLosslessJsonResponseParser(){const _0x48e136=a128_0x4d05;if(typeof Response===_0x48e136(0xa9))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x48e136(0xa3)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,'json'),Object[_0x48e136(0x9c)](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x3f4576(){const _0x5da281=_0x48e136;return parseLosslessJson(await this[_0x5da281(0xa5)]());}}),restoreResponseJsonParser=()=>{const _0x1b05a8=_0x48e136;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x1b05a8(0x9c)](responseJsonPrototype,_0x1b05a8(0x99),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x1b05a8(0x99)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|