@lovrabet/lovrabet-cli 2.2.3-beta.1 → 2.2.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -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/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/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 +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x49213c,_0x32e553){const _0x466ff1=a116_0x5bfe,_0x138f09=_0x49213c();while(!![]){try{const _0x16f669=parseInt(_0x466ff1(0x194))/0x1+-parseInt(_0x466ff1(0x19c))/0x2*(-parseInt(_0x466ff1(0x193))/0x3)+-parseInt(_0x466ff1(0x192))/0x4+parseInt(_0x466ff1(0x1a3))/0x5+parseInt(_0x466ff1(0x1ab))/0x6*(parseInt(_0x466ff1(0x195))/0x7)+-parseInt(_0x466ff1(0x196))/0x8+parseInt(_0x466ff1(0x197))/0x9*(-parseInt(_0x466ff1(0x184))/0xa);if(_0x16f669===_0x32e553)break;else _0x138f09['push'](_0x138f09['shift']());}catch(_0x125545){_0x138f09['push'](_0x138f09['shift']());}}}(a116_0x4d6b,0x6a2a8));import{existsSync,readdirSync}from'node:fs';function a116_0x5bfe(_0x173725,_0x5c17ac){_0x173725=_0x173725-0x182;const _0x4d6bf9=a116_0x4d6b();let _0x5bfe70=_0x4d6bf9[_0x173725];return _0x5bfe70;}import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x28b26f,_0x283dcf,_0x3e4f76={}){const _0x2c3db7=a116_0x5bfe,_0x1c06c8=safePathSegment(_0x28b26f[_0x2c3db7(0x1a4)],_0x2c3db7(0x1a4));if(_0x283dcf[_0x2c3db7(0x1a4)]!==_0x1c06c8)throw CliErrors['validation']('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x283dcf['appCode']+_0x2c3db7(0x19d)+_0x1c06c8);const _0x5c5c2e=normalizeRuntimeSkillScopes(_0x28b26f[_0x2c3db7(0x18f)]),_0x4ab192=new Set(_0x5c5c2e),_0x20ea5f=_0x28b26f[_0x2c3db7(0x190)]?.[_0x2c3db7(0x199)](),_0xceaba0=new Map(),_0x1112c6=resolve(getRuntimeSkillCacheRoot(_0x28b26f[_0x2c3db7(0x187)],_0x28b26f[_0x2c3db7(0x1a7)],_0x3e4f76),_0x1c06c8);for(const _0x5d1066 of _0x5c5c2e){for(const _0x2ba8e1 of localSkillEntryDirs(resolve(_0x1112c6,_0x5d1066))){collectLocalRuntimeSkill(_0xceaba0,_0x2ba8e1,{'appCode':_0x1c06c8,'scopes':_0x4ab192,'code':_0x20ea5f,'source':_0x2c3db7(0x198)});}}for(const _0x501356 of _0x283dcf[_0x2c3db7(0x18a)]){for(const _0x22c1f7 of localSkillLinkCandidates(_0x501356,_0x283dcf,_0x4ab192)){collectLocalRuntimeSkill(_0xceaba0,_0x22c1f7,{'appCode':_0x1c06c8,'scopes':_0x4ab192,'code':_0x20ea5f,'source':'link','linkedPath':_0x22c1f7});}}return Array[_0x2c3db7(0x182)](_0xceaba0[_0x2c3db7(0x189)]())[_0x2c3db7(0x19b)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2ac469){const _0x3314ba=a116_0x5bfe;if(!existsSync(_0x2ac469))return[];return readdirSync(_0x2ac469,{'withFileTypes':!![]})[_0x3314ba(0x183)](_0x28de6d=>_0x28de6d[_0x3314ba(0x1a0)]()||_0x28de6d['isSymbolicLink']())[_0x3314ba(0x1a1)](_0x26662e=>resolve(_0x2ac469,_0x26662e[_0x3314ba(0x1a5)]));}function localSkillLinkCandidates(_0x55a566,_0x23ca2d,_0x468686){const _0x4fd48b=a116_0x5bfe;if(!existsSync(_0x55a566))return[];const _0x134733=_0x23ca2d[_0x4fd48b(0x1a4)]+'--';return readdirSync(_0x55a566,{'withFileTypes':!![]})['filter'](_0x6cc611=>_0x6cc611['isDirectory']()||_0x6cc611[_0x4fd48b(0x18e)]())[_0x4fd48b(0x183)](_0x4835c4=>_0x23ca2d[_0x4fd48b(0x19f)]==='project'||_0x4835c4[_0x4fd48b(0x1a5)][_0x4fd48b(0x19a)](_0x134733)||_0x468686[_0x4fd48b(0x18d)](_0x4fd48b(0x1a6)))[_0x4fd48b(0x1a1)](_0x5ed2fa=>resolve(_0x55a566,_0x5ed2fa['name']));}function a116_0x4d6b(){const _0x414f5d=['startsWith','sort','627244ojukZa','\x20!=\x20','linkedPaths','scope','isDirectory','map','linkedPath','297500Tqsose','appCode','name','builtin','accessKey','includes','skillCode','metadataPath','71088LgIJLm','from','filter','53140FKeGQh','localeCompare','dir','env','set','values','skillRoots','tags','source','has','isSymbolicLink','scopes','code','get','621000MwcOXY','3IWYRyG','283491FzERRO','378oqcPdB','1739288cDgfBH','828fSDBHH','cache','trim'];a116_0x4d6b=function(){return _0x414f5d;};return a116_0x4d6b();}function collectLocalRuntimeSkill(_0x2e6ce9,_0x24da2d,_0x452dde){const _0x305dae=a116_0x5bfe,_0x56a472=resolve(_0x24da2d,METADATA_FILE),_0x5ed095=readMetadataIfPresent(_0x56a472);if(!_0x5ed095)return;if(_0x5ed095[_0x305dae(0x1a4)]!==_0x452dde[_0x305dae(0x1a4)])return;if(!isRuntimeSkillScope(_0x5ed095[_0x305dae(0x19f)])||!_0x452dde[_0x305dae(0x18f)][_0x305dae(0x18d)](_0x5ed095['scope']))return;const _0x2281ab=_0x5ed095[_0x305dae(0x1a9)]?.[_0x305dae(0x199)]();if(!_0x2281ab)return;if(_0x452dde[_0x305dae(0x190)]&&_0x2281ab!==_0x452dde[_0x305dae(0x190)])return;const _0x5cf14b=_0x5ed095[_0x305dae(0x19f)]+':'+_0x2281ab,_0x14c4f6=_0x452dde[_0x305dae(0x1a2)]?[_0x452dde[_0x305dae(0x1a2)]]:[],_0x4667b4=_0x2e6ce9[_0x305dae(0x191)](_0x5cf14b);if(_0x4667b4){_0x452dde[_0x305dae(0x18c)]===_0x305dae(0x198)&&(_0x4667b4[_0x305dae(0x186)]=_0x24da2d,_0x4667b4['cacheDir']=_0x24da2d,_0x4667b4['skillMdPath']=resolve(_0x24da2d,SKILL_FILE),_0x4667b4[_0x305dae(0x1aa)]=_0x56a472);for(const _0x20318e of _0x14c4f6){!_0x4667b4['linkedPaths'][_0x305dae(0x1a8)](_0x20318e)&&_0x4667b4[_0x305dae(0x19e)]['push'](_0x20318e);}_0x4667b4[_0x305dae(0x19e)][_0x305dae(0x19b)]();return;}_0x2e6ce9[_0x305dae(0x188)](_0x5cf14b,{..._0x5ed095,'tags':Array['isArray'](_0x5ed095[_0x305dae(0x18b)])?_0x5ed095[_0x305dae(0x18b)]:[],'scope':_0x5ed095[_0x305dae(0x19f)],'source':'local','dir':_0x24da2d,'cacheDir':_0x452dde[_0x305dae(0x18c)]==='cache'?_0x24da2d:undefined,'skillMdPath':resolve(_0x24da2d,SKILL_FILE),'metadataPath':_0x56a472,'linkedPaths':_0x14c4f6});}function compareLocalRuntimeSkills(_0x3137c3,_0x204216){const _0xb838d7=a116_0x5bfe,_0x5a8e15={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5a8e15[_0x3137c3['scope']]-_0x5a8e15[_0x204216[_0xb838d7(0x19f)]]||_0x3137c3[_0xb838d7(0x1a9)][_0xb838d7(0x185)](_0x204216[_0xb838d7(0x1a9)])||_0x3137c3[_0xb838d7(0x186)][_0xb838d7(0x185)](_0x204216[_0xb838d7(0x186)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x247886,_0x26363b){const _0x3aea77=a117_0x851b,_0x2c2725=_0x247886();while(!![]){try{const _0xcb319a=-parseInt(_0x3aea77(0x11c))/0x1*(-parseInt(_0x3aea77(0x114))/0x2)+parseInt(_0x3aea77(0x138))/0x3+parseInt(_0x3aea77(0x12d))/0x4+parseInt(_0x3aea77(0x13a))/0x5+parseInt(_0x3aea77(0x11f))/0x6+-parseInt(_0x3aea77(0x130))/0x7+-parseInt(_0x3aea77(0x139))/0x8;if(_0xcb319a===_0x26363b)break;else _0x2c2725['push'](_0x2c2725['shift']());}catch(_0x5b0960){_0x2c2725['push'](_0x2c2725['shift']());}}}(a117_0x1a85,0x3ace9));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(_0x2dc873){const _0x2dacf5=a117_0x851b;return _0x2dc873['bytes']??Buffer['from'](_0x2dc873[_0x2dacf5(0x12e)]??'','utf8');}export function fileText(_0x4da8bd){const _0x1fe6a1=a117_0x851b;return fileContent(_0x4da8bd)[_0x1fe6a1(0x128)](_0x1fe6a1(0x127));}export function normalizeLocalFiles(_0x4d4711){const _0x453007=a117_0x851b;if(!Array[_0x453007(0x11a)](_0x4d4711)||_0x4d4711[_0x453007(0x137)]===0x0)return[];const _0x59f124=new Map();for(const _0x54110a of _0x4d4711){if(!_0x54110a||typeof _0x54110a!==_0x453007(0x12f)||typeof _0x54110a[_0x453007(0x12b)]!==_0x453007(0x134))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x2bafad=normalizeSkillRelativePath(_0x54110a[_0x453007(0x12b)]);if(_0x59f124[_0x453007(0x125)](_0x2bafad))throw CliErrors[_0x453007(0x119)](_0x453007(0x115)+_0x2bafad);if(_0x54110a['bytes']!==undefined&&!Buffer['isBuffer'](_0x54110a['bytes']))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x2bafad);if(_0x54110a[_0x453007(0x133)]===undefined&&typeof _0x54110a[_0x453007(0x12e)]!==_0x453007(0x134))throw CliErrors[_0x453007(0x119)]('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x2bafad);const _0x2cb502=fileContent(_0x54110a);_0x59f124[_0x453007(0x123)](_0x2bafad,{'path':_0x2bafad,'bytes':_0x2cb502});}return Array[_0x453007(0x122)](_0x59f124[_0x453007(0x11e)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x3fca0c){const _0x34cdb6=a117_0x851b;if(!Array[_0x34cdb6(0x11a)](_0x3fca0c)||_0x3fca0c[_0x34cdb6(0x137)]===0x0)return[];const _0x3082da=new Map();for(const _0x42b1f1 of _0x3fca0c){if(!_0x42b1f1||typeof _0x42b1f1!=='object'||typeof _0x42b1f1[_0x34cdb6(0x12b)]!==_0x34cdb6(0x134))throw CliErrors[_0x34cdb6(0x119)](_0x34cdb6(0x117));const _0x4de87c=normalizeSkillRelativePath(_0x42b1f1[_0x34cdb6(0x12b)]);if(_0x3082da[_0x34cdb6(0x125)](_0x4de87c))throw CliErrors[_0x34cdb6(0x119)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x4de87c);if(!isSha256Hex(_0x42b1f1[_0x34cdb6(0x13b)]))throw CliErrors[_0x34cdb6(0x119)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x4de87c);if(!Number['isSafeInteger'](_0x42b1f1[_0x34cdb6(0x132)])||_0x42b1f1[_0x34cdb6(0x132)]<0x0)throw CliErrors['validation']('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x4de87c);_0x3082da['set'](_0x4de87c,{'path':_0x4de87c,'sha256':_0x42b1f1[_0x34cdb6(0x13b)][_0x34cdb6(0x118)](),'size':_0x42b1f1[_0x34cdb6(0x132)]});}return Array['from'](_0x3082da['values']())[_0x34cdb6(0x136)](compareSkillFiles);}export function scanSkillDirectory(_0x4d3ea2,_0xa7f9a4={}){const _0x4e681d=a117_0x851b,_0x38a5a4=realpathSync(_0x4d3ea2),_0x2e3d6f=canonicalExcludedFilePaths(_0xa7f9a4[_0x4e681d(0x116)]),_0x2cfa0d=[];function _0x53d416(_0x52612d){const _0x3d8f7b=_0x4e681d,_0x40e88c=readdirSync(_0x52612d,{'withFileTypes':!![]})['sort']((_0xd68e34,_0x646bfd)=>_0xd68e34['name'][_0x3d8f7b(0x129)](_0x646bfd[_0x3d8f7b(0x120)]));for(const _0x53507c of _0x40e88c){if(_0x53507c[_0x3d8f7b(0x113)]()&&IGNORED_DIR_NAMES[_0x3d8f7b(0x125)](_0x53507c[_0x3d8f7b(0x120)]))continue;if(IGNORED_FILE_NAMES[_0x3d8f7b(0x125)](_0x53507c[_0x3d8f7b(0x120)]))continue;const _0x2e715d=resolve(_0x52612d,_0x53507c[_0x3d8f7b(0x120)]);if(isExcludedFilePath(_0x2e715d,_0x2e3d6f))continue;if(_0x53507c[_0x3d8f7b(0x12a)]())throw CliErrors[_0x3d8f7b(0x119)](_0x3d8f7b(0x124)+_0x2e715d);const _0x5b386e=toPosixPath(relative(_0x38a5a4,_0x2e715d));if(_0x53507c[_0x3d8f7b(0x113)]()){_0x53d416(_0x2e715d);continue;}if(!_0x53507c['isFile']())continue;validateSkillRelativePath(_0x5b386e);const _0x4b81d4=readFileSync(_0x2e715d);_0x2cfa0d[_0x3d8f7b(0x11d)]({'path':_0x5b386e,'bytes':_0x4b81d4});}}return _0x53d416(_0x38a5a4),normalizeLocalFiles(_0x2cfa0d);}function a117_0x1a85(){const _0x37b38e=['isDirectory','286tXNmGx','Duplicate\x20Skill\x20file\x20path:\x20','excludedFilePaths','Skill\x20file\x20path\x20must\x20be\x20text.','toLowerCase','validation','isArray','Unsafe\x20Skill\x20file\x20path:\x20','1941OTjErl','push','values','1723692NTKtci','name','startsWith','from','set','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','has','includes','utf8','toString','localeCompare','isSymbolicLink','path','test','895816XewCPA','content','object','3158099FwRPxS','trim','size','bytes','string','compare','sort','length','78429FPnXbU','4746144qqQRrq','2351780XbSAEo','sha256','add'];a117_0x1a85=function(){return _0x37b38e;};return a117_0x1a85();}function canonicalExcludedFilePaths(_0x48511f){const _0xaac9e3=a117_0x851b,_0x56658a=new Set();for(const _0x56773d of _0x48511f??[]){const _0x16ea4b=resolve(_0x56773d);_0x56658a['add'](_0x16ea4b);try{_0x56658a[_0xaac9e3(0x112)](realpathSync(_0x16ea4b));}catch{}}return _0x56658a;}function isExcludedFilePath(_0x2b3d23,_0x5e15b1){const _0xda1d4f=a117_0x851b;if(_0x5e15b1[_0xda1d4f(0x125)](_0x2b3d23))return!![];if(_0x5e15b1[_0xda1d4f(0x132)]===0x0)return![];try{return _0x5e15b1['has'](realpathSync(_0x2b3d23));}catch{return![];}}export function compareSkillFiles(_0x1cffe1,_0x538d4f){const _0x3bbf1d=a117_0x851b;if(_0x1cffe1[_0x3bbf1d(0x12b)]===SKILL_FILE)return _0x538d4f['path']===SKILL_FILE?0x0:-0x1;if(_0x538d4f[_0x3bbf1d(0x12b)]===SKILL_FILE)return 0x1;return Buffer[_0x3bbf1d(0x135)](Buffer[_0x3bbf1d(0x122)](_0x1cffe1[_0x3bbf1d(0x12b)],'utf8'),Buffer['from'](_0x538d4f[_0x3bbf1d(0x12b)],_0x3bbf1d(0x127)));}export function normalizeSkillRelativePath(_0x1b8758){const _0x209131=a117_0x851b,_0x59254e=toPosixPath(_0x1b8758[_0x209131(0x131)]());return validateSkillRelativePath(_0x59254e),_0x59254e;}export function validateSkillRelativePath(_0x3dc2a3){const _0x34ca70=a117_0x851b;if(!_0x3dc2a3||_0x3dc2a3[_0x34ca70(0x121)]('/')||_0x3dc2a3[_0x34ca70(0x126)]('//'))throw CliErrors[_0x34ca70(0x119)](_0x34ca70(0x11b)+_0x3dc2a3);for(const _0x1b48f1 of _0x3dc2a3['split']('/')){if(!_0x1b48f1||_0x1b48f1==='.'||_0x1b48f1==='..')throw CliErrors[_0x34ca70(0x119)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x3dc2a3);}}function a117_0x851b(_0x33d937,_0x403d7f){_0x33d937=_0x33d937-0x112;const _0x1a85f9=a117_0x1a85();let _0x851b75=_0x1a85f9[_0x33d937];return _0x851b75;}export function toPosixPath(_0x1eead9){return _0x1eead9['replace'](/\\/g,'/');}export function isSha256Hex(_0x5b3543){const _0x3440db=a117_0x851b;return typeof _0x5b3543===_0x3440db(0x134)&&/^[a-fA-F0-9]{64}$/[_0x3440db(0x12c)](_0x5b3543);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59c53c,_0x1d685b){const _0x3bc9ba=a118_0x2c54,_0x2a2fa5=_0x59c53c();while(!![]){try{const _0x3a2a93=-parseInt(_0x3bc9ba(0xef))/0x1+-parseInt(_0x3bc9ba(0x115))/0x2+parseInt(_0x3bc9ba(0xf0))/0x3*(parseInt(_0x3bc9ba(0xf8))/0x4)+parseInt(_0x3bc9ba(0xf5))/0x5*(-parseInt(_0x3bc9ba(0xe5))/0x6)+parseInt(_0x3bc9ba(0xfe))/0x7+-parseInt(_0x3bc9ba(0xee))/0x8+parseInt(_0x3bc9ba(0xed))/0x9*(parseInt(_0x3bc9ba(0xff))/0xa);if(_0x3a2a93===_0x1d685b)break;else _0x2a2fa5['push'](_0x2a2fa5['shift']());}catch(_0x3f9fa9){_0x2a2fa5['push'](_0x2a2fa5['shift']());}}}(a118_0x3227,0xba021));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(_0x19a30e,_0x4d4873,_0x25b3ac){const _0x315ccc=a118_0x2c54,_0x4cdd76=requireSkillCode(_0x19a30e),_0x424dcc=requirePackageBytes(_0x4cdd76,_0x25b3ac[_0x315ccc(0xe4)]),_0xd06cad=extractDownloadedPackage(_0x424dcc),_0x305ae8=_0xd06cad[_0x315ccc(0x109)](_0x2d4254=>_0x2d4254['path']===SKILL_FILE);if(!_0x305ae8)throw CliErrors[_0x315ccc(0xeb)](_0x315ccc(0x110)+SKILL_FILE+':\x20'+_0x4cdd76);const _0x2ae81b=withMaterializedSkillFrontmatter(_0xd06cad,_0x19a30e,_0x4cdd76),_0x22b9c3=_0x2ae81b['find'](_0x1b5248=>_0x1b5248['path']===SKILL_FILE),_0x1cd86d=fileText(_0x22b9c3),_0x35174b=getRuntimeSkillDir(_0x25b3ac[_0x315ccc(0x113)],_0x25b3ac[_0x315ccc(0x104)],_0x25b3ac[_0x315ccc(0xfc)],_0x4d4873,_0x4cdd76,_0x25b3ac[_0x315ccc(0xfd)]),_0x37508a=resolve(_0x35174b,SKILL_FILE),_0xc2318b=resolve(_0x35174b,METADATA_FILE),_0x49e724=contentHash(_0x1cd86d),_0x2eaede=readMetadataIfPresent(_0xc2318b)?.[_0x315ccc(0xf1)];ensurePulledFilesCanBeOverwritten(_0x35174b,_0xc2318b,_0x2ae81b,_0x25b3ac[_0x315ccc(0xe6)]===!![]),mkdirSync(_0x35174b,{'recursive':!![],'mode':0x1c0});const _0x1dd87f=existsSync(_0x37508a)?readFileSync(_0x37508a,_0x315ccc(0x103)):undefined;return materializeFiles(_0x35174b,_0x2ae81b),removeStaleManagedFiles(_0x35174b,_0x2eaede,_0x2ae81b),writeJsonAtomic(_0xc2318b,buildMetadata(_0x19a30e,_0x4d4873,_0x25b3ac[_0x315ccc(0xfc)],_0x49e724,_0x25b3ac[_0x315ccc(0x105)],_0x2ae81b,_0x424dcc)),{'skill':_0x19a30e,'scope':_0x4d4873,'dir':_0x35174b,'skillMdPath':_0x37508a,'metadataPath':_0xc2318b,'contentHash':_0x49e724,'changed':_0x1dd87f!==_0x1cd86d};}function withMaterializedSkillFrontmatter(_0x4ae217,_0x564277,_0x1a9511){const _0x2968c4=a118_0x2c54,_0x2a45e0=skillDisplayName(_0x564277,_0x1a9511),_0x13429a=_0x564277['description']?.[_0x2968c4(0x10c)]()||_0x2a45e0||_0x1a9511;return normalizeLocalFiles(_0x4ae217)[_0x2968c4(0xe8)](_0x212030=>{const _0x301480=fileText(_0x212030);if(_0x212030['path']!==SKILL_FILE)return _0x212030;if(hasYamlFrontmatter(_0x301480))return{'path':_0x212030['path'],'content':withSyncedDisplayName(_0x301480,_0x2a45e0)};return{'path':_0x212030['path'],'content':prependSkillFrontmatter(_0x301480,{'name':_0x1a9511,'displayName':_0x2a45e0,'description':_0x13429a})};});}function hasYamlFrontmatter(_0x3a32be){const _0x3de6e7=a118_0x2c54;return/^\uFEFF?---\s*\r?\n/[_0x3de6e7(0x118)](_0x3a32be);}function prependSkillFrontmatter(_0x2527a6,_0x227f05){const _0x3beb78=a118_0x2c54,_0x171870=_0x2527a6['replace'](/^\uFEFF/,'');return['---',_0x3beb78(0x107)+yamlString(_0x227f05[_0x3beb78(0xf4)]),_0x227f05[_0x3beb78(0x112)]?'displayName:\x20'+yamlString(_0x227f05['displayName']):undefined,_0x3beb78(0xe7)+yamlString(_0x227f05['description']),_0x3beb78(0x108),'',_0x171870]['filter'](_0x3f3490=>_0x3f3490!==undefined)['join']('\x0a');}function yamlString(_0x234fd0){const _0x573132=a118_0x2c54;return JSON[_0x573132(0xe9)](_0x234fd0[_0x573132(0x10b)](/\r/g,'')[_0x573132(0x10c)]());}function skillDisplayName(_0x1f90de,_0x4512f7){const _0x183018=a118_0x2c54,_0x2a6558=_0x1f90de[_0x183018(0xea)]?.['trim']();return _0x2a6558||_0x4512f7;}function withSyncedDisplayName(_0x20a5c7,_0x5d2437){const _0x451892=a118_0x2c54,_0x5641c1=_0x20a5c7[_0x451892(0xfa)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5641c1)return _0x20a5c7;const _0x569fdc=_0x5641c1[0x1]??'',_0x1ff457=_0x5641c1[0x2]??'',_0x2deb52=parseDocument(_0x1ff457);if(_0x2deb52[_0x451892(0xf7)][_0x451892(0x116)]>0x0||!isMap(_0x2deb52['contents']))return _0x20a5c7;if(_0x5d2437)_0x2deb52['set'](_0x451892(0x112),_0x5d2437);else{if(_0x2deb52[_0x451892(0xec)](_0x451892(0x112)))_0x2deb52[_0x451892(0xf2)](_0x451892(0x112));else return _0x20a5c7;}forceBlockCollections(_0x2deb52['contents']);const _0x860ab1=_0x2deb52['toString']({'lineWidth':0x0})[_0x451892(0x10d)](),_0x474be1=_0x20a5c7[_0x451892(0xfb)](_0x5641c1[0x0][_0x451892(0x116)])[_0x451892(0x10b)](/^\r?\n/,'');return _0x569fdc+_0x451892(0x10e)+_0x860ab1+_0x451892(0xf3)+_0x474be1;}function a118_0x3227(){const _0x511610=['2202102tBcDjY','11444056MrfmbB','813603uWnNZq','3bvUNCv','fileHashes','delete','\x0a---\x0a\x0a','name','254455iYlMAK','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','errors','5175908nywydJ','keys','match','slice','appCode','paths','10084662WHcDjo','70QxFcsy','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','.\x20Changed\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','utf8','accessKey','pulledAt','contentHash','name:\x20','---','find','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','replace','trim','trimEnd','---\x0a','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20','path','displayName','env','isFile','1457832AKzyLZ','length','Managed\x20file\x20was\x20removed\x20locally:\x20','test','packageBytes','84ySZOLC','force','description:\x20','map','stringify','skillName','validation','has'];a118_0x3227=function(){return _0x511610;};return a118_0x3227();}function a118_0x2c54(_0x28bbd0,_0x349f0e){_0x28bbd0=_0x28bbd0-0xe4;const _0x322745=a118_0x3227();let _0x2c5497=_0x322745[_0x28bbd0];return _0x2c5497;}function forceBlockCollections(_0x2d2c91){if(!isNode(_0x2d2c91))return;visit(_0x2d2c91,(_0xf59e26,_0x9645a0)=>{isCollection(_0x9645a0)&&(_0x9645a0['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2c0557,_0x11f79e,_0x190a49,_0x4350bb){const _0x1c5678=a118_0x2c54;if(_0x4350bb||!existsSync(_0x11f79e))return;const _0x1fe286=readMetadataIfPresent(_0x11f79e);if(!_0x1fe286)return;const _0xc82402=_0x1fe286[_0x1c5678(0xf1)]&&Object[_0x1c5678(0xf9)](_0x1fe286['fileHashes'])[_0x1c5678(0x116)]>0x0?_0x1fe286[_0x1c5678(0xf1)]:undefined;if(_0xc82402)for(const [_0x234ed5,_0x4459cb]of Object['entries'](_0xc82402)){const _0x341d87=resolveManagedFilePath(_0x2c0557,_0x234ed5);if(!existsSync(_0x341d87))throw CliErrors['validation'](_0x1c5678(0x10a)+_0x2c0557,_0x1c5678(0x117)+_0x234ed5);const _0x4bcbff=lstatSync(_0x341d87);if(!_0x4bcbff[_0x1c5678(0x114)]())throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10a)+_0x2c0557,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x234ed5);const _0x3610e2=bufferSha256(readFileSync(_0x341d87));if(_0x3610e2!==_0x4459cb)throw CliErrors['validation'](_0x1c5678(0x10a)+_0x2c0557+_0x1c5678(0x101)+_0x234ed5,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x234ed5);}else{const _0x539d81=resolve(_0x2c0557,SKILL_FILE);if(existsSync(_0x539d81)&&_0x1fe286[_0x1c5678(0x106)]){const _0x373c76=contentHash(readFileSync(_0x539d81,'utf8'));if(_0x373c76!==_0x1fe286[_0x1c5678(0x106)])throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10f)+_0x539d81,_0x1c5678(0x102));}}for(const _0x1d9c9f of normalizeLocalFiles(_0x190a49)){if(_0xc82402?.[_0x1d9c9f[_0x1c5678(0x111)]])continue;if(!_0xc82402&&_0x1d9c9f['path']===SKILL_FILE)continue;const _0x4ba829=resolveManagedFilePath(_0x2c0557,_0x1d9c9f[_0x1c5678(0x111)]);if(!existsSync(_0x4ba829))continue;const _0x1f7c4e=lstatSync(_0x4ba829);if(!_0x1f7c4e[_0x1c5678(0x114)]())throw CliErrors[_0x1c5678(0xeb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2c0557,_0x1c5678(0x100)+_0x1d9c9f[_0x1c5678(0x111)]);const _0x4b4ede=bufferSha256(readFileSync(_0x4ba829));if(_0x4b4ede!==fileHash(_0x1d9c9f))throw CliErrors[_0x1c5678(0xeb)](_0x1c5678(0x10a)+_0x2c0557,_0x1c5678(0xf6)+_0x1d9c9f[_0x1c5678(0x111)]);}}function materializeFiles(_0x311756,_0x2d8319){const _0x41a48a=a118_0x2c54;for(const _0x5ea83a of normalizeLocalFiles(_0x2d8319)){const _0x3ba8ac=resolveManagedFilePath(_0x311756,_0x5ea83a[_0x41a48a(0x111)]);mkdirSync(dirname(_0x3ba8ac),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3ba8ac,fileContent(_0x5ea83a),0x180);}}function removeStaleManagedFiles(_0x2c2d58,_0xe25c78,_0xa20fa4){const _0x55f9f7=a118_0x2c54;if(!_0xe25c78)return;const _0x14693c=new Set(normalizeLocalFiles(_0xa20fa4)[_0x55f9f7(0xe8)](_0x39b94d=>_0x39b94d[_0x55f9f7(0x111)]));for(const _0x4815bd of Object[_0x55f9f7(0xf9)](_0xe25c78)){if(_0x14693c[_0x55f9f7(0xec)](_0x4815bd))continue;const _0x456c8c=resolveManagedFilePath(_0x2c2d58,_0x4815bd);existsSync(_0x456c8c)&&lstatSync(_0x456c8c)[_0x55f9f7(0x114)]()&&rmSync(_0x456c8c,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x382cef,_0x449b25){const _0x58326e=a119_0x50d0,_0x55c829=_0x382cef();while(!![]){try{const _0x1d467a=-parseInt(_0x58326e(0x150))/0x1*(-parseInt(_0x58326e(0x155))/0x2)+parseInt(_0x58326e(0x152))/0x3*(parseInt(_0x58326e(0x143))/0x4)+parseInt(_0x58326e(0x134))/0x5+parseInt(_0x58326e(0x140))/0x6*(parseInt(_0x58326e(0x157))/0x7)+parseInt(_0x58326e(0x154))/0x8*(-parseInt(_0x58326e(0x151))/0x9)+parseInt(_0x58326e(0x148))/0xa*(-parseInt(_0x58326e(0x13d))/0xb)+parseInt(_0x58326e(0x158))/0xc;if(_0x1d467a===_0x449b25)break;else _0x55c829['push'](_0x55c829['shift']());}catch(_0xbe26d3){_0x55c829['push'](_0x55c829['shift']());}}}(a119_0x132f,0x99ed6));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a119_0x50d0(_0x57cbbf,_0xc2c5c9){_0x57cbbf=_0x57cbbf-0x134;const _0x132f61=a119_0x132f();let _0x50d072=_0x132f61[_0x57cbbf];return _0x50d072;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4f27a8,_0x359120,_0x1fe473,_0x1504bb,_0x1cbae0,_0xb0daec,_0xe2c20c){const _0x427028=a119_0x50d0,_0x5032b4=_0xb0daec?normalizeLocalFiles(_0xb0daec):[],_0x478f19=!_0xe2c20c&&_0x5032b4['length']>0x0?buildSkillPackage(_0x5032b4):undefined,_0x3c0c4b=_0xe2c20c?bufferSha256(_0xe2c20c):_0x478f19?.[_0x427028(0x147)][_0x427028(0x13f)],_0xf680fe=_0xe2c20c?.['length']??_0x478f19?.['manifest'][_0x427028(0x156)],_0x55c762=_0x5032b4[_0x427028(0x149)]>0x0?Object[_0x427028(0x14b)](_0x5032b4[_0x427028(0x136)](_0xcaecc3=>[_0xcaecc3[_0x427028(0x14a)],fileHash(_0xcaecc3)])):undefined;return{'schemaVersion':_0x5032b4[_0x427028(0x149)]>0x0?0x2:0x1,'id':_0x4f27a8['id'],'appCode':_0x1fe473,'skillCode':requireSkillCode(_0x4f27a8),'skillName':_0x4f27a8['skillName'],'description':_0x4f27a8[_0x427028(0x13c)],'scope':_0x359120,'readonly':_0x359120!==_0x427028(0x14e)||_0x4f27a8[_0x427028(0x14d)]===!![],'tenantCode':_0x4f27a8['tenantCode'],'userId':_0x4f27a8['userId'],'version':_0x4f27a8[_0x427028(0x14f)],'status':_0x4f27a8['status'],'tags':Array['isArray'](_0x4f27a8[_0x427028(0x141)])?_0x4f27a8[_0x427028(0x141)]:[],'hasUpstreamUpdate':_0x4f27a8[_0x427028(0x13a)],'forkedFromSkillId':_0x4f27a8[_0x427028(0x14c)],'forkedFromVersion':_0x4f27a8[_0x427028(0x138)],'sourceSessionId':_0x4f27a8[_0x427028(0x159)],'contentHash':_0x1504bb,'fileHashes':_0x55c762,'treeHash':_0x5032b4[_0x427028(0x149)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5032b4)):undefined,'ossPath':remoteManifestOssPath(_0x4f27a8['files']),'zipSha256':_0x3c0c4b,'zipSize':_0xf680fe,'files':_0x5032b4['length']>0x0?_0x5032b4[_0x427028(0x136)](_0x70e11=>({'path':_0x70e11['path'],'hash':fileHash(_0x70e11),'size':fileContent(_0x70e11)[_0x427028(0x149)]})):undefined,'pulledAt':_0x1cbae0??new Date()['toISOString']()};}export function requireSkillCode(_0x524db5){const _0x1077ea=a119_0x50d0,_0x2ba564=_0x524db5[_0x1077ea(0x142)]?.[_0x1077ea(0x13e)]();if(!_0x2ba564)throw CliErrors[_0x1077ea(0x139)](_0x1077ea(0x145));return _0x2ba564;}export function readMetadataIfPresent(_0x4a8150){const _0x17f88e=a119_0x50d0;if(!existsSync(_0x4a8150))return undefined;try{const _0x37fc1f=JSON[_0x17f88e(0x135)](readFileSync(_0x4a8150,'utf8'));return _0x37fc1f;}catch{throw CliErrors[_0x17f88e(0x139)](_0x17f88e(0x137)+METADATA_FILE+':\x20'+_0x4a8150);}}function remoteManifestOssPath(_0x1ddb40){const _0x549727=a119_0x50d0;if(!_0x1ddb40||typeof _0x1ddb40!==_0x549727(0x144)||Array[_0x549727(0x13b)](_0x1ddb40))return undefined;const _0x5477af=_0x1ddb40[_0x549727(0x153)];return typeof _0x5477af===_0x549727(0x146)&&_0x5477af[_0x549727(0x13e)]()?_0x5477af[_0x549727(0x13e)]():undefined;}function a119_0x132f(){const _0xb7f3c5=['map','Invalid\x20','forkedFromVersion','validation','hasUpstreamUpdate','isArray','description','102223HsDzUp','trim','zipSha256','48bapqFc','tags','skillCode','1578108UzQxvg','object','Runtime\x20Skill\x20is\x20missing\x20skillCode.','string','manifest','1020ybizlP','length','path','fromEntries','forkedFromSkillId','readonly','personal','version','5MkRqhf','108VLHPQc','3Kmnbsy','ossPath','660392mzmTSM','314026WMWIRZ','zipSize','256529ayycSW','241380IRpdWw','sourceSessionId','5380385cqurbu','parse'];a119_0x132f=function(){return _0xb7f3c5;};return a119_0x132f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a120_0x4db6d5=a120_0x204d;function a120_0x204d(_0x178625,_0x363853){_0x178625=_0x178625-0x1e4;const _0x1e66d5=a120_0x1e66();let _0x204d6e=_0x1e66d5[_0x178625];return _0x204d6e;}(function(_0x5d0c66,_0x108a1c){const _0x5dd9cb=a120_0x204d,_0x45f74e=_0x5d0c66();while(!![]){try{const _0x436252=parseInt(_0x5dd9cb(0x1f6))/0x1*(parseInt(_0x5dd9cb(0x1fd))/0x2)+-parseInt(_0x5dd9cb(0x1ff))/0x3*(-parseInt(_0x5dd9cb(0x1f5))/0x4)+parseInt(_0x5dd9cb(0x1e6))/0x5+parseInt(_0x5dd9cb(0x1f0))/0x6*(parseInt(_0x5dd9cb(0x1ef))/0x7)+parseInt(_0x5dd9cb(0x1ee))/0x8+-parseInt(_0x5dd9cb(0x1ec))/0x9*(parseInt(_0x5dd9cb(0x1f8))/0xa)+parseInt(_0x5dd9cb(0x1eb))/0xb*(-parseInt(_0x5dd9cb(0x1e5))/0xc);if(_0x436252===_0x108a1c)break;else _0x45f74e['push'](_0x45f74e['shift']());}catch(_0x2d3630){_0x45f74e['push'](_0x45f74e['shift']());}}}(a120_0x1e66,0x3c097));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 a120_0x1e66(){const _0x3b675b=['path\x20segment','validation','62380ikUfgW','21674KlSqKc','.workbuddy','350GQjEQP','skillCode','appCode','.claude','SKILL_ROOT','30VkDJCe','agentsSkillsDir','15IuYupj','homeDirName','12TNDKzN','33820vPZDkY','claudeSkillsDir','CLAUDE_SKILL_ROOT','includes','skills','1109647Ppicly','125604OAplit','cache','2358968KwOvDl','913696ZfAcbv','6tvUzfj','Unsafe\x20','workbuddySkillsDir'];a120_0x1e66=function(){return _0x3b675b;};return a120_0x1e66();}import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x3791cd={}){const _0x5da975=a120_0x204d,_0x503de3=_0x3791cd['homeDir']??homedir(),_0x51c7c1=resolve(_0x503de3,PRODUCT_CONFIG[_0x5da975(0x1e4)],_0x5da975(0x1ed)),_0x521283=trimmedEnv(_0x5da975(0x1fc)),_0x4b9750=trimmedEnv(_0x5da975(0x1e8)),_0x5a44ec=resolve(_0x503de3,_0x5da975(0x1f7)),_0xa4781a=_0x3791cd[_0x5da975(0x1f2)]??(existsSync(_0x5a44ec)?resolve(_0x5a44ec,_0x5da975(0x1ea)):undefined);return{'homeDir':_0x503de3,'cacheRoot':_0x51c7c1,'managedRoot':resolve(_0x503de3,PRODUCT_CONFIG[_0x5da975(0x1e4)]),'agentsSkillsDir':_0x3791cd['agentsSkillsDir']??_0x521283??resolve(_0x503de3,'.agents',_0x5da975(0x1ea)),'claudeSkillsDir':_0x3791cd['claudeSkillsDir']??_0x4b9750??resolve(_0x503de3,_0x5da975(0x1fb),_0x5da975(0x1ea)),'workbuddySkillsDir':_0xa4781a};}export function runtimeAgentSkillRoots(_0x31f485){const _0x187a7f=a120_0x204d;return[_0x31f485[_0x187a7f(0x1fe)],_0x31f485[_0x187a7f(0x1e7)],_0x31f485['workbuddySkillsDir']]['filter'](_0x1b913e=>Boolean(_0x1b913e));}export function getRuntimeSkillCacheRoot(_0x430a7f,_0x50e31e,_0x7f763f={}){const _0x3b9455=a120_0x204d,_0x36ab15=resolveSkillSyncPaths(_0x7f763f);return resolve(_0x36ab15['cacheRoot'],_0x430a7f,fingerprintAccessKey(_0x50e31e),_0x3b9455(0x1ea));}export function getRuntimeSkillDir(_0x44a98f,_0x23af11,_0x487847,_0x17cdbc,_0x246974,_0x181d0b={}){const _0x4e608b=a120_0x204d;return resolve(getRuntimeSkillCacheRoot(_0x44a98f,_0x23af11,_0x181d0b),safePathSegment(_0x487847,_0x4e608b(0x1fa)),_0x17cdbc,safePathSegment(_0x246974,_0x4e608b(0x1f9)));}export function safePathSegment(_0x393965,_0x31f037=a120_0x4db6d5(0x1f3)){const _0x227ad1=a120_0x4db6d5;if(!_0x393965||_0x393965[_0x227ad1(0x1e9)]('/')||_0x393965[_0x227ad1(0x1e9)]('\x5c')||_0x393965['includes']('..'))throw CliErrors[_0x227ad1(0x1f4)](_0x227ad1(0x1f1)+_0x31f037+'\x20for\x20local\x20path:\x20'+_0x393965);return _0x393965;}function trimmedEnv(_0x1982a6){const _0x5810c6=productEnv(_0x1982a6)?.['trim']();return _0x5810c6?_0x5810c6:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3aac41,_0x35cbbf){const _0x538714=a121_0x400b,_0x84cba1=_0x3aac41();while(!![]){try{const _0xdb4723=-parseInt(_0x538714(0x1c5))/0x1*(parseInt(_0x538714(0x1c6))/0x2)+-parseInt(_0x538714(0x1ca))/0x3+parseInt(_0x538714(0x1d2))/0x4*(parseInt(_0x538714(0x1d8))/0x5)+-parseInt(_0x538714(0x1c7))/0x6+-parseInt(_0x538714(0x1b8))/0x7*(parseInt(_0x538714(0x1bb))/0x8)+parseInt(_0x538714(0x1c0))/0x9*(parseInt(_0x538714(0x1f3))/0xa)+parseInt(_0x538714(0x1c2))/0xb;if(_0xdb4723===_0x35cbbf)break;else _0x84cba1['push'](_0x84cba1['shift']());}catch(_0x44cec3){_0x84cba1['push'](_0x84cba1['shift']());}}}(a121_0x39af,0x98d54));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a121_0x4597eb}from'yaml';function a121_0x39af(){const _0x1f4b0c=['string','some','builtin','isDirectory','length','isArray','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','50WuaLHU','boolean','personal','skillName','Remote\x20Skill\x20','startsWith','displayName','manifest','237643Rvmbsl','tags',',\x20or\x20directory\x20name.','168AQiFVH','validation','Skill\x20directory\x20not\x20found:\x20','\x20has\x20scope=\x22','appCode','1050687hofgyw','number','28707096MpdRfL','content','Missing\x20','3npCRTU','281024DYjzYZ','5413818LSbNqX','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','3726105CUmKjJ','ignoreMetadataSkillCode','\x20name\x20for\x20SkillHub\x20slug\x20generation.','match','excludedFilePaths','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Invalid\x20','refreshedAt','711356jrGmQF','version','name','path','description','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','20tMgBQd','skillCode','ignoreMetadataScope','scope','replace','allowAppCodeRetarget','slice','\x20has\x20unsupported\x20scope\x20\x22','ignoreMetadataAppCodeMismatch','filter','(unknown)','sourceSessionId','metadata','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','isSymbolicLink','utf8','isFile','trim','ignoreInvalidMetadata'];a121_0x39af=function(){return _0x1f4b0c;};return a121_0x39af();}import{CliErrors}from'../../errors.js';function a121_0x400b(_0x4720d2,_0x5bae5f){_0x4720d2=_0x4720d2-0x1b3;const _0x39af35=a121_0x39af();let _0x400b07=_0x39af35[_0x4720d2];return _0x400b07;}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(_0x16b0d6,_0x4126fa,_0x46bb89={}){const _0x426a71=a121_0x400b,_0xd31a05=resolvePushDirectoryRoot(_0x16b0d6),_0x12fc1e=readPushMetadataIfPresent(resolve(_0xd31a05,METADATA_FILE),{'ignoreInvalidMetadata':_0x46bb89['ignoreInvalidMetadata']});if(_0x12fc1e?.[_0x426a71(0x1bf)]&&_0x12fc1e[_0x426a71(0x1bf)]!==_0x4126fa&&!_0x46bb89[_0x426a71(0x1dd)]&&!_0x46bb89[_0x426a71(0x1e0)])throw CliErrors[_0x426a71(0x1bc)]('Skill\x20metadata\x20appCode\x20\x22'+_0x12fc1e[_0x426a71(0x1bf)]+_0x426a71(0x1c8)+_0x4126fa+'\x22.');const _0x53058a=resolvePushSkillCode(_0xd31a05,_0x4126fa,_0x12fc1e,_0x46bb89);if(!_0x53058a)throw CliErrors[_0x426a71(0x1bc)](_0x426a71(0x1cf)+SKILL_FILE+',\x20'+METADATA_FILE+_0x426a71(0x1ba));return{'dir':_0xd31a05,'skillCode':_0x53058a,'metadata':_0x12fc1e};}export function readPushDirectory(_0x41c811,_0x2047f1,_0x1fae63={}){const _0x58b6bf=a121_0x400b,_0x26b814=resolvePushDirectoryIdentity(_0x41c811,_0x2047f1,_0x1fae63),_0x1cba11=_0x26b814['dir'],_0x39c516=resolve(_0x1cba11,SKILL_FILE);if(!existsSync(_0x39c516)||!lstatSync(_0x39c516)['isFile']())throw CliErrors[_0x58b6bf(0x1bc)](_0x58b6bf(0x1c4)+SKILL_FILE+':\x20'+_0x39c516);const _0x39109f=_0x26b814[_0x58b6bf(0x1e4)],_0x3de115=_0x1fae63['targetScope']??'personal';if(!_0x1fae63[_0x58b6bf(0x1da)]&&_0x39109f?.[_0x58b6bf(0x1db)]===_0x58b6bf(0x1ed))throw CliErrors[_0x58b6bf(0x1bc)](_0x58b6bf(0x1e5)+METADATA_FILE+_0x58b6bf(0x1be)+_0x39109f[_0x58b6bf(0x1db)]+'\x22.');if(!_0x1fae63[_0x58b6bf(0x1da)]&&_0x3de115==='personal'&&_0x39109f?.[_0x58b6bf(0x1db)]&&_0x39109f[_0x58b6bf(0x1db)]!==_0x58b6bf(0x1f5))throw CliErrors[_0x58b6bf(0x1bc)](_0x58b6bf(0x1d7)+METADATA_FILE+_0x58b6bf(0x1be)+_0x39109f['scope']+'\x22.',_0x58b6bf(0x1f2)+_0x1cba11+_0x58b6bf(0x1f1));const _0x56b9ec=scanSkillDirectory(_0x1cba11,{'excludedFilePaths':_0x1fae63[_0x58b6bf(0x1ce)]}),_0x31e743=buildSkillPackage(_0x56b9ec),_0x262b0a=readFileSync(_0x39c516,_0x58b6bf(0x1e7)),_0xdbe9bd=_0x26b814[_0x58b6bf(0x1d9)],_0x2664d9=_0x1fae63['ignoreMetadataForPayload']?undefined:_0x39109f,_0x2f6722=readSkillDisplayName(_0x262b0a);return{'skillCode':_0xdbe9bd,'metadata':_0x39109f,'frontmatterDisplayName':_0x2f6722,'input':{'skillCode':_0xdbe9bd,'skillName':_0x2f6722??_0x2664d9?.[_0x58b6bf(0x1b3)],'description':_0x2664d9?.[_0x58b6bf(0x1d6)],'content':_0x262b0a,'files':_0x31e743[_0x58b6bf(0x1b7)],'packageBase64':_0x31e743['packageBase64'],'tags':_0x2664d9?.[_0x58b6bf(0x1b9)],'version':_0x2664d9?.[_0x58b6bf(0x1d3)],'sourceSessionId':_0x2664d9?.[_0x58b6bf(0x1e3)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1e0d74,_0x2a3422,_0xb15bff,_0x5b3b4d={}){const _0x33ec78=a121_0x400b,_0x544f02=resolvePushDirectoryRoot(_0x1e0d74),_0x9d4290=readPushMetadataIfPresent(resolve(_0x544f02,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4ec7c9=requireRemoteScope(_0x2a3422),_0x491888=readLocalSkillContent(_0x544f02),_0x7b0d38={..._0x2a3422,'appCode':_0x2a3422[_0x33ec78(0x1bf)]??_0xb15bff,'skillName':_0x2a3422[_0x33ec78(0x1b3)]??_0x9d4290?.[_0x33ec78(0x1b3)],'description':_0x2a3422[_0x33ec78(0x1d6)]??_0x9d4290?.[_0x33ec78(0x1d6)],'tags':Array[_0x33ec78(0x1f0)](_0x2a3422[_0x33ec78(0x1b9)])?_0x2a3422[_0x33ec78(0x1b9)]:_0x9d4290?.['tags'],'sourceSessionId':_0x2a3422[_0x33ec78(0x1e3)]??_0x9d4290?.['sourceSessionId'],'content':_0x2a3422[_0x33ec78(0x1c3)]??_0x491888},_0x43fc1c=buildMetadata(_0x7b0d38,_0x4ec7c9,_0xb15bff,contentHash(_0x491888),_0x5b3b4d[_0x33ec78(0x1d1)]);writeJsonAtomic(resolve(_0x544f02,METADATA_FILE),_0x43fc1c);}export function recordPushedRuntimeSkill(_0x52ba12,_0x5900a8,_0xca492f,_0x3da2b6={}){const _0x23fa60=a121_0x400b,_0x1bd295=resolvePushDirectoryRoot(_0x52ba12),_0x4f81ad=scanSkillDirectory(_0x1bd295),_0x5665ef=_0x4f81ad['find'](_0x1fdf25=>_0x1fdf25['path']===SKILL_FILE),_0x155782=_0x5665ef?fileText(_0x5665ef):'',_0x4d3ae1=tryNormalizePackageManifest(_0x5900a8[_0x23fa60(0x1c9)]),_0x4768fa={..._0x5900a8,'content':_0x5900a8[_0x23fa60(0x1c3)]??_0x155782,'files':_0x4d3ae1},_0x6f8d4f=_0x4d3ae1?normalizeLocalFiles(_0x4f81ad)[_0x23fa60(0x1e1)](_0x484420=>_0x4d3ae1['files'][_0x23fa60(0x1ec)](_0x26f2f2=>_0x26f2f2[_0x23fa60(0x1d5)]===_0x484420[_0x23fa60(0x1d5)])):undefined,_0x31a2f7=buildMetadata(_0x4768fa,_0x3da2b6['scope']??_0x23fa60(0x1f5),_0xca492f,contentHash(_0x4768fa['content']??''),_0x3da2b6['pushedAt'],_0x6f8d4f);writeJsonAtomic(resolve(_0x1bd295,METADATA_FILE),_0x31a2f7);}export function deriveSkillCodeFromDirectory(_0x55371e,_0x30df6f){const _0x489172=a121_0x400b,_0x3a9696=basename(resolve(_0x55371e)),_0x26f31c=_0x30df6f+'--';return _0x3a9696[_0x489172(0x1b5)](_0x26f31c)?_0x3a9696[_0x489172(0x1de)](_0x26f31c[_0x489172(0x1ef)]):_0x3a9696;}function resolvePushSkillCode(_0x57e5ca,_0x1ea0eb,_0x28dd8e,_0x4ac0a3){const _0x35dc8b=a121_0x400b,_0x49ba78=deriveSkillCodeFromSkillFile(_0x57e5ca)||deriveSkillCodeFromDirectory(_0x57e5ca,_0x1ea0eb);if(_0x4ac0a3[_0x35dc8b(0x1cb)])return _0x49ba78;return _0x28dd8e?.['skillCode']?.[_0x35dc8b(0x1e9)]()||_0x49ba78;}function deriveSkillCodeFromSkillFile(_0x5a155b){const _0x947f83=a121_0x400b,_0x4f36d0=resolve(_0x5a155b,SKILL_FILE);if(!existsSync(_0x4f36d0)||!lstatSync(_0x4f36d0)[_0x947f83(0x1e8)]())return undefined;const _0x1c945f=readFileSync(_0x4f36d0,_0x947f83(0x1e7)),_0xa1b6c2=_0x1c945f[_0x947f83(0x1cd)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xa1b6c2)return undefined;const _0x290438=parseFrontmatterObject(_0xa1b6c2[0x1]??''),_0x24bfcb=scalarToString(_0x290438?.[_0x947f83(0x1d4)]);return _0x24bfcb?slugifySkillName(_0x24bfcb):undefined;}function readSkillDisplayName(_0x408091){const _0x3fdf29=a121_0x400b,_0x3b5db7=_0x408091[_0x3fdf29(0x1cd)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3b5db7)return undefined;const _0x363598=parseFrontmatterObject(_0x3b5db7[0x1]??'');return scalarToString(_0x363598?.[_0x3fdf29(0x1b6)]);}function slugifySkillName(_0x5f4650){const _0x490a48=a121_0x400b,_0xdd0066=_0x5f4650[_0x490a48(0x1e9)]()['toLowerCase']()[_0x490a48(0x1dc)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x490a48(0x1dc)](/^-+/,'')['replace'](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0xdd0066)throw CliErrors[_0x490a48(0x1bc)](_0x490a48(0x1d0)+SKILL_FILE+_0x490a48(0x1cc));return _0xdd0066;}function parseFrontmatterObject(_0x29fe4c){try{const _0x4418bc=a121_0x4597eb(_0x29fe4c);return _0x4418bc&&typeof _0x4418bc==='object'&&!Array['isArray'](_0x4418bc)?_0x4418bc:undefined;}catch{return undefined;}}function scalarToString(_0x26ce21){const _0x32e936=a121_0x400b;if(typeof _0x26ce21===_0x32e936(0x1eb))return _0x26ce21[_0x32e936(0x1e9)]();if(typeof _0x26ce21===_0x32e936(0x1c1)||typeof _0x26ce21===_0x32e936(0x1f4))return String(_0x26ce21);return undefined;}function resolvePushDirectoryRoot(_0x49b4ed){const _0x119029=a121_0x400b,_0x32dcfc=resolve(_0x49b4ed);if(!existsSync(_0x32dcfc))throw CliErrors[_0x119029(0x1bc)](_0x119029(0x1bd)+_0x49b4ed);const _0x31c8f4=lstatSync(_0x32dcfc);if(_0x31c8f4['isDirectory']())return _0x32dcfc;if(_0x31c8f4[_0x119029(0x1e6)]()){const _0x9133a0=realpathSync(_0x32dcfc);if(lstatSync(_0x9133a0)[_0x119029(0x1ee)]())return _0x9133a0;}throw CliErrors[_0x119029(0x1bc)](_0x119029(0x1bd)+_0x49b4ed);}function requireRemoteScope(_0xd7bc6b){const _0x28a039=a121_0x400b;if(_0xd7bc6b['scope']===_0x28a039(0x1f5)||_0xd7bc6b[_0x28a039(0x1db)]==='company'||_0xd7bc6b[_0x28a039(0x1db)]==='builtin')return _0xd7bc6b['scope'];throw CliErrors['validation'](_0x28a039(0x1b4)+(_0xd7bc6b['skillCode']||_0x28a039(0x1e2))+_0x28a039(0x1df)+(_0xd7bc6b['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x25f2e1){const _0x1c07f8=a121_0x400b,_0xc0ffed=resolve(_0x25f2e1,SKILL_FILE);return existsSync(_0xc0ffed)&&lstatSync(_0xc0ffed)[_0x1c07f8(0x1e8)]()?readFileSync(_0xc0ffed,'utf8'):'';}function readPushMetadataIfPresent(_0x1f7de8,_0x4ea248={}){const _0xf57b38=a121_0x400b;try{return readMetadataIfPresent(_0x1f7de8);}catch(_0x1b4050){if(_0x4ea248[_0xf57b38(0x1ea)])return undefined;throw _0x1b4050;}}
|
|
1
|
+
function a121_0xed93(){const _0x403098=['74CyJaiN','\x20has\x20scope=\x22','12517DtOXNx','boolean','1500336YcaBHb','6XzXMqs','company','skillCode','trim','refreshedAt','isDirectory','files','validation','4225711btwmyn','string','version','path','(unknown)','ignoreMetadataScope','30rNixsm','sourceSessionId','excludedFilePaths','2470641GvLopY','slice','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataAppCodeMismatch','pushedAt','scope','ignoreInvalidMetadata','filter','tags','320cYrahE','301212QcZVfq','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','packageBase64','Skill\x20metadata\x20appCode\x20\x22','dir','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','number',',\x20or\x20directory\x20name.','isSymbolicLink','builtin','ignoreMetadataForPayload','description','utf8','skillName','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','targetScope','Invalid\x20','ignoreMetadataSkillCode','unknown','85812xFmMGQ','appCode','personal','startsWith','1782kaqOLC','\x20has\x20unsupported\x20scope\x20\x22','some','match','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','isFile','content','87993FVAuwp','displayName','Missing\x20','replace','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'];a121_0xed93=function(){return _0x403098;};return a121_0xed93();}(function(_0x2026ff,_0x2e7730){const _0x5c45ea=a121_0x156a,_0x3c30b9=_0x2026ff();while(!![]){try{const _0x4da3c9=parseInt(_0x5c45ea(0x1f0))/0x1*(-parseInt(_0x5c45ea(0x1ee))/0x2)+parseInt(_0x5c45ea(0x204))/0x3+parseInt(_0x5c45ea(0x20e))/0x4*(-parseInt(_0x5c45ea(0x201))/0x5)+-parseInt(_0x5c45ea(0x1f3))/0x6*(parseInt(_0x5c45ea(0x1fb))/0x7)+-parseInt(_0x5c45ea(0x1f2))/0x8+parseInt(_0x5c45ea(0x22f))/0x9*(parseInt(_0x5c45ea(0x20d))/0xa)+parseInt(_0x5c45ea(0x227))/0xb*(parseInt(_0x5c45ea(0x223))/0xc);if(_0x4da3c9===_0x2e7730)break;else _0x3c30b9['push'](_0x3c30b9['shift']());}catch(_0x3ee0c6){_0x3c30b9['push'](_0x3c30b9['shift']());}}}(a121_0xed93,0x8fba7));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a121_0x156a(_0x556e89,_0x5ad688){_0x556e89=_0x556e89-0x1eb;const _0xed93a8=a121_0xed93();let _0x156ad3=_0xed93a8[_0x556e89];return _0x156ad3;}import{parse as a121_0x3787fb}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(_0x2cb5ef,_0x18e017,_0x311a97={}){const _0x460369=a121_0x156a,_0x457311=resolvePushDirectoryRoot(_0x2cb5ef),_0x35fe6d=readPushMetadataIfPresent(resolve(_0x457311,METADATA_FILE),{'ignoreInvalidMetadata':_0x311a97[_0x460369(0x20a)]});if(_0x35fe6d?.[_0x460369(0x224)]&&_0x35fe6d[_0x460369(0x224)]!==_0x18e017&&!_0x311a97['allowAppCodeRetarget']&&!_0x311a97[_0x460369(0x207)])throw CliErrors[_0x460369(0x1fa)](_0x460369(0x213)+_0x35fe6d[_0x460369(0x224)]+_0x460369(0x1ed)+_0x18e017+'\x22.');const _0x4affb4=resolvePushSkillCode(_0x457311,_0x18e017,_0x35fe6d,_0x311a97);if(!_0x4affb4)throw CliErrors[_0x460369(0x1fa)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x460369(0x217));return{'dir':_0x457311,'skillCode':_0x4affb4,'metadata':_0x35fe6d};}export function readPushDirectory(_0x3de778,_0x40df0a,_0x3774a4={}){const _0x1f8a5e=a121_0x156a,_0x16c46c=resolvePushDirectoryIdentity(_0x3de778,_0x40df0a,_0x3774a4),_0x53d773=_0x16c46c[_0x1f8a5e(0x214)],_0x12e14a=resolve(_0x53d773,SKILL_FILE);if(!existsSync(_0x12e14a)||!lstatSync(_0x12e14a)[_0x1f8a5e(0x22d)]())throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x1eb)+SKILL_FILE+':\x20'+_0x12e14a);const _0x58c9a9=_0x16c46c[_0x1f8a5e(0x20f)],_0x5b7d03=_0x3774a4[_0x1f8a5e(0x21f)]??'personal';if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x58c9a9?.[_0x1f8a5e(0x209)]===_0x1f8a5e(0x219))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x21e)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.');if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x5b7d03==='personal'&&_0x58c9a9?.['scope']&&_0x58c9a9[_0x1f8a5e(0x209)]!==_0x1f8a5e(0x225))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x206)+METADATA_FILE+_0x1f8a5e(0x1ef)+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.',_0x1f8a5e(0x210)+_0x53d773+_0x1f8a5e(0x215));const _0x2188de=scanSkillDirectory(_0x53d773,{'excludedFilePaths':_0x3774a4[_0x1f8a5e(0x203)]}),_0x380782=buildSkillPackage(_0x2188de),_0x4a9f23=readFileSync(_0x12e14a,_0x1f8a5e(0x21c)),_0x4837ae=_0x16c46c[_0x1f8a5e(0x1f5)],_0xfbce48=_0x3774a4[_0x1f8a5e(0x21a)]?undefined:_0x58c9a9,_0xf4be22=readSkillDisplayName(_0x4a9f23);return{'skillCode':_0x4837ae,'metadata':_0x58c9a9,'frontmatterDisplayName':_0xf4be22,'input':{'skillCode':_0x4837ae,'skillName':_0xf4be22??_0xfbce48?.[_0x1f8a5e(0x21d)],'description':_0xfbce48?.['description'],'content':_0x4a9f23,'files':_0x380782['manifest'],'packageBase64':_0x380782[_0x1f8a5e(0x212)],'tags':_0xfbce48?.['tags'],'version':_0xfbce48?.[_0x1f8a5e(0x1fd)],'sourceSessionId':_0xfbce48?.[_0x1f8a5e(0x202)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x31ea02,_0x437211,_0x5bc826,_0x3c6bc0={}){const _0x5ddab6=a121_0x156a,_0x27687e=resolvePushDirectoryRoot(_0x31ea02),_0x3d9813=readPushMetadataIfPresent(resolve(_0x27687e,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x118fc7=requireRemoteScope(_0x437211),_0x57d8d0=readLocalSkillContent(_0x27687e),_0x5e52b2={..._0x437211,'appCode':_0x437211[_0x5ddab6(0x224)]??_0x5bc826,'skillName':_0x437211['skillName']??_0x3d9813?.[_0x5ddab6(0x21d)],'description':_0x437211[_0x5ddab6(0x21b)]??_0x3d9813?.[_0x5ddab6(0x21b)],'tags':Array['isArray'](_0x437211['tags'])?_0x437211[_0x5ddab6(0x20c)]:_0x3d9813?.[_0x5ddab6(0x20c)],'sourceSessionId':_0x437211['sourceSessionId']??_0x3d9813?.[_0x5ddab6(0x202)],'content':_0x437211[_0x5ddab6(0x22e)]??_0x57d8d0},_0x5aaaa2=buildMetadata(_0x5e52b2,_0x118fc7,_0x5bc826,contentHash(_0x57d8d0),_0x3c6bc0[_0x5ddab6(0x1f7)]);writeJsonAtomic(resolve(_0x27687e,METADATA_FILE),_0x5aaaa2);}export function recordPushedRuntimeSkill(_0x1327ac,_0x1b31c7,_0x5208ac,_0x31bb4e={}){const _0x1b32c2=a121_0x156a,_0x204314=resolvePushDirectoryRoot(_0x1327ac),_0x488181=scanSkillDirectory(_0x204314),_0x5eb356=_0x488181[_0x1b32c2(0x22c)](_0x5eaeaa=>_0x5eaeaa[_0x1b32c2(0x1fe)]===SKILL_FILE),_0x4f06cb=_0x5eb356?fileText(_0x5eb356):'',_0x22ad32=tryNormalizePackageManifest(_0x1b31c7[_0x1b32c2(0x1f9)]),_0x3ee57b={..._0x1b31c7,'content':_0x1b31c7[_0x1b32c2(0x22e)]??_0x4f06cb,'files':_0x22ad32},_0x1af49c=_0x22ad32?normalizeLocalFiles(_0x488181)[_0x1b32c2(0x20b)](_0x6d98c5=>_0x22ad32[_0x1b32c2(0x1f9)][_0x1b32c2(0x229)](_0x2bed88=>_0x2bed88['path']===_0x6d98c5['path'])):undefined,_0x157656=buildMetadata(_0x3ee57b,_0x31bb4e[_0x1b32c2(0x209)]??_0x1b32c2(0x225),_0x5208ac,contentHash(_0x3ee57b[_0x1b32c2(0x22e)]??''),_0x31bb4e[_0x1b32c2(0x208)],_0x1af49c);writeJsonAtomic(resolve(_0x204314,METADATA_FILE),_0x157656);}export function deriveSkillCodeFromDirectory(_0x45446a,_0x5d7d69){const _0x13cf92=a121_0x156a,_0x21f1d8=basename(resolve(_0x45446a)),_0x169a57=_0x5d7d69+'--';return _0x21f1d8[_0x13cf92(0x226)](_0x169a57)?_0x21f1d8[_0x13cf92(0x205)](_0x169a57['length']):_0x21f1d8;}function resolvePushSkillCode(_0x3c5ffa,_0x4a4374,_0x1ffea1,_0x340bfe){const _0x3ae33a=a121_0x156a,_0x4367e1=deriveSkillCodeFromSkillFile(_0x3c5ffa)||deriveSkillCodeFromDirectory(_0x3c5ffa,_0x4a4374);if(_0x340bfe[_0x3ae33a(0x221)])return _0x4367e1;return _0x1ffea1?.[_0x3ae33a(0x1f5)]?.[_0x3ae33a(0x1f6)]()||_0x4367e1;}function deriveSkillCodeFromSkillFile(_0x44a707){const _0x3f6db8=a121_0x156a,_0x4c269d=resolve(_0x44a707,SKILL_FILE);if(!existsSync(_0x4c269d)||!lstatSync(_0x4c269d)[_0x3f6db8(0x22d)]())return undefined;const _0x132402=readFileSync(_0x4c269d,_0x3f6db8(0x21c)),_0x202bb9=_0x132402['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x202bb9)return undefined;const _0x593e25=parseFrontmatterObject(_0x202bb9[0x1]??''),_0x43977a=scalarToString(_0x593e25?.['name']);return _0x43977a?slugifySkillName(_0x43977a):undefined;}function readSkillDisplayName(_0xe7a35d){const _0x781057=a121_0x156a,_0x52ce46=_0xe7a35d[_0x781057(0x22a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52ce46)return undefined;const _0x2342ed=parseFrontmatterObject(_0x52ce46[0x1]??'');return scalarToString(_0x2342ed?.[_0x781057(0x230)]);}function slugifySkillName(_0x44e5ab){const _0x54f732=a121_0x156a,_0x28f727=_0x44e5ab['trim']()['toLowerCase']()[_0x54f732(0x1ec)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x54f732(0x1ec)](/^-+/,'')[_0x54f732(0x1ec)](/-+$/,'')[_0x54f732(0x1ec)](/-{2,}/g,'-');if(!_0x28f727)throw CliErrors['validation'](_0x54f732(0x220)+SKILL_FILE+_0x54f732(0x22b));return _0x28f727;}function parseFrontmatterObject(_0x7d91de){try{const _0x257f56=a121_0x3787fb(_0x7d91de);return _0x257f56&&typeof _0x257f56==='object'&&!Array['isArray'](_0x257f56)?_0x257f56:undefined;}catch{return undefined;}}function scalarToString(_0x1d6dc6){const _0x5efdb5=a121_0x156a;if(typeof _0x1d6dc6===_0x5efdb5(0x1fc))return _0x1d6dc6['trim']();if(typeof _0x1d6dc6===_0x5efdb5(0x216)||typeof _0x1d6dc6===_0x5efdb5(0x1f1))return String(_0x1d6dc6);return undefined;}function resolvePushDirectoryRoot(_0x46a79a){const _0x18790f=a121_0x156a,_0x1b1e9d=resolve(_0x46a79a);if(!existsSync(_0x1b1e9d))throw CliErrors['validation'](_0x18790f(0x211)+_0x46a79a);const _0x5de6c8=lstatSync(_0x1b1e9d);if(_0x5de6c8['isDirectory']())return _0x1b1e9d;if(_0x5de6c8[_0x18790f(0x218)]()){const _0x1fdd28=realpathSync(_0x1b1e9d);if(lstatSync(_0x1fdd28)[_0x18790f(0x1f8)]())return _0x1fdd28;}throw CliErrors[_0x18790f(0x1fa)]('Skill\x20directory\x20not\x20found:\x20'+_0x46a79a);}function requireRemoteScope(_0x435bfd){const _0x4bb9d8=a121_0x156a;if(_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x225)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x1f4)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x219))return _0x435bfd[_0x4bb9d8(0x209)];throw CliErrors[_0x4bb9d8(0x1fa)]('Remote\x20Skill\x20'+(_0x435bfd[_0x4bb9d8(0x1f5)]||_0x4bb9d8(0x1ff))+_0x4bb9d8(0x228)+(_0x435bfd[_0x4bb9d8(0x209)]??_0x4bb9d8(0x222))+'\x22.');}function readLocalSkillContent(_0x5cc9b0){const _0x3dc91f=a121_0x156a,_0x4f3959=resolve(_0x5cc9b0,SKILL_FILE);return existsSync(_0x4f3959)&&lstatSync(_0x4f3959)[_0x3dc91f(0x22d)]()?readFileSync(_0x4f3959,_0x3dc91f(0x21c)):'';}function readPushMetadataIfPresent(_0x2ef8a3,_0x113e87={}){const _0x3a02f3=a121_0x156a;try{return readMetadataIfPresent(_0x2ef8a3);}catch(_0x5aaac7){if(_0x113e87[_0x3a02f3(0x20a)])return undefined;throw _0x5aaac7;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a122_0x5873(){const _0x3ad7d4=['2aYtPcu','personal','validation','10539KUqsKk','2630dwUCnr','includes','Unsupported\x20runtime\x20Skill\x20scope:\x20','builtin','company','2763125AnHBUn','7oQttpz','2279864hxvapJ','497680INYJqK','push','1321176snXlHr','671163ECZncP','1166061EJRFzw'];a122_0x5873=function(){return _0x3ad7d4;};return a122_0x5873();}(function(_0x55d0c5,_0x48a626){const _0x532154=a122_0x47d0,_0x3e5280=_0x55d0c5();while(!![]){try{const _0x35a308=-parseInt(_0x532154(0xa6))/0x1*(-parseInt(_0x532154(0x97))/0x2)+-parseInt(_0x532154(0xa7))/0x3+-parseInt(_0x532154(0xa3))/0x4+parseInt(_0x532154(0xa0))/0x5+-parseInt(_0x532154(0xa5))/0x6+parseInt(_0x532154(0xa1))/0x7*(-parseInt(_0x532154(0xa2))/0x8)+-parseInt(_0x532154(0x9a))/0x9*(-parseInt(_0x532154(0x9b))/0xa);if(_0x35a308===_0x48a626)break;else _0x3e5280['push'](_0x3e5280['shift']());}catch(_0x1ed206){_0x3e5280['push'](_0x3e5280['shift']());}}}(a122_0x5873,0x7d5c3));import{CliErrors}from'../../errors.js';function a122_0x47d0(_0x439bb8,_0x48abe0){_0x439bb8=_0x439bb8-0x97;const _0x58730f=a122_0x5873();let _0x47d0ca=_0x58730f[_0x439bb8];return _0x47d0ca;}export function normalizeRuntimeSkillScopes(_0x334df4){const _0x188787=a122_0x47d0,_0xb4ce61=_0x334df4&&_0x334df4['length']>0x0?_0x334df4:[_0x188787(0x98),'company',_0x188787(0x9e)],_0x1c1cab=[];for(const _0x1ce1a5 of _0xb4ce61){if(!isRuntimeSkillScope(_0x1ce1a5))throw CliErrors[_0x188787(0x99)](_0x188787(0x9d)+_0x1ce1a5);!_0x1c1cab[_0x188787(0x9c)](_0x1ce1a5)&&_0x1c1cab[_0x188787(0xa4)](_0x1ce1a5);}return _0x1c1cab;}export function isRuntimeSkillScope(_0x326213){const _0x8af606=a122_0x47d0;return _0x326213==='personal'||_0x326213===_0x8af606(0x9f)||_0x326213===_0x8af606(0x9e);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a124_0x3679(_0x2f42fa,_0x247b3d){_0x2f42fa=_0x2f42fa-0xb7;const _0x4d3bb9=a124_0x4d3b();let _0x3679b2=_0x4d3bb9[_0x2f42fa];return _0x3679b2;}const a124_0x24d4f0=a124_0x3679;(function(_0x556be1,_0x2ba382){const _0x391c0b=a124_0x3679,_0x3bb842=_0x556be1();while(!![]){try{const _0x15af42=-parseInt(_0x391c0b(0xbc))/0x1+-parseInt(_0x391c0b(0xbb))/0x2*(-parseInt(_0x391c0b(0xba))/0x3)+-parseInt(_0x391c0b(0xca))/0x4*(-parseInt(_0x391c0b(0xc2))/0x5)+-parseInt(_0x391c0b(0xc5))/0x6*(-parseInt(_0x391c0b(0xc1))/0x7)+parseInt(_0x391c0b(0xb8))/0x8+parseInt(_0x391c0b(0xc3))/0x9+parseInt(_0x391c0b(0xc7))/0xa*(-parseInt(_0x391c0b(0xc6))/0xb);if(_0x15af42===_0x2ba382)break;else _0x3bb842['push'](_0x3bb842['shift']());}catch(_0x494f3b){_0x3bb842['push'](_0x3bb842['shift']());}}}(a124_0x4d3b,0x7594a));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a124_0x4d3b(){const _0x2c9fa7=['path','from','664peWMhr','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','entries','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','map','endsWith','code','2119880vDrktx','length','15YibFeA','285666apxfAn','261112pihpcC','object','validation_error','validation','sort','45451pQRCYP','4105YwbpCO','8391717bbKTmK','1980-01-01T00:00:00.000Z','162HniBzW','22tsZxAO','7402190Vgwnlf'];a124_0x4d3b=function(){return _0x2c9fa7;};return a124_0x4d3b();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a124_0x24d4f0(0xc4));export function createDeterministicZipPackage(_0x181cab){const _0x512b1b=a124_0x24d4f0,_0x2380ce={};for(const _0x17c11f of normalizeLocalFiles(_0x181cab)){_0x2380ce[_0x17c11f[_0x512b1b(0xc8)]]=fileContent(_0x17c11f);}return Buffer[_0x512b1b(0xc9)](zipSync(_0x2380ce,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x1392d2){const _0x5384c4=a124_0x24d4f0;if(_0x1392d2[_0x5384c4(0xb9)]<0x16)throw CliErrors['validation'](_0x5384c4(0xcb));let _0x4e8d8b;try{_0x4e8d8b=unzipSync(_0x1392d2,{'filter'(_0x24a79d){const _0x321ef8=_0x5384c4,_0x294d4f=normalizeSkillRelativePath(_0x24a79d['name']);if(_0x294d4f[_0x321ef8(0xcf)]('/'))throw CliErrors['validation'](_0x321ef8(0xcd)+_0x294d4f);return!![];}});}catch(_0x342208){if(isRuntimeSkillValidationError(_0x342208))throw _0x342208;throw CliErrors[_0x5384c4(0xbf)](_0x5384c4(0xcb));}return Object[_0x5384c4(0xcc)](_0x4e8d8b)[_0x5384c4(0xce)](([_0x2d22dd,_0xea3d80])=>({'path':normalizeSkillRelativePath(_0x2d22dd),'bytes':Buffer[_0x5384c4(0xc9)](_0xea3d80)}))[_0x5384c4(0xc0)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x10e8f0){const _0x537c57=a124_0x24d4f0;return typeof _0x10e8f0===_0x537c57(0xbd)&&_0x10e8f0!==null&&_0x537c57(0xb7)in _0x10e8f0&&_0x10e8f0[_0x537c57(0xb7)]===_0x537c57(0xbe);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20c84b,_0x4dbd07){const _0x4d7063=a125_0x4fa4,_0x12dd43=_0x20c84b();while(!![]){try{const _0x1e885f=parseInt(_0x4d7063(0xb0))/0x1*(parseInt(_0x4d7063(0xba))/0x2)+-parseInt(_0x4d7063(0xc8))/0x3+parseInt(_0x4d7063(0xb7))/0x4*(-parseInt(_0x4d7063(0xc2))/0x5)+-parseInt(_0x4d7063(0xce))/0x6+parseInt(_0x4d7063(0xcc))/0x7*(parseInt(_0x4d7063(0xb4))/0x8)+parseInt(_0x4d7063(0xbd))/0x9+-parseInt(_0x4d7063(0xb5))/0xa*(-parseInt(_0x4d7063(0xb1))/0xb);if(_0x1e885f===_0x4dbd07)break;else _0x12dd43['push'](_0x12dd43['shift']());}catch(_0x4e1e33){_0x12dd43['push'](_0x12dd43['shift']());}}}(a125_0x37ac,0x2518e));import{CliErrors}from'../../errors.js';function a125_0x37ac(){const _0x5bff5c=['Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isArray','zipSize','844945emwcGH','size','toString','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','treeSha256','isSafeInteger','506241sUSJiI','Runtime\x20Skill\x20package\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','ossPath','594265mqtRdr','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','490836zyJaGU','set','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','map','some','requireOssPath','toLowerCase','has','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','bytes','string','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','validation','path','files','get','Missing\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','1714viSsip','11QKkKGQ','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','16GcABAA','1403680QVhZRW','length','4mqudYW','Duplicate\x20Skill\x20package\x20entry:\x20','zipSha256','100LhFpdG','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','sha256','1580706TFezJU','object'];a125_0x37ac=function(){return _0x5bff5c;};return a125_0x37ac();}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(_0x4897e3){const _0x55ca09=a125_0x4fa4,_0x499cf6=normalizeLocalFiles(_0x4897e3);if(!_0x499cf6[_0x55ca09(0xa2)](_0x35ffd3=>_0x35ffd3['path']===SKILL_FILE))throw CliErrors['validation'](_0x55ca09(0xae)+SKILL_FILE+_0x55ca09(0xb2));const _0x2c815c=localFilesToManifestFiles(_0x499cf6),_0x389060=createDeterministicZipPackage(_0x499cf6);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x2c815c),'zipSha256':bufferSha256(_0x389060),'zipSize':_0x389060[_0x55ca09(0xb6)],'files':_0x2c815c},'packageBytes':_0x389060,'packageBase64':_0x389060[_0x55ca09(0xc4)]('base64')};}export function verifyRuntimeSkillPackage(_0x3f259e,_0x3a6e2f){const _0x346c9a=normalizePackageManifest(_0x3f259e,{'requireOssPath':![]});if(!_0x346c9a)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x346c9a,_0x3a6e2f);}export function verifyRuntimeSkillBundle(_0x309a4c,_0xe6a98e){const _0x56614b=a125_0x4fa4,_0x17d898=normalizePackageManifest(_0x309a4c,{'requireOssPath':![]});if(!_0x17d898)throw CliErrors[_0x56614b(0xaa)](_0x56614b(0xc5));return extractAndVerifyPackageFiles(_0x17d898,_0xe6a98e);}export function tryNormalizePackageManifest(_0x26ef7c){return normalizePackageManifest(_0x26ef7c,{'requireOssPath':![]});}export function requirePackageBytes(_0x399294,_0x26558f){const _0x255158=a125_0x4fa4;if(!_0x26558f||_0x26558f[_0x255158(0xb6)]===0x0)throw CliErrors[_0x255158(0xaa)](_0x255158(0xbf)+_0x399294);return _0x26558f;}export function extractDownloadedPackage(_0x40e622){const _0xf1e79e=a125_0x4fa4,_0x4d5117=parseZipPackage(_0x40e622)['map'](_0x284414=>({'path':_0x284414[_0xf1e79e(0xab)],'bytes':_0x284414[_0xf1e79e(0xa7)]}));if(!_0x4d5117[_0xf1e79e(0xa2)](_0x4a8551=>_0x4a8551['path']===SKILL_FILE))throw CliErrors[_0xf1e79e(0xaa)](_0xf1e79e(0xc9)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4d5117);}function a125_0x4fa4(_0x44a20b,_0x44a405){_0x44a20b=_0x44a20b-0xa2;const _0x37acfa=a125_0x37ac();let _0x4fa468=_0x37acfa[_0x44a20b];return _0x4fa468;}export function localFilesToManifestFiles(_0x5f417f){const _0x16bd06=a125_0x4fa4;return normalizeLocalFiles(_0x5f417f)[_0x16bd06(0xd2)](_0x4fff40=>({'path':_0x4fff40[_0x16bd06(0xab)],'sha256':fileHash(_0x4fff40),'size':fileContent(_0x4fff40)['length']}));}function normalizePackageManifest(_0xdc0944,_0xfdacea){const _0x536b0d=a125_0x4fa4;if(!_0xdc0944||typeof _0xdc0944!==_0x536b0d(0xbe)||Array['isArray'](_0xdc0944))return undefined;const _0x351860=_0xdc0944,_0xc51318=typeof _0x351860[_0x536b0d(0xcb)]===_0x536b0d(0xa8)?_0x351860['ossPath']['trim']():undefined;if(_0xfdacea[_0x536b0d(0xa3)]&&!_0xc51318)return undefined;if(!Array[_0x536b0d(0xc0)](_0x351860['files'])||_0x351860[_0x536b0d(0xac)][_0x536b0d(0xb6)]===0x0)return undefined;if(!isSha256Hex(_0x351860[_0x536b0d(0xc6)]))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xcd));if(!isSha256Hex(_0x351860['zipSha256']))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xb3));if(!Number['isSafeInteger'](_0x351860['zipSize'])||_0x351860['zipSize']<0x0)throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xa6));const _0xbeceae=normalizeManifestFiles(_0x351860[_0x536b0d(0xac)]);if(!_0xbeceae['some'](_0x55c89e=>_0x55c89e[_0x536b0d(0xab)]===SKILL_FILE))throw CliErrors[_0x536b0d(0xaa)](_0x536b0d(0xbb)+SKILL_FILE+'.');const _0x3355d0=fileTreeHash(_0xbeceae);if(_0x3355d0!==_0x351860[_0x536b0d(0xc6)][_0x536b0d(0xa4)]())throw CliErrors[_0x536b0d(0xaa)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x536b0d(0xc7)](_0x351860['schemaVersion'])?_0x351860[_0x536b0d(0xd0)]:0x2,'ossPath':_0xc51318,'treeSha256':_0x3355d0,'zipSha256':_0x351860[_0x536b0d(0xb9)][_0x536b0d(0xa4)](),'zipSize':_0x351860[_0x536b0d(0xc1)],'files':_0xbeceae};}function extractAndVerifyPackage(_0x135777,_0x55fd31){const _0xf34247=a125_0x4fa4,_0x10e9c1=normalizePackageManifest(_0x135777,{'requireOssPath':![]});if(!_0x10e9c1)throw CliErrors[_0xf34247(0xaa)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x55fd31[_0xf34247(0xb6)]!==_0x10e9c1[_0xf34247(0xc1)])throw CliErrors[_0xf34247(0xaa)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x398620=bufferSha256(_0x55fd31);if(_0x398620!==_0x10e9c1[_0xf34247(0xb9)])throw CliErrors[_0xf34247(0xaa)](_0xf34247(0xca));return extractAndVerifyPackageFiles(_0x10e9c1,_0x55fd31);}function extractAndVerifyPackageFiles(_0x5721d,_0x41655a){const _0x555595=a125_0x4fa4,_0x5dfeed=parseZipPackage(_0x41655a);if(_0x5dfeed[_0x555595(0xb6)]!==_0x5721d[_0x555595(0xac)][_0x555595(0xb6)])throw CliErrors[_0x555595(0xaa)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x27444b=new Map();for(const _0x1ae74e of _0x5dfeed){if(_0x27444b[_0x555595(0xa5)](_0x1ae74e[_0x555595(0xab)]))throw CliErrors[_0x555595(0xaa)](_0x555595(0xb8)+_0x1ae74e[_0x555595(0xab)]);_0x27444b[_0x555595(0xcf)](_0x1ae74e[_0x555595(0xab)],_0x1ae74e);}const _0x55fcf0=[];for(const _0x34245b of _0x5721d[_0x555595(0xac)]){const _0x5b51e0=_0x27444b[_0x555595(0xad)](_0x34245b['path']);if(!_0x5b51e0)throw CliErrors['validation'](_0x555595(0xd1)+_0x34245b['path']);if(_0x5b51e0[_0x555595(0xa7)][_0x555595(0xb6)]!==_0x34245b[_0x555595(0xc3)])throw CliErrors[_0x555595(0xaa)](_0x555595(0xaf)+_0x34245b[_0x555595(0xab)]);const _0x3edc45=bufferSha256(_0x5b51e0['bytes']);if(_0x3edc45!==_0x34245b[_0x555595(0xbc)])throw CliErrors[_0x555595(0xaa)](_0x555595(0xa9)+_0x34245b['path']);_0x55fcf0['push']({'path':_0x34245b[_0x555595(0xab)],'bytes':_0x5b51e0['bytes']});}return normalizeLocalFiles(_0x55fcf0);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x175e4f,_0x3dbdaf){var _0x576dfa=a126_0x5217,_0x2322be=_0x175e4f();while(!![]){try{var _0x3243cb=parseInt(_0x576dfa(0x1c5))/0x1*(parseInt(_0x576dfa(0x1c9))/0x2)+-parseInt(_0x576dfa(0x1cc))/0x3+parseInt(_0x576dfa(0x1c8))/0x4+-parseInt(_0x576dfa(0x1c6))/0x5+-parseInt(_0x576dfa(0x1cb))/0x6*(-parseInt(_0x576dfa(0x1c7))/0x7)+-parseInt(_0x576dfa(0x1ce))/0x8*(-parseInt(_0x576dfa(0x1cd))/0x9)+parseInt(_0x576dfa(0x1cf))/0xa*(-parseInt(_0x576dfa(0x1ca))/0xb);if(_0x3243cb===_0x3dbdaf)break;else _0x2322be['push'](_0x2322be['shift']());}catch(_0x3140c9){_0x2322be['push'](_0x2322be['shift']());}}}(a126_0x7406,0x642cb));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a126_0x5217(_0x2fb9de,_0x56d412){_0x2fb9de=_0x2fb9de-0x1c5;var _0x7406c5=a126_0x7406();var _0x521743=_0x7406c5[_0x2fb9de];return _0x521743;}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 a126_0x7406(){var _0x3a0ecc=['3211760utUGWL','180CelrnH','467qGNNAN','176220gYnkEe','972741yvuhLG','770092jWbxrv','3390ZhUdhS','563629kdcdVi','6oiaxqG','469980jvKMXc','9rsCCos'];a126_0x7406=function(){return _0x3a0ecc;};return a126_0x7406();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a127_0x438f27=a127_0x2a83;(function(_0x51318c,_0x19660d){const _0x46b165=a127_0x2a83,_0x1f08e7=_0x51318c();while(!![]){try{const _0x3d4993=-parseInt(_0x46b165(0x1ba))/0x1+-parseInt(_0x46b165(0x1b4))/0x2+-parseInt(_0x46b165(0x1c0))/0x3*(-parseInt(_0x46b165(0x1b7))/0x4)+parseInt(_0x46b165(0x1c3))/0x5+parseInt(_0x46b165(0x1c9))/0x6+-parseInt(_0x46b165(0x1b9))/0x7+parseInt(_0x46b165(0x1ad))/0x8;if(_0x3d4993===_0x19660d)break;else _0x1f08e7['push'](_0x1f08e7['shift']());}catch(_0x395acb){_0x1f08e7['push'](_0x1f08e7['shift']());}}}(a127_0x1e49,0xb8b4c));function a127_0x2a83(_0xb32bf7,_0xc738ab){_0xb32bf7=_0xb32bf7-0x1a9;const _0x1e49cf=a127_0x1e49();let _0x2a8367=_0x1e49cf[_0xb32bf7];return _0x2a8367;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a127_0x438f27(0x1c1),a127_0x438f27(0x1bc));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a127_0x438f27(0x1c1),a127_0x438f27(0x1ab)),join('.claude',a127_0x438f27(0x1ab))];const SUPPORTED_LOCK_VERSIONS=[0x3];function a127_0x1e49(){const _0x754374=['.agents','absent','6974365bghlZo','unusable','\x20records\x20\x22','globalSkillsDirs','object','unverifiable','5070936OgCvbF','recorded','find','skills','version','8097648faUvhE','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','\x20has\x20no\x20skills\x20map','message','reason','map','parse','864820MCHTrW','join','home','292bdezwz','utf8','7526267uuzjGu','1449375ItUgOG','not-recorded','.skill-lock.json','lockFile','kind','SKILL.md','18957uzYehg'];a127_0x1e49=function(){return _0x754374;};return a127_0x1e49();}function readLockLookup(_0x20bc55,_0x5310af){const _0x58f167=a127_0x438f27;if(!existsSync(_0x20bc55))return{'kind':_0x58f167(0x1bb)};let _0x3df3b2;try{_0x3df3b2=JSON[_0x58f167(0x1b3)](readFileSync(_0x20bc55,_0x58f167(0x1b8)));}catch(_0x57b2d9){return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+'\x20is\x20unreadable:\x20'+_0x57b2d9[_0x58f167(0x1b0)]};}const _0x3a2fe2=_0x3df3b2;if(typeof _0x3a2fe2?.[_0x58f167(0x1ac)]!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x3a2fe2[_0x58f167(0x1ac)]))return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+'\x20uses\x20unsupported\x20version\x20'+String(_0x3a2fe2?.['version'])};if(!_0x3a2fe2[_0x58f167(0x1ab)]||typeof _0x3a2fe2[_0x58f167(0x1ab)]!==_0x58f167(0x1c7))return{'kind':_0x58f167(0x1c4),'reason':_0x20bc55+_0x58f167(0x1af)};return _0x3a2fe2[_0x58f167(0x1ab)][_0x5310af]?{'kind':_0x58f167(0x1a9)}:{'kind':_0x58f167(0x1bb)};}export function resolveInstalledSkill(_0x105b12,_0xf11c67){const _0x23ba55=a127_0x438f27,_0x578d88=_0xf11c67?.[_0x23ba55(0x1b6)]??homedir(),_0x10e07d=_0xf11c67?.[_0x23ba55(0x1c6)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS['map'](_0x412bc0=>join(_0x578d88,_0x412bc0)),_0x1a0648=_0xf11c67?.[_0x23ba55(0x1bd)]??join(_0x578d88,SKILL_LOCK_RELATIVE_PATH),_0x92cab0=_0x10e07d[_0x23ba55(0x1b2)](_0xd6d809=>join(_0xd6d809,_0x105b12,_0x23ba55(0x1bf))),_0x351826=_0x92cab0[_0x23ba55(0x1aa)](_0x28725a=>existsSync(_0x28725a));if(_0x351826)return{'state':'present','path':_0x351826};const _0x26bbeb=readLockLookup(_0x1a0648,_0x105b12);if(_0x26bbeb[_0x23ba55(0x1be)]===_0x23ba55(0x1c4))return{'state':_0x23ba55(0x1c8),'reason':_0x26bbeb[_0x23ba55(0x1b1)]};if(_0x26bbeb[_0x23ba55(0x1be)]===_0x23ba55(0x1a9))return{'state':'unverifiable','reason':_0x1a0648+_0x23ba55(0x1c5)+_0x105b12+_0x23ba55(0x1ae)+('('+_0x92cab0[_0x23ba55(0x1b5)](',\x20')+')')};return{'state':_0x23ba55(0x1c2),'checked':_0x92cab0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2b50e7,_0x58a973){const _0x3b73c1=a128_0x114c,_0x56c193=_0x2b50e7();while(!![]){try{const _0x12f868=parseInt(_0x3b73c1(0x18a))/0x1*(parseInt(_0x3b73c1(0x192))/0x2)+parseInt(_0x3b73c1(0x189))/0x3+-parseInt(_0x3b73c1(0x18b))/0x4*(parseInt(_0x3b73c1(0x193))/0x5)+-parseInt(_0x3b73c1(0x18f))/0x6+parseInt(_0x3b73c1(0x18c))/0x7*(-parseInt(_0x3b73c1(0x190))/0x8)+-parseInt(_0x3b73c1(0x18d))/0x9+-parseInt(_0x3b73c1(0x18e))/0xa*(-parseInt(_0x3b73c1(0x191))/0xb);if(_0x12f868===_0x58a973)break;else _0x56c193['push'](_0x56c193['shift']());}catch(_0xf163a7){_0x56c193['push'](_0x56c193['shift']());}}}(a128_0x5918,0x2d1fb));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a128_0x114c(_0x119bbb,_0x588233){_0x119bbb=_0x119bbb-0x189;const _0x5918ef=a128_0x5918();let _0x114c65=_0x5918ef[_0x119bbb];return _0x114c65;}function a128_0x5918(){const _0x4bc2f6=['2257686ijocOD','130210LTlTWf','698304PifHfK','2779976cMbODO','429fkUvwC','76708oGkbVl','25ufVstT','337461tbtnNf','9nSWhMG','52744xcfcJT','7pRHwYE'];a128_0x5918=function(){return _0x4bc2f6;};return a128_0x5918();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a129_0x457552=a129_0x2b36;(function(_0x51c1d7,_0x3a1188){const _0x2f7434=a129_0x2b36,_0x1c5c0a=_0x51c1d7();while(!![]){try{const _0x18efed=-parseInt(_0x2f7434(0x19c))/0x1*(-parseInt(_0x2f7434(0x1af))/0x2)+-parseInt(_0x2f7434(0x1ac))/0x3+-parseInt(_0x2f7434(0x18b))/0x4+parseInt(_0x2f7434(0x1a9))/0x5+-parseInt(_0x2f7434(0x18d))/0x6+parseInt(_0x2f7434(0x1a8))/0x7*(parseInt(_0x2f7434(0x1a2))/0x8)+parseInt(_0x2f7434(0x1ad))/0x9;if(_0x18efed===_0x3a1188)break;else _0x1c5c0a['push'](_0x1c5c0a['shift']());}catch(_0x5075b2){_0x1c5c0a['push'](_0x1c5c0a['shift']());}}}(a129_0x561f,0xdb27d));function a129_0x561f(){const _0x2a2360=['duration','split','winstonLogger','utf8','createLogger','initWinstonLogger','1744644hIEHsX','blue','5610168ZAsCfd','now','Failed:\x20','parse','combine','clearLogs','warn','error','trim','filter','readLogs','clear','join','existsSync','logFilePath','221PzbkxW','Failed\x20to\x20read\x20logs:','mkdirSync','timestamp','Completed:\x20','log','464bKHCHB','format','success','writeFileSync','info','currentRawCommand','181265Bzcqoo','8749775JFqRTH','command','setLogPath','5307894pHPNhr','6358518xBqRVo','red','722ecvwSh','getWinstonInstance','readFileSync','File'];a129_0x561f=function(){return _0x2a2360;};return a129_0x561f();}function a129_0x2b36(_0xe29b1f,_0x3a7580){_0xe29b1f=_0xe29b1f-0x184;const _0x561f0c=a129_0x561f();let _0x2b3678=_0x561f0c[_0xe29b1f];return _0x2b3678;}import a129_0x7254f2 from'winston';import a129_0x2400ae from'node:fs';import a129_0x3abc98 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];['logFilePath']='';[a129_0x457552(0x1a7)]='';constructor(){}['setRawCommand'](_0x2b60b7){this['currentRawCommand']=_0x2b60b7;}[a129_0x457552(0x1ab)](_0x58c6ba){const _0x1726e1=a129_0x457552;this[_0x1726e1(0x19b)]=a129_0x3abc98[_0x1726e1(0x199)](_0x58c6ba,PRODUCT_CONFIG['logFileName']),this[_0x1726e1(0x187)]&&this[_0x1726e1(0x187)][_0x1726e1(0x198)](),this[_0x1726e1(0x18a)]();}[a129_0x457552(0x18a)](){const _0x392249=a129_0x457552,_0x1ddb77=a129_0x3abc98['dirname'](this[_0x392249(0x19b)]);!a129_0x2400ae[_0x392249(0x19a)](_0x1ddb77)&&a129_0x2400ae[_0x392249(0x19e)](_0x1ddb77,{'recursive':!![]});const _0x26f221=a129_0x7254f2[_0x392249(0x1a3)][_0x392249(0x191)](a129_0x7254f2[_0x392249(0x1a3)]['timestamp'](),a129_0x7254f2[_0x392249(0x1a3)]['errors']({'stack':!![]}),a129_0x7254f2[_0x392249(0x1a3)]['printf'](_0x40a8fa=>{const _0x37632f=_0x392249,_0x343923={'timestamp':_0x40a8fa[_0x37632f(0x19f)]||new Date()['toISOString'](),'level':_0x40a8fa['level']||_0x37632f(0x1a6),'command':_0x40a8fa[_0x37632f(0x1aa)]||'unknown','rawCommand':_0x40a8fa['rawCommand']||this[_0x37632f(0x1a7)]||undefined,'message':_0x40a8fa['message']||'','duration':_0x40a8fa[_0x37632f(0x185)]||undefined,'details':_0x40a8fa['details']||undefined};return JSON['stringify'](_0x343923);}));this[_0x392249(0x187)]=a129_0x7254f2[_0x392249(0x189)]({'level':_0x392249(0x1a6),'format':_0x26f221,'transports':[new a129_0x7254f2['transports'][(_0x392249(0x184))]({'filename':this['logFilePath'],'level':_0x392249(0x1a6)})],'silent':![]}),a129_0x7254f2['addColors']({'success':'green','error':_0x392249(0x1ae),'warn':'yellow','info':_0x392249(0x18c)});}[a129_0x457552(0x1a6)](_0xa5fb57,_0x43a797,_0x462796){const _0x11a63f=a129_0x457552;if(!this['logFilePath']||!this[_0x11a63f(0x187)])return;this['winstonLogger'][_0x11a63f(0x1a6)](_0x43a797,{'command':_0xa5fb57,'details':_0x462796});}['success'](_0x236054,_0x59e1b2,_0x4ba6c8,_0x2e7d90){const _0x1dc50d=a129_0x457552;if(!this[_0x1dc50d(0x19b)]||!this[_0x1dc50d(0x187)])return;this['winstonLogger'][_0x1dc50d(0x1a1)](_0x1dc50d(0x1a6),_0x59e1b2,{'level':_0x1dc50d(0x1a4),'command':_0x236054,'duration':_0x4ba6c8,'details':_0x2e7d90});}[a129_0x457552(0x194)](_0x5b3555,_0x3e9c37,_0x20cbc3){const _0x3194ad=a129_0x457552;if(!this[_0x3194ad(0x19b)]||!this['winstonLogger'])return;this[_0x3194ad(0x187)][_0x3194ad(0x194)](_0x3e9c37,{'command':_0x5b3555,'details':_0x20cbc3});}[a129_0x457552(0x193)](_0x3628cf,_0x1802bf,_0x53c12e){const _0x59ea0e=a129_0x457552;if(!this['logFilePath']||!this[_0x59ea0e(0x187)])return;this['winstonLogger'][_0x59ea0e(0x193)](_0x1802bf,{'command':_0x3628cf,'details':_0x53c12e});}async['logTask'](_0x5af2d7,_0x2866b6,_0x327ea2){const _0x12a694=a129_0x457552,_0x56e2fe=Date[_0x12a694(0x18e)]();this[_0x12a694(0x1a6)](_0x5af2d7,'Starting:\x20'+_0x2866b6);try{const _0x1b9a72=await _0x327ea2(),_0x18819e=Date[_0x12a694(0x18e)]()-_0x56e2fe;return this['success'](_0x5af2d7,_0x12a694(0x1a0)+_0x2866b6,_0x18819e),_0x1b9a72;}catch(_0x344924){const _0x2508fd=Date[_0x12a694(0x18e)]()-_0x56e2fe;this[_0x12a694(0x194)](_0x5af2d7,_0x12a694(0x18f)+_0x2866b6,{'error':_0x344924 instanceof Error?_0x344924['message']:String(_0x344924),'duration':_0x2508fd});throw _0x344924;}}[a129_0x457552(0x197)](){const _0x456768=a129_0x457552;try{if(!a129_0x2400ae['existsSync'](this[_0x456768(0x19b)]))return[];const _0xe760fd=a129_0x2400ae[_0x456768(0x1b1)](this['logFilePath'],_0x456768(0x188));return _0xe760fd[_0x456768(0x186)](/\r?\n/)[_0x456768(0x196)](_0x4856df=>_0x4856df[_0x456768(0x195)]())['map'](_0x11ee16=>JSON[_0x456768(0x190)](_0x11ee16));}catch(_0x59f28b){return console['warn'](_0x456768(0x19d),_0x59f28b),[];}}[a129_0x457552(0x192)](){const _0x193933=a129_0x457552;try{a129_0x2400ae['existsSync'](this[_0x193933(0x19b)])&&a129_0x2400ae[_0x193933(0x1a5)](this[_0x193933(0x19b)],'',_0x193933(0x188));}catch(_0x396832){console['warn']('Failed\x20to\x20clear\x20logs:',_0x396832);}}[a129_0x457552(0x1b0)](){const _0x1f7a6a=a129_0x457552;return this[_0x1f7a6a(0x187)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a130_0x261968=a130_0x22dc;function a130_0x22dc(_0x1d4b8d,_0x3266ed){_0x1d4b8d=_0x1d4b8d-0x17a;const _0x10fe90=a130_0x10fe();let _0x22dc47=_0x10fe90[_0x1d4b8d];return _0x22dc47;}(function(_0x303f93,_0xdd544f){const _0x1e63ed=a130_0x22dc,_0xaf2337=_0x303f93();while(!![]){try{const _0x199931=parseInt(_0x1e63ed(0x18f))/0x1*(-parseInt(_0x1e63ed(0x18a))/0x2)+-parseInt(_0x1e63ed(0x18d))/0x3*(-parseInt(_0x1e63ed(0x18e))/0x4)+parseInt(_0x1e63ed(0x189))/0x5*(-parseInt(_0x1e63ed(0x188))/0x6)+-parseInt(_0x1e63ed(0x183))/0x7*(-parseInt(_0x1e63ed(0x17d))/0x8)+parseInt(_0x1e63ed(0x17e))/0x9+parseInt(_0x1e63ed(0x187))/0xa*(parseInt(_0x1e63ed(0x182))/0xb)+-parseInt(_0x1e63ed(0x181))/0xc;if(_0x199931===_0xdd544f)break;else _0xaf2337['push'](_0xaf2337['shift']());}catch(_0x441eed){_0xaf2337['push'](_0xaf2337['shift']());}}}(a130_0x10fe,0x24ded));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x185)]),MIN_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x17f)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a130_0x10fe(){const _0xd39949=['includes','parse','227547brVtfb','12rmmiEf','5834laRlDK','exec','length','undefined','defineProperty','24kCplmQ','2504403AfCsJD','MIN_SAFE_INTEGER','json','4920660moKYiQ','1302598avDVlh','529473NkXwVx','prototype','MAX_SAFE_INTEGER','slice','10JPVKmQ','6wPhzZs','1421195vbAKKn','2AuqGAb'];a130_0x10fe=function(){return _0xd39949;};return a130_0x10fe();}function isUnsafeIntegerLiteral(_0x1b6914){const _0x1c022f=a130_0x261968;if(_0x1b6914[_0x1c022f(0x18b)]('.')||_0x1b6914[_0x1c022f(0x18b)]('e')||_0x1b6914[_0x1c022f(0x18b)]('E'))return![];const _0x2022ba=BigInt(_0x1b6914);return _0x2022ba>MAX_SAFE_INTEGER||_0x2022ba<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x43884a){const _0x4ae850=a130_0x261968;let _0x16a36a='',_0x2cde78=![],_0x44a00d=![];for(let _0x3eb7c8=0x0;_0x3eb7c8<_0x43884a[_0x4ae850(0x17a)];){const _0x488a2f=_0x43884a[_0x3eb7c8];if(_0x2cde78){_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;if(_0x44a00d)_0x44a00d=![];else{if(_0x488a2f==='\x5c')_0x44a00d=!![];else _0x488a2f==='\x22'&&(_0x2cde78=![]);}continue;}if(_0x488a2f==='\x22'){_0x2cde78=!![],_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;continue;}if(_0x488a2f==='-'||_0x488a2f>='0'&&_0x488a2f<='9'){const _0x133850=JSON_NUMBER_PATTERN[_0x4ae850(0x190)](_0x43884a[_0x4ae850(0x186)](_0x3eb7c8))?.[0x0];if(_0x133850){_0x16a36a+=isUnsafeIntegerLiteral(_0x133850)?'\x22'+_0x133850+'\x22':_0x133850,_0x3eb7c8+=_0x133850[_0x4ae850(0x17a)];continue;}}_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;}return _0x16a36a;}export function parseLosslessJson(_0x2ec0f8){const _0x599ab8=a130_0x261968;return JSON[_0x599ab8(0x18c)](quoteUnsafeIntegerLiterals(_0x2ec0f8));}export function installLosslessJsonResponseParser(){const _0x321e4f=a130_0x261968;if(typeof Response===_0x321e4f(0x17b))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x321e4f(0x184)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,'json'),Object[_0x321e4f(0x17c)](responseJsonPrototype,_0x321e4f(0x180),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x574d46(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x56cd00=_0x321e4f;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x56cd00(0x180),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|