@lovrabet/lovrabet-cli 2.2.3-beta.1 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/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(_0x3da454,_0x368081){const _0x5ea129=a116_0x54a5,_0x2186b6=_0x3da454();while(!![]){try{const _0x47d4cd=-parseInt(_0x5ea129(0x12a))/0x1+parseInt(_0x5ea129(0x130))/0x2+parseInt(_0x5ea129(0x116))/0x3*(parseInt(_0x5ea129(0x12b))/0x4)+parseInt(_0x5ea129(0x136))/0x5*(-parseInt(_0x5ea129(0x131))/0x6)+-parseInt(_0x5ea129(0x120))/0x7*(-parseInt(_0x5ea129(0x11c))/0x8)+parseInt(_0x5ea129(0x115))/0x9*(-parseInt(_0x5ea129(0x119))/0xa)+-parseInt(_0x5ea129(0x124))/0xb*(parseInt(_0x5ea129(0x10f))/0xc);if(_0x47d4cd===_0x368081)break;else _0x2186b6['push'](_0x2186b6['shift']());}catch(_0x1d29eb){_0x2186b6['push'](_0x2186b6['shift']());}}}(a116_0x57de,0xbaff3));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';function a116_0x57de(){const _0x29fbc9=['isArray','code','180VyiqSq','isDirectory','appCode','4376FqqDKB','tags','skillRoots','from','12187KGWKPY','get','linkedPath','sort','7462081mtMYQB','cache','values','cacheDir','builtin','env','109622pffzsj','56VDkYpr','scope','source','metadataPath','trim','2105320HMayRH','77208FSxkbY','validation','isSymbolicLink','project','dir','115DbUiUw','skillMdPath','accessKey','localeCompare','name','map','24SLvNhZ','skillCode','local','linkedPaths','set','push','454131VAZtBp','306759FFrLgb'];a116_0x57de=function(){return _0x29fbc9;};return a116_0x57de();}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(_0x3e09b5,_0x4d7a66,_0x5471b9={}){const _0x179722=a116_0x54a5,_0x24f8cd=safePathSegment(_0x3e09b5['appCode'],_0x179722(0x11b));if(_0x4d7a66[_0x179722(0x11b)]!==_0x24f8cd)throw CliErrors[_0x179722(0x132)]('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x4d7a66[_0x179722(0x11b)]+'\x20!=\x20'+_0x24f8cd);const _0x92e18d=normalizeRuntimeSkillScopes(_0x3e09b5['scopes']),_0x57d829=new Set(_0x92e18d),_0x4c0aa=_0x3e09b5[_0x179722(0x118)]?.[_0x179722(0x12f)](),_0x1d911=new Map(),_0x5d821b=resolve(getRuntimeSkillCacheRoot(_0x3e09b5[_0x179722(0x129)],_0x3e09b5[_0x179722(0x138)],_0x5471b9),_0x24f8cd);for(const _0x135df0 of _0x92e18d){for(const _0x2540f7 of localSkillEntryDirs(resolve(_0x5d821b,_0x135df0))){collectLocalRuntimeSkill(_0x1d911,_0x2540f7,{'appCode':_0x24f8cd,'scopes':_0x57d829,'code':_0x4c0aa,'source':_0x179722(0x125)});}}for(const _0x269735 of _0x4d7a66[_0x179722(0x11e)]){for(const _0x2d89a5 of localSkillLinkCandidates(_0x269735,_0x4d7a66,_0x57d829)){collectLocalRuntimeSkill(_0x1d911,_0x2d89a5,{'appCode':_0x24f8cd,'scopes':_0x57d829,'code':_0x4c0aa,'source':'link','linkedPath':_0x2d89a5});}}return Array[_0x179722(0x11f)](_0x1d911[_0x179722(0x126)]())[_0x179722(0x123)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x114be0){const _0x3f039f=a116_0x54a5;if(!existsSync(_0x114be0))return[];return readdirSync(_0x114be0,{'withFileTypes':!![]})['filter'](_0x91a33=>_0x91a33[_0x3f039f(0x11a)]()||_0x91a33[_0x3f039f(0x133)]())[_0x3f039f(0x10e)](_0x13d723=>resolve(_0x114be0,_0x13d723[_0x3f039f(0x10d)]));}function localSkillLinkCandidates(_0x31705c,_0x3ef009,_0x3adbe9){const _0x21af29=a116_0x54a5;if(!existsSync(_0x31705c))return[];const _0x149ef4=_0x3ef009[_0x21af29(0x11b)]+'--';return readdirSync(_0x31705c,{'withFileTypes':!![]})['filter'](_0x399832=>_0x399832['isDirectory']()||_0x399832[_0x21af29(0x133)]())['filter'](_0x456d9b=>_0x3ef009[_0x21af29(0x12c)]===_0x21af29(0x134)||_0x456d9b[_0x21af29(0x10d)]['startsWith'](_0x149ef4)||_0x3adbe9['has'](_0x21af29(0x128)))['map'](_0x39abe3=>resolve(_0x31705c,_0x39abe3[_0x21af29(0x10d)]));}function collectLocalRuntimeSkill(_0x26da28,_0x518eb3,_0x3f2cd8){const _0x4c1a1a=a116_0x54a5,_0xfa9795=resolve(_0x518eb3,METADATA_FILE),_0x350724=readMetadataIfPresent(_0xfa9795);if(!_0x350724)return;if(_0x350724[_0x4c1a1a(0x11b)]!==_0x3f2cd8[_0x4c1a1a(0x11b)])return;if(!isRuntimeSkillScope(_0x350724[_0x4c1a1a(0x12c)])||!_0x3f2cd8['scopes']['has'](_0x350724[_0x4c1a1a(0x12c)]))return;const _0xf95cab=_0x350724[_0x4c1a1a(0x110)]?.[_0x4c1a1a(0x12f)]();if(!_0xf95cab)return;if(_0x3f2cd8[_0x4c1a1a(0x118)]&&_0xf95cab!==_0x3f2cd8[_0x4c1a1a(0x118)])return;const _0x8b2caa=_0x350724['scope']+':'+_0xf95cab,_0x565a7a=_0x3f2cd8[_0x4c1a1a(0x122)]?[_0x3f2cd8['linkedPath']]:[],_0x4869a7=_0x26da28[_0x4c1a1a(0x121)](_0x8b2caa);if(_0x4869a7){_0x3f2cd8[_0x4c1a1a(0x12d)]===_0x4c1a1a(0x125)&&(_0x4869a7['dir']=_0x518eb3,_0x4869a7[_0x4c1a1a(0x127)]=_0x518eb3,_0x4869a7[_0x4c1a1a(0x137)]=resolve(_0x518eb3,SKILL_FILE),_0x4869a7[_0x4c1a1a(0x12e)]=_0xfa9795);for(const _0x3c5bab of _0x565a7a){!_0x4869a7[_0x4c1a1a(0x112)]['includes'](_0x3c5bab)&&_0x4869a7[_0x4c1a1a(0x112)][_0x4c1a1a(0x114)](_0x3c5bab);}_0x4869a7[_0x4c1a1a(0x112)][_0x4c1a1a(0x123)]();return;}_0x26da28[_0x4c1a1a(0x113)](_0x8b2caa,{..._0x350724,'tags':Array[_0x4c1a1a(0x117)](_0x350724[_0x4c1a1a(0x11d)])?_0x350724[_0x4c1a1a(0x11d)]:[],'scope':_0x350724[_0x4c1a1a(0x12c)],'source':_0x4c1a1a(0x111),'dir':_0x518eb3,'cacheDir':_0x3f2cd8['source']===_0x4c1a1a(0x125)?_0x518eb3:undefined,'skillMdPath':resolve(_0x518eb3,SKILL_FILE),'metadataPath':_0xfa9795,'linkedPaths':_0x565a7a});}function a116_0x54a5(_0x494748,_0x485789){_0x494748=_0x494748-0x10c;const _0x57def1=a116_0x57de();let _0x54a569=_0x57def1[_0x494748];return _0x54a569;}function compareLocalRuntimeSkills(_0x5146ef,_0x34aac8){const _0x3aa1fb=a116_0x54a5,_0x1a93f3={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1a93f3[_0x5146ef[_0x3aa1fb(0x12c)]]-_0x1a93f3[_0x34aac8['scope']]||_0x5146ef[_0x3aa1fb(0x110)]['localeCompare'](_0x34aac8[_0x3aa1fb(0x110)])||_0x5146ef[_0x3aa1fb(0x135)][_0x3aa1fb(0x10c)](_0x34aac8[_0x3aa1fb(0x135)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x440e2a,_0x4a9513){const _0x4db76f=a117_0x1a9d,_0x28a747=_0x440e2a();while(!![]){try{const _0x3242f9=parseInt(_0x4db76f(0x165))/0x1+-parseInt(_0x4db76f(0x174))/0x2*(parseInt(_0x4db76f(0x16e))/0x3)+-parseInt(_0x4db76f(0x161))/0x4+parseInt(_0x4db76f(0x150))/0x5+-parseInt(_0x4db76f(0x157))/0x6+-parseInt(_0x4db76f(0x167))/0x7*(parseInt(_0x4db76f(0x160))/0x8)+parseInt(_0x4db76f(0x153))/0x9*(parseInt(_0x4db76f(0x14d))/0xa);if(_0x3242f9===_0x4a9513)break;else _0x28a747['push'](_0x28a747['shift']());}catch(_0x1843bd){_0x28a747['push'](_0x28a747['shift']());}}}(a117_0x5073,0xbf140));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(_0x5e1cfe){const _0x3bd1cc=a117_0x1a9d;return _0x5e1cfe[_0x3bd1cc(0x164)]??Buffer[_0x3bd1cc(0x16f)](_0x5e1cfe[_0x3bd1cc(0x168)]??'','utf8');}export function fileText(_0x4ee0de){const _0xb0003=a117_0x1a9d;return fileContent(_0x4ee0de)[_0xb0003(0x15c)](_0xb0003(0x156));}export function normalizeLocalFiles(_0x101a30){const _0x1aa80e=a117_0x1a9d;if(!Array[_0x1aa80e(0x14f)](_0x101a30)||_0x101a30[_0x1aa80e(0x172)]===0x0)return[];const _0x10aec1=new Map();for(const _0x451120 of _0x101a30){if(!_0x451120||typeof _0x451120!=='object'||typeof _0x451120[_0x1aa80e(0x173)]!==_0x1aa80e(0x151))throw CliErrors[_0x1aa80e(0x162)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x4ce23f=normalizeSkillRelativePath(_0x451120[_0x1aa80e(0x173)]);if(_0x10aec1[_0x1aa80e(0x178)](_0x4ce23f))throw CliErrors[_0x1aa80e(0x162)](_0x1aa80e(0x16c)+_0x4ce23f);if(_0x451120[_0x1aa80e(0x164)]!==undefined&&!Buffer[_0x1aa80e(0x16a)](_0x451120[_0x1aa80e(0x164)]))throw CliErrors[_0x1aa80e(0x162)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x4ce23f);if(_0x451120[_0x1aa80e(0x164)]===undefined&&typeof _0x451120['content']!==_0x1aa80e(0x151))throw CliErrors[_0x1aa80e(0x162)](_0x1aa80e(0x171)+_0x4ce23f);const _0x5352c7=fileContent(_0x451120);_0x10aec1['set'](_0x4ce23f,{'path':_0x4ce23f,'bytes':_0x5352c7});}return Array[_0x1aa80e(0x16f)](_0x10aec1[_0x1aa80e(0x158)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x1fb0a3){const _0x2a3e78=a117_0x1a9d;if(!Array['isArray'](_0x1fb0a3)||_0x1fb0a3[_0x2a3e78(0x172)]===0x0)return[];const _0x108b2f=new Map();for(const _0x47aab7 of _0x1fb0a3){if(!_0x47aab7||typeof _0x47aab7!==_0x2a3e78(0x14b)||typeof _0x47aab7[_0x2a3e78(0x173)]!==_0x2a3e78(0x151))throw CliErrors[_0x2a3e78(0x162)](_0x2a3e78(0x166));const _0x375220=normalizeSkillRelativePath(_0x47aab7[_0x2a3e78(0x173)]);if(_0x108b2f[_0x2a3e78(0x178)](_0x375220))throw CliErrors['validation'](_0x2a3e78(0x16c)+_0x375220);if(!isSha256Hex(_0x47aab7[_0x2a3e78(0x163)]))throw CliErrors[_0x2a3e78(0x162)](_0x2a3e78(0x15a)+_0x375220);if(!Number[_0x2a3e78(0x15d)](_0x47aab7[_0x2a3e78(0x176)])||_0x47aab7['size']<0x0)throw CliErrors[_0x2a3e78(0x162)](_0x2a3e78(0x177)+_0x375220);_0x108b2f['set'](_0x375220,{'path':_0x375220,'sha256':_0x47aab7['sha256']['toLowerCase'](),'size':_0x47aab7[_0x2a3e78(0x176)]});}return Array[_0x2a3e78(0x16f)](_0x108b2f['values']())[_0x2a3e78(0x15b)](compareSkillFiles);}function a117_0x5073(){const _0x564f8a=['toString','isSafeInteger','includes','split','80VTiFxK','377580MJXvwI','validation','sha256','bytes','129032OtgLXN','Skill\x20file\x20path\x20must\x20be\x20text.','375571tuPbMl','content','replace','isBuffer','test','Duplicate\x20Skill\x20file\x20path:\x20','add','1075461NrzCSW','from','startsWith','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','length','path','4xxIlFX','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','size','Skill\x20file\x20size\x20is\x20invalid:\x20','has','isFile','object','Unsafe\x20Skill\x20file\x20path:\x20','1712110mWmIZq','push','isArray','4125185FznaSB','string','excludedFilePaths','126kXbftL','localeCompare','isDirectory','utf8','7322808mRLMJg','values','name','Skill\x20file\x20sha256\x20is\x20invalid:\x20','sort'];a117_0x5073=function(){return _0x564f8a;};return a117_0x5073();}export function scanSkillDirectory(_0x534ed9,_0xbfdaca={}){const _0xc112fa=a117_0x1a9d,_0xad3d4d=realpathSync(_0x534ed9),_0x3e35e4=canonicalExcludedFilePaths(_0xbfdaca[_0xc112fa(0x152)]),_0x360ae7=[];function _0x5b9eba(_0x7c9fe){const _0x45b557=_0xc112fa,_0x2a34ab=readdirSync(_0x7c9fe,{'withFileTypes':!![]})[_0x45b557(0x15b)]((_0x9f0e66,_0x2a3b6b)=>_0x9f0e66[_0x45b557(0x159)][_0x45b557(0x154)](_0x2a3b6b[_0x45b557(0x159)]));for(const _0x4d387e of _0x2a34ab){if(_0x4d387e[_0x45b557(0x155)]()&&IGNORED_DIR_NAMES['has'](_0x4d387e['name']))continue;if(IGNORED_FILE_NAMES['has'](_0x4d387e[_0x45b557(0x159)]))continue;const _0x3376fc=resolve(_0x7c9fe,_0x4d387e[_0x45b557(0x159)]);if(isExcludedFilePath(_0x3376fc,_0x3e35e4))continue;if(_0x4d387e['isSymbolicLink']())throw CliErrors[_0x45b557(0x162)](_0x45b557(0x175)+_0x3376fc);const _0x2dd9b2=toPosixPath(relative(_0xad3d4d,_0x3376fc));if(_0x4d387e[_0x45b557(0x155)]()){_0x5b9eba(_0x3376fc);continue;}if(!_0x4d387e[_0x45b557(0x179)]())continue;validateSkillRelativePath(_0x2dd9b2);const _0x5cf690=readFileSync(_0x3376fc);_0x360ae7[_0x45b557(0x14e)]({'path':_0x2dd9b2,'bytes':_0x5cf690});}}return _0x5b9eba(_0xad3d4d),normalizeLocalFiles(_0x360ae7);}function canonicalExcludedFilePaths(_0x121a59){const _0x5d803f=a117_0x1a9d,_0x6dc818=new Set();for(const _0x3bbdc8 of _0x121a59??[]){const _0x34472a=resolve(_0x3bbdc8);_0x6dc818[_0x5d803f(0x16d)](_0x34472a);try{_0x6dc818[_0x5d803f(0x16d)](realpathSync(_0x34472a));}catch{}}return _0x6dc818;}function isExcludedFilePath(_0x29eac9,_0x179590){const _0x573068=a117_0x1a9d;if(_0x179590['has'](_0x29eac9))return!![];if(_0x179590[_0x573068(0x176)]===0x0)return![];try{return _0x179590[_0x573068(0x178)](realpathSync(_0x29eac9));}catch{return![];}}export function compareSkillFiles(_0x52e914,_0x4431d4){const _0x4ad293=a117_0x1a9d;if(_0x52e914[_0x4ad293(0x173)]===SKILL_FILE)return _0x4431d4[_0x4ad293(0x173)]===SKILL_FILE?0x0:-0x1;if(_0x4431d4[_0x4ad293(0x173)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x4ad293(0x16f)](_0x52e914[_0x4ad293(0x173)],_0x4ad293(0x156)),Buffer[_0x4ad293(0x16f)](_0x4431d4[_0x4ad293(0x173)],_0x4ad293(0x156)));}export function normalizeSkillRelativePath(_0x49ad39){const _0x338bdd=toPosixPath(_0x49ad39['trim']());return validateSkillRelativePath(_0x338bdd),_0x338bdd;}export function validateSkillRelativePath(_0x46e817){const _0x2f18d1=a117_0x1a9d;if(!_0x46e817||_0x46e817[_0x2f18d1(0x170)]('/')||_0x46e817[_0x2f18d1(0x15e)]('//'))throw CliErrors[_0x2f18d1(0x162)](_0x2f18d1(0x14c)+_0x46e817);for(const _0x449e0f of _0x46e817[_0x2f18d1(0x15f)]('/')){if(!_0x449e0f||_0x449e0f==='.'||_0x449e0f==='..')throw CliErrors['validation'](_0x2f18d1(0x14c)+_0x46e817);}}function a117_0x1a9d(_0x565ed2,_0x5edc98){_0x565ed2=_0x565ed2-0x14b;const _0x50738d=a117_0x5073();let _0x1a9d6b=_0x50738d[_0x565ed2];return _0x1a9d6b;}export function toPosixPath(_0x2f0c0e){const _0x21a7a5=a117_0x1a9d;return _0x2f0c0e[_0x21a7a5(0x169)](/\\/g,'/');}export function isSha256Hex(_0x17afb4){const _0x5781ed=a117_0x1a9d;return typeof _0x17afb4===_0x5781ed(0x151)&&/^[a-fA-F0-9]{64}$/[_0x5781ed(0x16b)](_0x17afb4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ff302,_0x5bbc41){const _0x3fc1c7=a118_0x5ae3,_0xca63e8=_0x5ff302();while(!![]){try{const _0x85b120=parseInt(_0x3fc1c7(0xa2))/0x1+parseInt(_0x3fc1c7(0xb1))/0x2+-parseInt(_0x3fc1c7(0xad))/0x3*(parseInt(_0x3fc1c7(0xa7))/0x4)+-parseInt(_0x3fc1c7(0x7c))/0x5*(-parseInt(_0x3fc1c7(0xac))/0x6)+-parseInt(_0x3fc1c7(0x85))/0x7*(parseInt(_0x3fc1c7(0x93))/0x8)+parseInt(_0x3fc1c7(0x86))/0x9*(parseInt(_0x3fc1c7(0x8b))/0xa)+-parseInt(_0x3fc1c7(0x8a))/0xb;if(_0x85b120===_0x5bbc41)break;else _0xca63e8['push'](_0xca63e8['shift']());}catch(_0x555b0f){_0xca63e8['push'](_0xca63e8['shift']());}}}(a118_0x1386,0x9ae9c));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(_0x46a402,_0x144c9b,_0x3c25c7){const _0x12cb0d=a118_0x5ae3,_0x567c1c=requireSkillCode(_0x46a402),_0x33c62d=requirePackageBytes(_0x567c1c,_0x3c25c7[_0x12cb0d(0x7d)]),_0x1d6544=extractDownloadedPackage(_0x33c62d),_0x2fd24a=_0x1d6544[_0x12cb0d(0x83)](_0x393442=>_0x393442['path']===SKILL_FILE);if(!_0x2fd24a)throw CliErrors[_0x12cb0d(0x8c)](_0x12cb0d(0x9f)+SKILL_FILE+':\x20'+_0x567c1c);const _0x288ad7=withMaterializedSkillFrontmatter(_0x1d6544,_0x46a402,_0x567c1c),_0x9c7b54=_0x288ad7['find'](_0x11e7d1=>_0x11e7d1[_0x12cb0d(0x88)]===SKILL_FILE),_0x22b3bb=fileText(_0x9c7b54),_0x114713=getRuntimeSkillDir(_0x3c25c7[_0x12cb0d(0x94)],_0x3c25c7[_0x12cb0d(0x7b)],_0x3c25c7[_0x12cb0d(0xa3)],_0x144c9b,_0x567c1c,_0x3c25c7[_0x12cb0d(0x91)]),_0x19df0d=resolve(_0x114713,SKILL_FILE),_0x1f31b4=resolve(_0x114713,METADATA_FILE),_0x407280=contentHash(_0x22b3bb),_0x95bd26=readMetadataIfPresent(_0x1f31b4)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x114713,_0x1f31b4,_0x288ad7,_0x3c25c7[_0x12cb0d(0x96)]===!![]),mkdirSync(_0x114713,{'recursive':!![],'mode':0x1c0});const _0x4ee84f=existsSync(_0x19df0d)?readFileSync(_0x19df0d,_0x12cb0d(0xa4)):undefined;return materializeFiles(_0x114713,_0x288ad7),removeStaleManagedFiles(_0x114713,_0x95bd26,_0x288ad7),writeJsonAtomic(_0x1f31b4,buildMetadata(_0x46a402,_0x144c9b,_0x3c25c7['appCode'],_0x407280,_0x3c25c7[_0x12cb0d(0xa5)],_0x288ad7,_0x33c62d)),{'skill':_0x46a402,'scope':_0x144c9b,'dir':_0x114713,'skillMdPath':_0x19df0d,'metadataPath':_0x1f31b4,'contentHash':_0x407280,'changed':_0x4ee84f!==_0x22b3bb};}function withMaterializedSkillFrontmatter(_0x2a66c5,_0x1d5932,_0x3b3a0e){const _0x31c109=a118_0x5ae3,_0x233cae=skillDisplayName(_0x1d5932,_0x3b3a0e),_0x20300e=_0x1d5932[_0x31c109(0x95)]?.[_0x31c109(0x84)]()||_0x233cae||_0x3b3a0e;return normalizeLocalFiles(_0x2a66c5)[_0x31c109(0xa8)](_0x177eac=>{const _0x2c158d=_0x31c109,_0x4580b9=fileText(_0x177eac);if(_0x177eac[_0x2c158d(0x88)]!==SKILL_FILE)return _0x177eac;if(hasYamlFrontmatter(_0x4580b9))return{'path':_0x177eac['path'],'content':withSyncedDisplayName(_0x4580b9,_0x233cae)};return{'path':_0x177eac[_0x2c158d(0x88)],'content':prependSkillFrontmatter(_0x4580b9,{'name':_0x3b3a0e,'displayName':_0x233cae,'description':_0x20300e})};});}function hasYamlFrontmatter(_0xefc987){const _0x57374c=a118_0x5ae3;return/^\uFEFF?---\s*\r?\n/[_0x57374c(0x9e)](_0xefc987);}function a118_0x1386(){const _0x334492=['Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','28CtFSXI','map','has','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','6617154CUgRTr','381279PDLmvB','displayName','contentHash','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','1088886dJVJBE','accessKey','5bSEdzU','packageBytes','displayName:\x20','keys','isFile','contents','name','find','trim','28cHaFmr','7391673gBCjXj','slice','path','fileHashes','11194788mRPYFw','10EoeOWW','validation','filter','flow','---\x0a','replace','paths','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','765552JCuKfL','env','description','force','match','join','---','length','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','trimEnd','entries','test','Runtime\x20Skill\x20package\x20is\x20missing\x20','toString','errors','456060fqDTxb','appCode','utf8','pulledAt'];a118_0x1386=function(){return _0x334492;};return a118_0x1386();}function prependSkillFrontmatter(_0x283e9c,_0x537511){const _0x459dee=a118_0x5ae3,_0x500053=_0x283e9c['replace'](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x537511[_0x459dee(0x82)]),_0x537511['displayName']?_0x459dee(0x7e)+yamlString(_0x537511[_0x459dee(0xae)]):undefined,_0x459dee(0xaa)+yamlString(_0x537511[_0x459dee(0x95)]),_0x459dee(0x99),'',_0x500053][_0x459dee(0x8d)](_0x56d312=>_0x56d312!==undefined)[_0x459dee(0x98)]('\x0a');}function yamlString(_0x4d007a){const _0xcde279=a118_0x5ae3;return JSON['stringify'](_0x4d007a[_0xcde279(0x90)](/\r/g,'')['trim']());}function skillDisplayName(_0x230a5b,_0xbfafb9){const _0x2a9984=a118_0x5ae3,_0x19ab4f=_0x230a5b['skillName']?.[_0x2a9984(0x84)]();return _0x19ab4f||_0xbfafb9;}function withSyncedDisplayName(_0x34c30e,_0xb04fdc){const _0x1b6d63=a118_0x5ae3,_0x11960f=_0x34c30e[_0x1b6d63(0x97)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x11960f)return _0x34c30e;const _0x3b44d7=_0x11960f[0x1]??'',_0x2a0461=_0x11960f[0x2]??'',_0x1c6957=parseDocument(_0x2a0461);if(_0x1c6957[_0x1b6d63(0xa1)][_0x1b6d63(0x9a)]>0x0||!isMap(_0x1c6957[_0x1b6d63(0x81)]))return _0x34c30e;if(_0xb04fdc)_0x1c6957['set'](_0x1b6d63(0xae),_0xb04fdc);else{if(_0x1c6957[_0x1b6d63(0xa9)](_0x1b6d63(0xae)))_0x1c6957['delete']('displayName');else return _0x34c30e;}forceBlockCollections(_0x1c6957[_0x1b6d63(0x81)]);const _0x5b47c2=_0x1c6957[_0x1b6d63(0xa0)]({'lineWidth':0x0})[_0x1b6d63(0x9c)](),_0x21e9d6=_0x34c30e[_0x1b6d63(0x87)](_0x11960f[0x0][_0x1b6d63(0x9a)])[_0x1b6d63(0x90)](/^\r?\n/,'');return _0x3b44d7+_0x1b6d63(0x8f)+_0x5b47c2+'\x0a---\x0a\x0a'+_0x21e9d6;}function a118_0x5ae3(_0x368113,_0x4c75af){_0x368113=_0x368113-0x7b;const _0x13863f=a118_0x1386();let _0x5ae31b=_0x13863f[_0x368113];return _0x5ae31b;}function forceBlockCollections(_0xfc9f07){if(!isNode(_0xfc9f07))return;visit(_0xfc9f07,(_0x1e0446,_0x23ed4a)=>{const _0x10dfdd=a118_0x5ae3;isCollection(_0x23ed4a)&&(_0x23ed4a[_0x10dfdd(0x8e)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x18c09d,_0x22beef,_0x392ec2,_0x27cee8){const _0x27ba56=a118_0x5ae3;if(_0x27cee8||!existsSync(_0x22beef))return;const _0x53cbc7=readMetadataIfPresent(_0x22beef);if(!_0x53cbc7)return;const _0x2cc91f=_0x53cbc7['fileHashes']&&Object['keys'](_0x53cbc7[_0x27ba56(0x89)])['length']>0x0?_0x53cbc7[_0x27ba56(0x89)]:undefined;if(_0x2cc91f)for(const [_0x48ea5b,_0x107176]of Object[_0x27ba56(0x9d)](_0x2cc91f)){const _0x50bf90=resolveManagedFilePath(_0x18c09d,_0x48ea5b);if(!existsSync(_0x50bf90))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x18c09d,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x48ea5b);const _0x1848a9=lstatSync(_0x50bf90);if(!_0x1848a9[_0x27ba56(0x80)]())throw CliErrors[_0x27ba56(0x8c)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x18c09d,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x48ea5b);const _0x40e7f2=bufferSha256(readFileSync(_0x50bf90));if(_0x40e7f2!==_0x107176)throw CliErrors['validation'](_0x27ba56(0x9b)+_0x18c09d+'.\x20Changed\x20file:\x20'+_0x48ea5b,_0x27ba56(0xa6)+_0x48ea5b);}else{const _0x5e06df=resolve(_0x18c09d,SKILL_FILE);if(existsSync(_0x5e06df)&&_0x53cbc7[_0x27ba56(0xaf)]){const _0x5b4641=contentHash(readFileSync(_0x5e06df,_0x27ba56(0xa4)));if(_0x5b4641!==_0x53cbc7[_0x27ba56(0xaf)])throw CliErrors[_0x27ba56(0x8c)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x5e06df,_0x27ba56(0xab));}}for(const _0x1a5f4d of normalizeLocalFiles(_0x392ec2)){if(_0x2cc91f?.[_0x1a5f4d[_0x27ba56(0x88)]])continue;if(!_0x2cc91f&&_0x1a5f4d['path']===SKILL_FILE)continue;const _0x24b44a=resolveManagedFilePath(_0x18c09d,_0x1a5f4d['path']);if(!existsSync(_0x24b44a))continue;const _0x272af9=lstatSync(_0x24b44a);if(!_0x272af9[_0x27ba56(0x80)]())throw CliErrors[_0x27ba56(0x8c)](_0x27ba56(0x9b)+_0x18c09d,_0x27ba56(0xb0)+_0x1a5f4d[_0x27ba56(0x88)]);const _0x204b22=bufferSha256(readFileSync(_0x24b44a));if(_0x204b22!==fileHash(_0x1a5f4d))throw CliErrors[_0x27ba56(0x8c)](_0x27ba56(0x9b)+_0x18c09d,_0x27ba56(0x92)+_0x1a5f4d[_0x27ba56(0x88)]);}}function materializeFiles(_0x369e12,_0xda518b){const _0x387b68=a118_0x5ae3;for(const _0x4da3a5 of normalizeLocalFiles(_0xda518b)){const _0x3ebe45=resolveManagedFilePath(_0x369e12,_0x4da3a5[_0x387b68(0x88)]);mkdirSync(dirname(_0x3ebe45),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3ebe45,fileContent(_0x4da3a5),0x180);}}function removeStaleManagedFiles(_0x2abdf4,_0x231ef9,_0x2462fe){const _0x958f28=a118_0x5ae3;if(!_0x231ef9)return;const _0x8348ef=new Set(normalizeLocalFiles(_0x2462fe)[_0x958f28(0xa8)](_0xa49b40=>_0xa49b40[_0x958f28(0x88)]));for(const _0x4effe4 of Object[_0x958f28(0x7f)](_0x231ef9)){if(_0x8348ef[_0x958f28(0xa9)](_0x4effe4))continue;const _0x3bf51e=resolveManagedFilePath(_0x2abdf4,_0x4effe4);existsSync(_0x3bf51e)&&lstatSync(_0x3bf51e)[_0x958f28(0x80)]()&&rmSync(_0x3bf51e,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4fbe8c,_0x217d62){const _0x42d080=a119_0x55fb,_0x5c6316=_0x4fbe8c();while(!![]){try{const _0x35e982=-parseInt(_0x42d080(0x1f6))/0x1*(-parseInt(_0x42d080(0x1ee))/0x2)+-parseInt(_0x42d080(0x210))/0x3+-parseInt(_0x42d080(0x1fb))/0x4*(-parseInt(_0x42d080(0x1ef))/0x5)+-parseInt(_0x42d080(0x202))/0x6*(parseInt(_0x42d080(0x20c))/0x7)+parseInt(_0x42d080(0x207))/0x8*(-parseInt(_0x42d080(0x1fa))/0x9)+parseInt(_0x42d080(0x206))/0xa*(parseInt(_0x42d080(0x1fc))/0xb)+parseInt(_0x42d080(0x1f1))/0xc*(-parseInt(_0x42d080(0x1fd))/0xd);if(_0x35e982===_0x217d62)break;else _0x5c6316['push'](_0x5c6316['shift']());}catch(_0x51cdc6){_0x5c6316['push'](_0x5c6316['shift']());}}}(a119_0x459b,0x4b68b));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';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';function a119_0x55fb(_0x25d42f,_0x53016c){_0x25d42f=_0x25d42f-0x1eb;const _0x459b4e=a119_0x459b();let _0x55fbed=_0x459b4e[_0x25d42f];return _0x55fbed;}export function buildMetadata(_0x21b01a,_0x5bc281,_0x3671c4,_0x2188a2,_0x88100b,_0xc0ac32,_0x39e54f){const _0x44192c=a119_0x55fb,_0x5d3696=_0xc0ac32?normalizeLocalFiles(_0xc0ac32):[],_0x213725=!_0x39e54f&&_0x5d3696['length']>0x0?buildSkillPackage(_0x5d3696):undefined,_0x1d1a11=_0x39e54f?bufferSha256(_0x39e54f):_0x213725?.[_0x44192c(0x20d)][_0x44192c(0x1fe)],_0x5c9250=_0x39e54f?.[_0x44192c(0x1f7)]??_0x213725?.[_0x44192c(0x20d)]['zipSize'],_0x2e65b2=_0x5d3696[_0x44192c(0x1f7)]>0x0?Object[_0x44192c(0x1f9)](_0x5d3696[_0x44192c(0x1f2)](_0xe91236=>[_0xe91236[_0x44192c(0x1ed)],fileHash(_0xe91236)])):undefined;return{'schemaVersion':_0x5d3696[_0x44192c(0x1f7)]>0x0?0x2:0x1,'id':_0x21b01a['id'],'appCode':_0x3671c4,'skillCode':requireSkillCode(_0x21b01a),'skillName':_0x21b01a['skillName'],'description':_0x21b01a[_0x44192c(0x201)],'scope':_0x5bc281,'readonly':_0x5bc281!==_0x44192c(0x212)||_0x21b01a[_0x44192c(0x1f4)]===!![],'tenantCode':_0x21b01a[_0x44192c(0x1ff)],'userId':_0x21b01a[_0x44192c(0x211)],'version':_0x21b01a['version'],'status':_0x21b01a[_0x44192c(0x1f3)],'tags':Array[_0x44192c(0x205)](_0x21b01a[_0x44192c(0x200)])?_0x21b01a[_0x44192c(0x200)]:[],'hasUpstreamUpdate':_0x21b01a[_0x44192c(0x1f5)],'forkedFromSkillId':_0x21b01a[_0x44192c(0x209)],'forkedFromVersion':_0x21b01a[_0x44192c(0x20f)],'sourceSessionId':_0x21b01a['sourceSessionId'],'contentHash':_0x2188a2,'fileHashes':_0x2e65b2,'treeHash':_0x5d3696[_0x44192c(0x1f7)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5d3696)):undefined,'ossPath':remoteManifestOssPath(_0x21b01a[_0x44192c(0x208)]),'zipSha256':_0x1d1a11,'zipSize':_0x5c9250,'files':_0x5d3696[_0x44192c(0x1f7)]>0x0?_0x5d3696[_0x44192c(0x1f2)](_0x4c98a0=>({'path':_0x4c98a0[_0x44192c(0x1ed)],'hash':fileHash(_0x4c98a0),'size':fileContent(_0x4c98a0)[_0x44192c(0x1f7)]})):undefined,'pulledAt':_0x88100b??new Date()[_0x44192c(0x204)]()};}export function requireSkillCode(_0x2b6b78){const _0x55ba96=a119_0x55fb,_0x5355b7=_0x2b6b78['skillCode']?.[_0x55ba96(0x203)]();if(!_0x5355b7)throw CliErrors[_0x55ba96(0x1ec)](_0x55ba96(0x20b));return _0x5355b7;}function a119_0x459b(){const _0x1f0ed1=['145reSPne','parse','14592JpxvHU','map','status','readonly','hasUpstreamUpdate','159789fmJbpA','length','utf8','fromEntries','748755xtMPlu','29716pHqNrH','77957KrVnec','2353DXAknc','zipSha256','tenantCode','tags','description','6YKdwpu','trim','toISOString','isArray','570HQzVsh','16zRxaPM','files','forkedFromSkillId','string','Runtime\x20Skill\x20is\x20missing\x20skillCode.','2473233oUqxiK','manifest','object','forkedFromVersion','150261OiWwwU','userId','personal','ossPath','Invalid\x20','validation','path','6LPgybo'];a119_0x459b=function(){return _0x1f0ed1;};return a119_0x459b();}export function readMetadataIfPresent(_0x265425){const _0x329d1f=a119_0x55fb;if(!existsSync(_0x265425))return undefined;try{const _0x18a4b=JSON[_0x329d1f(0x1f0)](readFileSync(_0x265425,_0x329d1f(0x1f8)));return _0x18a4b;}catch{throw CliErrors[_0x329d1f(0x1ec)](_0x329d1f(0x1eb)+METADATA_FILE+':\x20'+_0x265425);}}function remoteManifestOssPath(_0x1d8c59){const _0x3efb04=a119_0x55fb;if(!_0x1d8c59||typeof _0x1d8c59!==_0x3efb04(0x20e)||Array['isArray'](_0x1d8c59))return undefined;const _0x29e052=_0x1d8c59[_0x3efb04(0x213)];return typeof _0x29e052===_0x3efb04(0x20a)&&_0x29e052['trim']()?_0x29e052['trim']():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a120_0x30cf72=a120_0x5631;(function(_0x332c12,_0x245a0a){const _0x1f163e=a120_0x5631,_0x592098=_0x332c12();while(!![]){try{const _0x4c1eb1=parseInt(_0x1f163e(0x1b0))/0x1+-parseInt(_0x1f163e(0x1b2))/0x2*(-parseInt(_0x1f163e(0x1bb))/0x3)+-parseInt(_0x1f163e(0x1ad))/0x4*(parseInt(_0x1f163e(0x1ac))/0x5)+parseInt(_0x1f163e(0x1b5))/0x6+-parseInt(_0x1f163e(0x1ba))/0x7*(parseInt(_0x1f163e(0x1a2))/0x8)+-parseInt(_0x1f163e(0x1bd))/0x9*(-parseInt(_0x1f163e(0x1a9))/0xa)+parseInt(_0x1f163e(0x1b7))/0xb*(-parseInt(_0x1f163e(0x1b8))/0xc);if(_0x4c1eb1===_0x245a0a)break;else _0x592098['push'](_0x592098['shift']());}catch(_0x41e9a1){_0x592098['push'](_0x592098['shift']());}}}(a120_0x3f10,0x6f601));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';import{CliErrors}from'../../errors.js';function a120_0x5631(_0x19b9f9,_0x58e67c){_0x19b9f9=_0x19b9f9-0x1a0;const _0x3f10a1=a120_0x3f10();let _0x56315e=_0x3f10a1[_0x19b9f9];return _0x56315e;}export function resolveSkillSyncPaths(_0x42a016={}){const _0x17668b=a120_0x5631,_0x226a45=_0x42a016[_0x17668b(0x1a8)]??homedir(),_0x59476e=resolve(_0x226a45,PRODUCT_CONFIG[_0x17668b(0x1b4)],_0x17668b(0x1af)),_0x16bc7d=trimmedEnv(_0x17668b(0x1a3)),_0x5dbb63=trimmedEnv(_0x17668b(0x1a7)),_0x2acc9b=resolve(_0x226a45,_0x17668b(0x1a5)),_0x5178f9=_0x42a016[_0x17668b(0x1b6)]??(existsSync(_0x2acc9b)?resolve(_0x2acc9b,_0x17668b(0x1a0)):undefined);return{'homeDir':_0x226a45,'cacheRoot':_0x59476e,'managedRoot':resolve(_0x226a45,PRODUCT_CONFIG[_0x17668b(0x1b4)]),'agentsSkillsDir':_0x42a016[_0x17668b(0x1aa)]??_0x16bc7d??resolve(_0x226a45,_0x17668b(0x1b1),_0x17668b(0x1a0)),'claudeSkillsDir':_0x42a016[_0x17668b(0x1ab)]??_0x5dbb63??resolve(_0x226a45,_0x17668b(0x1b9),_0x17668b(0x1a0)),'workbuddySkillsDir':_0x5178f9};}export function runtimeAgentSkillRoots(_0x13e598){const _0x201efb=a120_0x5631;return[_0x13e598[_0x201efb(0x1aa)],_0x13e598[_0x201efb(0x1ab)],_0x13e598[_0x201efb(0x1b6)]][_0x201efb(0x1a6)](_0x2a809e=>Boolean(_0x2a809e));}export function getRuntimeSkillCacheRoot(_0x483826,_0x503f60,_0x447eb5={}){const _0x29f46a=a120_0x5631,_0x285579=resolveSkillSyncPaths(_0x447eb5);return resolve(_0x285579['cacheRoot'],_0x483826,fingerprintAccessKey(_0x503f60),_0x29f46a(0x1a0));}export function getRuntimeSkillDir(_0x39ca63,_0x55ad36,_0x5c46f9,_0x1b4c02,_0x3b9b0e,_0x15713a={}){const _0x39cde3=a120_0x5631;return resolve(getRuntimeSkillCacheRoot(_0x39ca63,_0x55ad36,_0x15713a),safePathSegment(_0x5c46f9,_0x39cde3(0x1a4)),_0x1b4c02,safePathSegment(_0x3b9b0e,'skillCode'));}export function safePathSegment(_0x2741ec,_0x484665=a120_0x30cf72(0x1b3)){const _0x2b4c53=a120_0x30cf72;if(!_0x2741ec||_0x2741ec['includes']('/')||_0x2741ec['includes']('\x5c')||_0x2741ec[_0x2b4c53(0x1a1)]('..'))throw CliErrors[_0x2b4c53(0x1bc)](_0x2b4c53(0x1be)+_0x484665+_0x2b4c53(0x1ae)+_0x2741ec);return _0x2741ec;}function trimmedEnv(_0x111f1a){const _0x3897dd=productEnv(_0x111f1a)?.['trim']();return _0x3897dd?_0x3897dd:undefined;}function a120_0x3f10(){const _0x27d6bd=['path\x20segment','homeDirName','3088002wULaAB','workbuddySkillsDir','110ctMcEv','78240ampFPj','.claude','56QhKvyy','39JENAxp','validation','176679uhjjBk','Unsafe\x20','skills','includes','842696lymqNU','SKILL_ROOT','appCode','.workbuddy','filter','CLAUDE_SKILL_ROOT','homeDir','90WLaNsj','agentsSkillsDir','claudeSkillsDir','398165ChvSzd','4bWNZpx','\x20for\x20local\x20path:\x20','cache','455586maeOye','.agents','45660NLzqdf'];a120_0x3f10=function(){return _0x27d6bd;};return a120_0x3f10();}
|
|
@@ -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(_0x429535,_0x21dfaf){const _0x2a0534=a121_0x5289,_0x300c23=_0x429535();while(!![]){try{const _0x1d4ec4=-parseInt(_0x2a0534(0x1f4))/0x1+-parseInt(_0x2a0534(0x1f8))/0x2*(-parseInt(_0x2a0534(0x1db))/0x3)+-parseInt(_0x2a0534(0x20f))/0x4+parseInt(_0x2a0534(0x1f0))/0x5+-parseInt(_0x2a0534(0x1f2))/0x6+parseInt(_0x2a0534(0x1df))/0x7*(-parseInt(_0x2a0534(0x1e8))/0x8)+parseInt(_0x2a0534(0x1e9))/0x9*(parseInt(_0x2a0534(0x207))/0xa);if(_0x1d4ec4===_0x21dfaf)break;else _0x300c23['push'](_0x300c23['shift']());}catch(_0xbf4f6a){_0x300c23['push'](_0x300c23['shift']());}}}(a121_0x5ab5,0xeb0df));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a121_0x2b21b7}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(_0xd1835e,_0x55d9f2,_0x5a468a={}){const _0x4509ef=a121_0x5289,_0x18a819=resolvePushDirectoryRoot(_0xd1835e),_0x4e696c=readPushMetadataIfPresent(resolve(_0x18a819,METADATA_FILE),{'ignoreInvalidMetadata':_0x5a468a['ignoreInvalidMetadata']});if(_0x4e696c?.[_0x4509ef(0x1ef)]&&_0x4e696c[_0x4509ef(0x1ef)]!==_0x55d9f2&&!_0x5a468a[_0x4509ef(0x20b)]&&!_0x5a468a[_0x4509ef(0x1fa)])throw CliErrors['validation'](_0x4509ef(0x20a)+_0x4e696c[_0x4509ef(0x1ef)]+_0x4509ef(0x20c)+_0x55d9f2+'\x22.');const _0x46df3d=resolvePushSkillCode(_0x18a819,_0x55d9f2,_0x4e696c,_0x5a468a);if(!_0x46df3d)throw CliErrors[_0x4509ef(0x1f6)](_0x4509ef(0x212)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x18a819,'skillCode':_0x46df3d,'metadata':_0x4e696c};}export function readPushDirectory(_0x23375b,_0xab8f43,_0x5514f2={}){const _0xe1c03d=a121_0x5289,_0x137b15=resolvePushDirectoryIdentity(_0x23375b,_0xab8f43,_0x5514f2),_0x4d6fe8=_0x137b15[_0xe1c03d(0x21a)],_0x4d750b=resolve(_0x4d6fe8,SKILL_FILE);if(!existsSync(_0x4d750b)||!lstatSync(_0x4d750b)[_0xe1c03d(0x204)]())throw CliErrors[_0xe1c03d(0x1f6)]('Missing\x20'+SKILL_FILE+':\x20'+_0x4d750b);const _0x501623=_0x137b15[_0xe1c03d(0x1e7)],_0x210e34=_0x5514f2[_0xe1c03d(0x1ea)]??_0xe1c03d(0x1f3);if(!_0x5514f2[_0xe1c03d(0x202)]&&_0x501623?.[_0xe1c03d(0x1fb)]===_0xe1c03d(0x1f9))throw CliErrors[_0xe1c03d(0x1f6)](_0xe1c03d(0x20d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x501623[_0xe1c03d(0x1fb)]+'\x22.');if(!_0x5514f2[_0xe1c03d(0x202)]&&_0x210e34===_0xe1c03d(0x1f3)&&_0x501623?.[_0xe1c03d(0x1fb)]&&_0x501623['scope']!=='personal')throw CliErrors[_0xe1c03d(0x1f6)](_0xe1c03d(0x1f5)+METADATA_FILE+_0xe1c03d(0x21b)+_0x501623[_0xe1c03d(0x1fb)]+'\x22.',_0xe1c03d(0x1eb)+_0x4d6fe8+_0xe1c03d(0x215));const _0x59e064=scanSkillDirectory(_0x4d6fe8,{'excludedFilePaths':_0x5514f2[_0xe1c03d(0x214)]}),_0x7a7ac6=buildSkillPackage(_0x59e064),_0x330934=readFileSync(_0x4d750b,_0xe1c03d(0x216)),_0x2cfe3a=_0x137b15[_0xe1c03d(0x200)],_0x534223=_0x5514f2[_0xe1c03d(0x1fd)]?undefined:_0x501623,_0x100679=readSkillDisplayName(_0x330934);return{'skillCode':_0x2cfe3a,'metadata':_0x501623,'frontmatterDisplayName':_0x100679,'input':{'skillCode':_0x2cfe3a,'skillName':_0x100679??_0x534223?.[_0xe1c03d(0x1ee)],'description':_0x534223?.[_0xe1c03d(0x201)],'content':_0x330934,'files':_0x7a7ac6[_0xe1c03d(0x1e2)],'packageBase64':_0x7a7ac6[_0xe1c03d(0x1ff)],'tags':_0x534223?.[_0xe1c03d(0x1d9)],'version':_0x534223?.[_0xe1c03d(0x1ed)],'sourceSessionId':_0x534223?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x3b7cf0,_0x5c5db5,_0x2807c0,_0x4efb66={}){const _0x32bb15=a121_0x5289,_0x558d5a=resolvePushDirectoryRoot(_0x3b7cf0),_0x25c615=readPushMetadataIfPresent(resolve(_0x558d5a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x1ff005=requireRemoteScope(_0x5c5db5),_0x516edd=readLocalSkillContent(_0x558d5a),_0x34e848={..._0x5c5db5,'appCode':_0x5c5db5[_0x32bb15(0x1ef)]??_0x2807c0,'skillName':_0x5c5db5[_0x32bb15(0x1ee)]??_0x25c615?.[_0x32bb15(0x1ee)],'description':_0x5c5db5[_0x32bb15(0x201)]??_0x25c615?.[_0x32bb15(0x201)],'tags':Array[_0x32bb15(0x1de)](_0x5c5db5['tags'])?_0x5c5db5['tags']:_0x25c615?.[_0x32bb15(0x1d9)],'sourceSessionId':_0x5c5db5[_0x32bb15(0x219)]??_0x25c615?.[_0x32bb15(0x219)],'content':_0x5c5db5[_0x32bb15(0x20e)]??_0x516edd},_0x236b44=buildMetadata(_0x34e848,_0x1ff005,_0x2807c0,contentHash(_0x516edd),_0x4efb66[_0x32bb15(0x1e4)]);writeJsonAtomic(resolve(_0x558d5a,METADATA_FILE),_0x236b44);}function a121_0x5ab5(){const _0x51e1e0=['Skill\x20metadata\x20appCode\x20\x22','allowAppCodeRetarget','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','content','1034816lAkMpW','toLowerCase','string','Unable\x20to\x20resolve\x20skillCode\x20from\x20','pushedAt','excludedFilePaths','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','utf8','path','displayName','sourceSessionId','dir','\x20has\x20scope=\x22','tags','ignoreMetadataSkillCode','51vkKTWu','find','trim','isArray','185878IMdrJQ','replace','boolean','manifest','Invalid\x20','refreshedAt','\x20has\x20unsupported\x20scope\x20\x22','\x20name\x20for\x20SkillHub\x20slug\x20generation.','metadata','248GaMopv','801TpZqYD','targetScope','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','version','skillName','appCode','6065545PpvZdo','ignoreInvalidMetadata','10277064PeZNMv','personal','83419scRzPB','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','validation','name','95984vTpIdS','builtin','ignoreMetadataAppCodeMismatch','scope','length','ignoreMetadataForPayload','match','packageBase64','skillCode','description','ignoreMetadataScope','number','isFile','Remote\x20Skill\x20','files','203590tvsvCz','filter','isDirectory'];a121_0x5ab5=function(){return _0x51e1e0;};return a121_0x5ab5();}export function recordPushedRuntimeSkill(_0x3ce4c3,_0x309136,_0x4a7ff3,_0x11e0ba={}){const _0x7d66e2=a121_0x5289,_0xfe1df2=resolvePushDirectoryRoot(_0x3ce4c3),_0x291881=scanSkillDirectory(_0xfe1df2),_0x272ddd=_0x291881[_0x7d66e2(0x1dc)](_0x33aed0=>_0x33aed0['path']===SKILL_FILE),_0x5ed0ca=_0x272ddd?fileText(_0x272ddd):'',_0x413140=tryNormalizePackageManifest(_0x309136['files']),_0x2dc4a0={..._0x309136,'content':_0x309136[_0x7d66e2(0x20e)]??_0x5ed0ca,'files':_0x413140},_0x374f3d=_0x413140?normalizeLocalFiles(_0x291881)[_0x7d66e2(0x208)](_0x18e0cd=>_0x413140[_0x7d66e2(0x206)]['some'](_0x3904b2=>_0x3904b2[_0x7d66e2(0x217)]===_0x18e0cd[_0x7d66e2(0x217)])):undefined,_0x4d2c3f=buildMetadata(_0x2dc4a0,_0x11e0ba[_0x7d66e2(0x1fb)]??_0x7d66e2(0x1f3),_0x4a7ff3,contentHash(_0x2dc4a0[_0x7d66e2(0x20e)]??''),_0x11e0ba[_0x7d66e2(0x213)],_0x374f3d);writeJsonAtomic(resolve(_0xfe1df2,METADATA_FILE),_0x4d2c3f);}export function deriveSkillCodeFromDirectory(_0x123b0d,_0x100152){const _0x3fa93c=a121_0x5289,_0x130829=basename(resolve(_0x123b0d)),_0x35e477=_0x100152+'--';return _0x130829['startsWith'](_0x35e477)?_0x130829['slice'](_0x35e477[_0x3fa93c(0x1fc)]):_0x130829;}function resolvePushSkillCode(_0x53d48c,_0x1abb03,_0x5e8b8c,_0x2b4ef2){const _0x2013b9=a121_0x5289,_0x5cc111=deriveSkillCodeFromSkillFile(_0x53d48c)||deriveSkillCodeFromDirectory(_0x53d48c,_0x1abb03);if(_0x2b4ef2[_0x2013b9(0x1da)])return _0x5cc111;return _0x5e8b8c?.[_0x2013b9(0x200)]?.[_0x2013b9(0x1dd)]()||_0x5cc111;}function deriveSkillCodeFromSkillFile(_0x494482){const _0x192ae8=a121_0x5289,_0x31bdeb=resolve(_0x494482,SKILL_FILE);if(!existsSync(_0x31bdeb)||!lstatSync(_0x31bdeb)[_0x192ae8(0x204)]())return undefined;const _0x2e3b99=readFileSync(_0x31bdeb,_0x192ae8(0x216)),_0x30e798=_0x2e3b99[_0x192ae8(0x1fe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x30e798)return undefined;const _0x593fb4=parseFrontmatterObject(_0x30e798[0x1]??''),_0x36fd1e=scalarToString(_0x593fb4?.[_0x192ae8(0x1f7)]);return _0x36fd1e?slugifySkillName(_0x36fd1e):undefined;}function readSkillDisplayName(_0x4bf35e){const _0x5f3aa9=a121_0x5289,_0xc36a6=_0x4bf35e[_0x5f3aa9(0x1fe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xc36a6)return undefined;const _0x4eec57=parseFrontmatterObject(_0xc36a6[0x1]??'');return scalarToString(_0x4eec57?.[_0x5f3aa9(0x218)]);}function a121_0x5289(_0x3888d6,_0x5f540c){_0x3888d6=_0x3888d6-0x1d9;const _0x5ab58d=a121_0x5ab5();let _0x528954=_0x5ab58d[_0x3888d6];return _0x528954;}function slugifySkillName(_0x219661){const _0x121219=a121_0x5289,_0x13e199=_0x219661[_0x121219(0x1dd)]()[_0x121219(0x210)]()[_0x121219(0x1e0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x121219(0x1e0)](/^-+/,'')[_0x121219(0x1e0)](/-+$/,'')[_0x121219(0x1e0)](/-{2,}/g,'-');if(!_0x13e199)throw CliErrors['validation'](_0x121219(0x1e3)+SKILL_FILE+_0x121219(0x1e6));return _0x13e199;}function parseFrontmatterObject(_0x5809eb){try{const _0x5f2a8e=a121_0x2b21b7(_0x5809eb);return _0x5f2a8e&&typeof _0x5f2a8e==='object'&&!Array['isArray'](_0x5f2a8e)?_0x5f2a8e:undefined;}catch{return undefined;}}function scalarToString(_0x4846f7){const _0x5ce38d=a121_0x5289;if(typeof _0x4846f7===_0x5ce38d(0x211))return _0x4846f7['trim']();if(typeof _0x4846f7===_0x5ce38d(0x203)||typeof _0x4846f7===_0x5ce38d(0x1e1))return String(_0x4846f7);return undefined;}function resolvePushDirectoryRoot(_0x4e5e5e){const _0x58a056=a121_0x5289,_0x268b11=resolve(_0x4e5e5e);if(!existsSync(_0x268b11))throw CliErrors[_0x58a056(0x1f6)](_0x58a056(0x1ec)+_0x4e5e5e);const _0x56c360=lstatSync(_0x268b11);if(_0x56c360[_0x58a056(0x209)]())return _0x268b11;if(_0x56c360['isSymbolicLink']()){const _0x1a7ef0=realpathSync(_0x268b11);if(lstatSync(_0x1a7ef0)['isDirectory']())return _0x1a7ef0;}throw CliErrors[_0x58a056(0x1f6)](_0x58a056(0x1ec)+_0x4e5e5e);}function requireRemoteScope(_0x37bffa){const _0x549ee1=a121_0x5289;if(_0x37bffa['scope']===_0x549ee1(0x1f3)||_0x37bffa[_0x549ee1(0x1fb)]==='company'||_0x37bffa['scope']===_0x549ee1(0x1f9))return _0x37bffa[_0x549ee1(0x1fb)];throw CliErrors['validation'](_0x549ee1(0x205)+(_0x37bffa['skillCode']||'(unknown)')+_0x549ee1(0x1e5)+(_0x37bffa[_0x549ee1(0x1fb)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x35ed95){const _0x138ffa=a121_0x5289,_0x248175=resolve(_0x35ed95,SKILL_FILE);return existsSync(_0x248175)&&lstatSync(_0x248175)['isFile']()?readFileSync(_0x248175,_0x138ffa(0x216)):'';}function readPushMetadataIfPresent(_0x62ed0d,_0x405405={}){const _0x37d512=a121_0x5289;try{return readMetadataIfPresent(_0x62ed0d);}catch(_0x115401){if(_0x405405[_0x37d512(0x1f1)])return undefined;throw _0x115401;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a122_0x27fc(){const _0x14fc83=['validation','Unsupported\x20runtime\x20Skill\x20scope:\x20','builtin','186028qVmacV','1pQkjCK','2857866QoBLZc','332582CvDIIN','personal','854352vuFgCr','includes','2399747CCXheC','push','13738599GjklKl','2482225JEpFZH','39xyGcft'];a122_0x27fc=function(){return _0x14fc83;};return a122_0x27fc();}(function(_0x3ea0b9,_0x13ce6c){const _0x3551bb=a122_0x223b,_0x253e5f=_0x3ea0b9();while(!![]){try{const _0x19f8de=-parseInt(_0x3551bb(0x1e7))/0x1*(parseInt(_0x3551bb(0x1e9))/0x2)+parseInt(_0x3551bb(0x1f1))/0x3*(-parseInt(_0x3551bb(0x1e6))/0x4)+parseInt(_0x3551bb(0x1f0))/0x5+-parseInt(_0x3551bb(0x1e8))/0x6+-parseInt(_0x3551bb(0x1ed))/0x7+-parseInt(_0x3551bb(0x1eb))/0x8+parseInt(_0x3551bb(0x1ef))/0x9;if(_0x19f8de===_0x13ce6c)break;else _0x253e5f['push'](_0x253e5f['shift']());}catch(_0xff9687){_0x253e5f['push'](_0x253e5f['shift']());}}}(a122_0x27fc,0x4fa04));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x77c388){const _0x18d9d5=a122_0x223b,_0x446550=_0x77c388&&_0x77c388['length']>0x0?_0x77c388:[_0x18d9d5(0x1ea),'company',_0x18d9d5(0x1f4)],_0x21d83f=[];for(const _0x40e65b of _0x446550){if(!isRuntimeSkillScope(_0x40e65b))throw CliErrors[_0x18d9d5(0x1f2)](_0x18d9d5(0x1f3)+_0x40e65b);!_0x21d83f[_0x18d9d5(0x1ec)](_0x40e65b)&&_0x21d83f[_0x18d9d5(0x1ee)](_0x40e65b);}return _0x21d83f;}function a122_0x223b(_0x11871c,_0x5baa1a){_0x11871c=_0x11871c-0x1e6;const _0x27fcc7=a122_0x27fc();let _0x223b64=_0x27fcc7[_0x11871c];return _0x223b64;}export function isRuntimeSkillScope(_0x3f60f0){const _0x471bcd=a122_0x223b;return _0x3f60f0==='personal'||_0x3f60f0==='company'||_0x3f60f0===_0x471bcd(0x1f4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x158ce9,_0x3c0b84){const _0x3526fb=a124_0x431b,_0x19cb37=_0x158ce9();while(!![]){try{const _0x6c7b44=-parseInt(_0x3526fb(0x115))/0x1+-parseInt(_0x3526fb(0x116))/0x2+parseInt(_0x3526fb(0x11e))/0x3+-parseInt(_0x3526fb(0x112))/0x4+-parseInt(_0x3526fb(0x124))/0x5*(-parseInt(_0x3526fb(0x122))/0x6)+parseInt(_0x3526fb(0x11a))/0x7+parseInt(_0x3526fb(0x119))/0x8;if(_0x6c7b44===_0x3c0b84)break;else _0x19cb37['push'](_0x19cb37['shift']());}catch(_0x439da0){_0x19cb37['push'](_0x19cb37['shift']());}}}(a124_0x84de,0x6fc3c));function a124_0x431b(_0x410569,_0x21751a){_0x410569=_0x410569-0x112;const _0x84de42=a124_0x84de();let _0x431bfd=_0x84de42[_0x410569];return _0x431bfd;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a124_0x84de(){const _0x300cff=['223592fPIcRz','validation','sort','1719272yAzHeL','1060059mfLqhW','name','entries','endsWith','1503321CFjTQO','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','length','code','6SdTgAs','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','4298200VImKxf','2785240fusWnU','from','validation_error','461199FLceCq'];a124_0x84de=function(){return _0x300cff;};return a124_0x84de();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x5bfb93){const _0x35069e=a124_0x431b,_0x3012fe={};for(const _0x21d7ac of normalizeLocalFiles(_0x5bfb93)){_0x3012fe[_0x21d7ac['path']]=fileContent(_0x21d7ac);}return Buffer[_0x35069e(0x113)](zipSync(_0x3012fe,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x4a0e08){const _0x29d617=a124_0x431b;if(_0x4a0e08[_0x29d617(0x120)]<0x16)throw CliErrors[_0x29d617(0x117)](_0x29d617(0x123));let _0x266ecf;try{_0x266ecf=unzipSync(_0x4a0e08,{'filter'(_0x5aebc0){const _0x3a93fd=_0x29d617,_0x50bd3a=normalizeSkillRelativePath(_0x5aebc0[_0x3a93fd(0x11b)]);if(_0x50bd3a[_0x3a93fd(0x11d)]('/'))throw CliErrors[_0x3a93fd(0x117)](_0x3a93fd(0x11f)+_0x50bd3a);return!![];}});}catch(_0x4b69c7){if(isRuntimeSkillValidationError(_0x4b69c7))throw _0x4b69c7;throw CliErrors[_0x29d617(0x117)](_0x29d617(0x123));}return Object[_0x29d617(0x11c)](_0x266ecf)['map'](([_0x45cfa8,_0x58894b])=>({'path':normalizeSkillRelativePath(_0x45cfa8),'bytes':Buffer['from'](_0x58894b)}))[_0x29d617(0x118)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x237fcf){const _0x54a173=a124_0x431b;return typeof _0x237fcf==='object'&&_0x237fcf!==null&&_0x54a173(0x121)in _0x237fcf&&_0x237fcf['code']===_0x54a173(0x114);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf0a75a,_0x5715fc){const _0x7aa151=a125_0xa8dd,_0x40d787=_0xf0a75a();while(!![]){try{const _0x10e966=-parseInt(_0x7aa151(0x195))/0x1+-parseInt(_0x7aa151(0x197))/0x2+parseInt(_0x7aa151(0x18a))/0x3*(parseInt(_0x7aa151(0x1a5))/0x4)+-parseInt(_0x7aa151(0x19c))/0x5*(-parseInt(_0x7aa151(0x196))/0x6)+-parseInt(_0x7aa151(0x1b4))/0x7*(parseInt(_0x7aa151(0x199))/0x8)+-parseInt(_0x7aa151(0x1ad))/0x9+-parseInt(_0x7aa151(0x194))/0xa*(-parseInt(_0x7aa151(0x19d))/0xb);if(_0x10e966===_0x5715fc)break;else _0x40d787['push'](_0x40d787['shift']());}catch(_0x2bd72f){_0x40d787['push'](_0x40d787['shift']());}}}(a125_0x3c17,0x36caf));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(_0x2e0c9d){const _0x2c01e0=a125_0xa8dd,_0x35c1e8=normalizeLocalFiles(_0x2e0c9d);if(!_0x35c1e8[_0x2c01e0(0x19a)](_0x5be077=>_0x5be077[_0x2c01e0(0x190)]===SKILL_FILE))throw CliErrors[_0x2c01e0(0x1af)](_0x2c01e0(0x18f)+SKILL_FILE+_0x2c01e0(0x192));const _0x5c9106=localFilesToManifestFiles(_0x35c1e8),_0x24ebd4=createDeterministicZipPackage(_0x35c1e8);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5c9106),'zipSha256':bufferSha256(_0x24ebd4),'zipSize':_0x24ebd4[_0x2c01e0(0x1aa)],'files':_0x5c9106},'packageBytes':_0x24ebd4,'packageBase64':_0x24ebd4[_0x2c01e0(0x1ac)](_0x2c01e0(0x1ab))};}export function verifyRuntimeSkillPackage(_0x4c22e8,_0x5f441f){const _0x3e7b46=a125_0xa8dd,_0x1e88a6=normalizePackageManifest(_0x4c22e8,{'requireOssPath':![]});if(!_0x1e88a6)throw CliErrors[_0x3e7b46(0x1af)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x1e88a6,_0x5f441f);}export function verifyRuntimeSkillBundle(_0x2d32ec,_0x3d3943){const _0x1af549=a125_0xa8dd,_0x2ce04f=normalizePackageManifest(_0x2d32ec,{'requireOssPath':![]});if(!_0x2ce04f)throw CliErrors[_0x1af549(0x1af)](_0x1af549(0x19e));return extractAndVerifyPackageFiles(_0x2ce04f,_0x3d3943);}export function tryNormalizePackageManifest(_0x8015d0){return normalizePackageManifest(_0x8015d0,{'requireOssPath':![]});}function a125_0xa8dd(_0xb6d8f1,_0xd46170){_0xb6d8f1=_0xb6d8f1-0x188;const _0x3c17eb=a125_0x3c17();let _0xa8dd07=_0x3c17eb[_0xb6d8f1];return _0xa8dd07;}export function requirePackageBytes(_0x24dae9,_0x3385d6){const _0x38047e=a125_0xa8dd;if(!_0x3385d6||_0x3385d6['length']===0x0)throw CliErrors[_0x38047e(0x1af)](_0x38047e(0x1a2)+_0x24dae9);return _0x3385d6;}export function extractDownloadedPackage(_0x57ddd2){const _0x582923=a125_0xa8dd,_0x3cd692=parseZipPackage(_0x57ddd2)['map'](_0x39ddd7=>({'path':_0x39ddd7[_0x582923(0x190)],'bytes':_0x39ddd7['bytes']}));if(!_0x3cd692[_0x582923(0x19a)](_0x27a57c=>_0x27a57c['path']===SKILL_FILE))throw CliErrors['validation'](_0x582923(0x1a4)+SKILL_FILE+'.');return normalizeLocalFiles(_0x3cd692);}export function localFilesToManifestFiles(_0x2e2f0c){const _0x1a13b7=a125_0xa8dd;return normalizeLocalFiles(_0x2e2f0c)['map'](_0x4dcfbd=>({'path':_0x4dcfbd[_0x1a13b7(0x190)],'sha256':fileHash(_0x4dcfbd),'size':fileContent(_0x4dcfbd)[_0x1a13b7(0x1aa)]}));}function normalizePackageManifest(_0x289819,_0x56ca9){const _0x4b8898=a125_0xa8dd;if(!_0x289819||typeof _0x289819!==_0x4b8898(0x189)||Array[_0x4b8898(0x18e)](_0x289819))return undefined;const _0x120375=_0x289819,_0x48e6aa=typeof _0x120375[_0x4b8898(0x19f)]==='string'?_0x120375[_0x4b8898(0x19f)]['trim']():undefined;if(_0x56ca9['requireOssPath']&&!_0x48e6aa)return undefined;if(!Array[_0x4b8898(0x18e)](_0x120375[_0x4b8898(0x1a0)])||_0x120375['files'][_0x4b8898(0x1aa)]===0x0)return undefined;if(!isSha256Hex(_0x120375['treeSha256']))throw CliErrors[_0x4b8898(0x1af)](_0x4b8898(0x1b3));if(!isSha256Hex(_0x120375['zipSha256']))throw CliErrors['validation'](_0x4b8898(0x191));if(!Number[_0x4b8898(0x1b2)](_0x120375[_0x4b8898(0x18c)])||_0x120375[_0x4b8898(0x18c)]<0x0)throw CliErrors[_0x4b8898(0x1af)](_0x4b8898(0x188));const _0xd6d8c2=normalizeManifestFiles(_0x120375[_0x4b8898(0x1a0)]);if(!_0xd6d8c2['some'](_0x395817=>_0x395817[_0x4b8898(0x190)]===SKILL_FILE))throw CliErrors[_0x4b8898(0x1af)](_0x4b8898(0x1b0)+SKILL_FILE+'.');const _0x564957=fileTreeHash(_0xd6d8c2);if(_0x564957!==_0x120375[_0x4b8898(0x18d)][_0x4b8898(0x1a8)]())throw CliErrors['validation'](_0x4b8898(0x18b));return{'schemaVersion':Number[_0x4b8898(0x1b2)](_0x120375[_0x4b8898(0x1a3)])?_0x120375[_0x4b8898(0x1a3)]:0x2,'ossPath':_0x48e6aa,'treeSha256':_0x564957,'zipSha256':_0x120375[_0x4b8898(0x193)][_0x4b8898(0x1a8)](),'zipSize':_0x120375[_0x4b8898(0x18c)],'files':_0xd6d8c2};}function a125_0x3c17(){const _0x3a08ab=['files','has','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','schemaVersion','Runtime\x20Skill\x20package\x20is\x20missing\x20','30428ShCoXE','bytes','set','toLowerCase','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','length','base64','toString','3280788AgohiW','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','validation','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','isSafeInteger','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','224pZYLxv','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','object','177Dcleav','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','zipSize','treeSha256','isArray','Missing\x20','path','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','\x20in\x20Skill\x20file\x20package.','zipSha256','80wLYYSj','377758EMerXa','1770906yiCdSL','449814WztIjb','get','23704FHMDBD','some','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','5ZaqMFw','745910nXDUta','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','ossPath'];a125_0x3c17=function(){return _0x3a08ab;};return a125_0x3c17();}function extractAndVerifyPackage(_0x3dd79c,_0xfc1118){const _0x3b89c8=a125_0xa8dd,_0x3a35c0=normalizePackageManifest(_0x3dd79c,{'requireOssPath':![]});if(!_0x3a35c0)throw CliErrors[_0x3b89c8(0x1af)](_0x3b89c8(0x19e));if(_0xfc1118[_0x3b89c8(0x1aa)]!==_0x3a35c0[_0x3b89c8(0x18c)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0xd93619=bufferSha256(_0xfc1118);if(_0xd93619!==_0x3a35c0['zipSha256'])throw CliErrors[_0x3b89c8(0x1af)](_0x3b89c8(0x1b1));return extractAndVerifyPackageFiles(_0x3a35c0,_0xfc1118);}function extractAndVerifyPackageFiles(_0x4fed3b,_0x5ba4a0){const _0x35c65c=a125_0xa8dd,_0xf8eaab=parseZipPackage(_0x5ba4a0);if(_0xf8eaab['length']!==_0x4fed3b[_0x35c65c(0x1a0)][_0x35c65c(0x1aa)])throw CliErrors['validation'](_0x35c65c(0x19b));const _0x4d7a6f=new Map();for(const _0x22207f of _0xf8eaab){if(_0x4d7a6f[_0x35c65c(0x1a1)](_0x22207f[_0x35c65c(0x190)]))throw CliErrors['validation']('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x22207f[_0x35c65c(0x190)]);_0x4d7a6f[_0x35c65c(0x1a7)](_0x22207f[_0x35c65c(0x190)],_0x22207f);}const _0x1f2fae=[];for(const _0x2206e8 of _0x4fed3b[_0x35c65c(0x1a0)]){const _0x1ff4de=_0x4d7a6f[_0x35c65c(0x198)](_0x2206e8[_0x35c65c(0x190)]);if(!_0x1ff4de)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x2206e8[_0x35c65c(0x190)]);if(_0x1ff4de['bytes'][_0x35c65c(0x1aa)]!==_0x2206e8['size'])throw CliErrors[_0x35c65c(0x1af)](_0x35c65c(0x1ae)+_0x2206e8[_0x35c65c(0x190)]);const _0x46bae8=bufferSha256(_0x1ff4de[_0x35c65c(0x1a6)]);if(_0x46bae8!==_0x2206e8['sha256'])throw CliErrors[_0x35c65c(0x1af)](_0x35c65c(0x1a9)+_0x2206e8['path']);_0x1f2fae['push']({'path':_0x2206e8[_0x35c65c(0x190)],'bytes':_0x1ff4de[_0x35c65c(0x1a6)]});}return normalizeLocalFiles(_0x1f2fae);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2696fb,_0x2b6139){var _0x22cfb3=a126_0x4e26,_0x245398=_0x2696fb();while(!![]){try{var _0x1a58c0=parseInt(_0x22cfb3(0xad))/0x1*(-parseInt(_0x22cfb3(0xb9))/0x2)+parseInt(_0x22cfb3(0xae))/0x3*(parseInt(_0x22cfb3(0xb1))/0x4)+-parseInt(_0x22cfb3(0xb5))/0x5+parseInt(_0x22cfb3(0xaf))/0x6*(parseInt(_0x22cfb3(0xb7))/0x7)+parseInt(_0x22cfb3(0xb0))/0x8*(parseInt(_0x22cfb3(0xb8))/0x9)+-parseInt(_0x22cfb3(0xb6))/0xa*(-parseInt(_0x22cfb3(0xb3))/0xb)+parseInt(_0x22cfb3(0xb2))/0xc*(-parseInt(_0x22cfb3(0xb4))/0xd);if(_0x1a58c0===_0x2b6139)break;else _0x245398['push'](_0x245398['shift']());}catch(_0x1c3fa0){_0x245398['push'](_0x245398['shift']());}}}(a126_0x3335,0xc7f8c));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a126_0x3335(){var _0x5b6a13=['4yQfEDy','88611BGtDCQ','3ucORgG','9111786exHjLZ','8yXEfch','950956DpHuIc','72veohbp','12098383tkyUUa','3590717rpChKP','3838075wPCNYR','10jPFvre','7jXDddz','5084568yKpuPu'];a126_0x3335=function(){return _0x5b6a13;};return a126_0x3335();}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a126_0x4e26(_0x1e6855,_0x15101f){_0x1e6855=_0x1e6855-0xad;var _0x333591=a126_0x3335();var _0x4e260f=_0x333591[_0x1e6855];return _0x4e260f;}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
|
-
const
|
|
1
|
+
const a127_0x466e70=a127_0x7dee;(function(_0x356880,_0x2e0abe){const _0x26e22c=a127_0x7dee,_0x4a8509=_0x356880();while(!![]){try{const _0x5923d7=-parseInt(_0x26e22c(0x18b))/0x1+-parseInt(_0x26e22c(0x187))/0x2*(parseInt(_0x26e22c(0x17a))/0x3)+-parseInt(_0x26e22c(0x17c))/0x4*(-parseInt(_0x26e22c(0x189))/0x5)+parseInt(_0x26e22c(0x192))/0x6*(-parseInt(_0x26e22c(0x18a))/0x7)+parseInt(_0x26e22c(0x193))/0x8*(parseInt(_0x26e22c(0x17d))/0x9)+-parseInt(_0x26e22c(0x191))/0xa+parseInt(_0x26e22c(0x17e))/0xb;if(_0x5923d7===_0x2e0abe)break;else _0x4a8509['push'](_0x4a8509['shift']());}catch(_0x880533){_0x4a8509['push'](_0x4a8509['shift']());}}}(a127_0x2dda,0xdcbc7));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';function a127_0x2dda(){const _0x3a520e=['utf8','\x20has\x20no\x20skills\x20map','SKILL.md','254986xmqoDy','home','5667695tFsZVM','4193pKyCkD','665574sTIRyj','includes','\x20is\x20unreadable:\x20','\x20records\x20\x22','globalSkillsDirs','skills','6147300tQssAd','5946XiBFth','232UIGesX','recorded','unverifiable','kind','lockFile','unusable','join','.agents','15wSIKiY','map','4VgeYxg','41859eJxyjQ','23618045SrJPeF','.skill-lock.json','number','parse','.claude','version'];a127_0x2dda=function(){return _0x3a520e;};return a127_0x2dda();}function a127_0x7dee(_0x5d2ff7,_0x20bb42){_0x5d2ff7=_0x5d2ff7-0x17a;const _0x2ddafc=a127_0x2dda();let _0x7dee77=_0x2ddafc[_0x5d2ff7];return _0x7dee77;}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a127_0x466e70(0x19a),a127_0x466e70(0x17f));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a127_0x466e70(0x19a),a127_0x466e70(0x190)),join(a127_0x466e70(0x182),a127_0x466e70(0x190))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0xff3d55,_0x1b82df){const _0x4b6bdc=a127_0x466e70;if(!existsSync(_0xff3d55))return{'kind':'not-recorded'};let _0x330e57;try{_0x330e57=JSON[_0x4b6bdc(0x181)](readFileSync(_0xff3d55,_0x4b6bdc(0x184)));}catch(_0x28c9af){return{'kind':_0x4b6bdc(0x198),'reason':_0xff3d55+_0x4b6bdc(0x18d)+_0x28c9af['message']};}const _0x121345=_0x330e57;if(typeof _0x121345?.[_0x4b6bdc(0x183)]!==_0x4b6bdc(0x180)||!SUPPORTED_LOCK_VERSIONS[_0x4b6bdc(0x18c)](_0x121345[_0x4b6bdc(0x183)]))return{'kind':_0x4b6bdc(0x198),'reason':_0xff3d55+'\x20uses\x20unsupported\x20version\x20'+String(_0x121345?.['version'])};if(!_0x121345[_0x4b6bdc(0x190)]||typeof _0x121345[_0x4b6bdc(0x190)]!=='object')return{'kind':_0x4b6bdc(0x198),'reason':_0xff3d55+_0x4b6bdc(0x185)};return _0x121345[_0x4b6bdc(0x190)][_0x1b82df]?{'kind':_0x4b6bdc(0x194)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x2d84a1,_0x183681){const _0x44276b=a127_0x466e70,_0x4861d1=_0x183681?.[_0x44276b(0x188)]??homedir(),_0x2bbaaa=_0x183681?.[_0x44276b(0x18f)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x44276b(0x17b)](_0x2a28d2=>join(_0x4861d1,_0x2a28d2)),_0x9d1feb=_0x183681?.[_0x44276b(0x197)]??join(_0x4861d1,SKILL_LOCK_RELATIVE_PATH),_0x126364=_0x2bbaaa[_0x44276b(0x17b)](_0x3c7edb=>join(_0x3c7edb,_0x2d84a1,_0x44276b(0x186))),_0x45b278=_0x126364['find'](_0x3724ff=>existsSync(_0x3724ff));if(_0x45b278)return{'state':'present','path':_0x45b278};const _0xb7ad2=readLockLookup(_0x9d1feb,_0x2d84a1);if(_0xb7ad2[_0x44276b(0x196)]===_0x44276b(0x198))return{'state':_0x44276b(0x195),'reason':_0xb7ad2['reason']};if(_0xb7ad2[_0x44276b(0x196)]===_0x44276b(0x194))return{'state':_0x44276b(0x195),'reason':_0x9d1feb+_0x44276b(0x18e)+_0x2d84a1+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x126364[_0x44276b(0x199)](',\x20')+')')};return{'state':'absent','checked':_0x126364};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x429b85,_0x50762f){const _0x1be77a=a128_0x4edd,_0x4debd9=_0x429b85();while(!![]){try{const _0x1b64fa=parseInt(_0x1be77a(0x120))/0x1*(-parseInt(_0x1be77a(0x122))/0x2)+-parseInt(_0x1be77a(0x11e))/0x3+-parseInt(_0x1be77a(0x121))/0x4*(-parseInt(_0x1be77a(0x11f))/0x5)+-parseInt(_0x1be77a(0x126))/0x6+-parseInt(_0x1be77a(0x123))/0x7*(parseInt(_0x1be77a(0x124))/0x8)+parseInt(_0x1be77a(0x11d))/0x9+-parseInt(_0x1be77a(0x125))/0xa;if(_0x1b64fa===_0x50762f)break;else _0x4debd9['push'](_0x4debd9['shift']());}catch(_0x1be70d){_0x4debd9['push'](_0x4debd9['shift']());}}}(a128_0x2903,0xd16de));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a128_0x4edd(_0x50347c,_0x259e63){_0x50347c=_0x50347c-0x11d;const _0x29030f=a128_0x2903();let _0x4eddbc=_0x29030f[_0x50347c];return _0x4eddbc;}import{CliErrors}from'../errors.js';function a128_0x2903(){const _0x575177=['2530280fDJtyu','2592630ZqyATU','14896827vjyGbn','1639785HEavtV','85aSNCmI','217hXEVxh','224996UydAaO','2470BNwmUH','161567HNmGNJ','88HjoDSr'];a128_0x2903=function(){return _0x575177;};return a128_0x2903();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a129_0x37b1(_0x5a7d54,_0x252b9c){_0x5a7d54=_0x5a7d54-0x1bc;const _0x155505=a129_0x1555();let _0x37b1fc=_0x155505[_0x5a7d54];return _0x37b1fc;}const a129_0x3577e3=a129_0x37b1;function a129_0x1555(){const _0x1314e2=['addColors','readFileSync','Completed:\x20','3pldNve','error','1307052wZJlPn','30kcMSsu','trim','join','320616kWIKzC','1255270cOpYOF','parse','message','success','mkdirSync','blue','format','116156zvefwA','rawCommand','red','1944992zEEQtl','combine','log','filter','currentRawCommand','split','logTask','timestamp','initWinstonLogger','stringify','winstonLogger','green','existsSync','now','duration','setRawCommand','readLogs','command','errors','printf','clear','toISOString','142806AblTQT','Failed:\x20','setLogPath','dirname','info','3448fJqVyx','transports','logFileName','warn','File','unknown','map','Starting:\x20','207sWAZxc','clearLogs','33HIXLvg','logFilePath','writeFileSync','yellow','Failed\x20to\x20clear\x20logs:'];a129_0x1555=function(){return _0x1314e2;};return a129_0x1555();}(function(_0x3af521,_0x28cb89){const _0x3cfbc2=a129_0x37b1,_0x4d6010=_0x3af521();while(!![]){try{const _0x352172=-parseInt(_0x3cfbc2(0x1de))/0x1+parseInt(_0x3cfbc2(0x1e6))/0x2+parseInt(_0x3cfbc2(0x1d8))/0x3*(-parseInt(_0x3cfbc2(0x1da))/0x4)+parseInt(_0x3cfbc2(0x1db))/0x5*(parseInt(_0x3cfbc2(0x1c1))/0x6)+parseInt(_0x3cfbc2(0x1e9))/0x7+-parseInt(_0x3cfbc2(0x1c6))/0x8*(parseInt(_0x3cfbc2(0x1ce))/0x9)+parseInt(_0x3cfbc2(0x1df))/0xa*(parseInt(_0x3cfbc2(0x1d0))/0xb);if(_0x352172===_0x28cb89)break;else _0x4d6010['push'](_0x4d6010['shift']());}catch(_0x51cb36){_0x4d6010['push'](_0x4d6010['shift']());}}}(a129_0x1555,0x3058d));import a129_0x172cc4 from'winston';import a129_0x1fe133 from'node:fs';import a129_0x2641a9 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a129_0x3577e3(0x1f3)];[a129_0x3577e3(0x1d1)]='';[a129_0x3577e3(0x1ed)]='';constructor(){}[a129_0x3577e3(0x1f8)](_0x581012){const _0x156c2c=a129_0x3577e3;this[_0x156c2c(0x1ed)]=_0x581012;}[a129_0x3577e3(0x1c3)](_0x5b290f){const _0x103b98=a129_0x3577e3;this[_0x103b98(0x1d1)]=a129_0x2641a9[_0x103b98(0x1dd)](_0x5b290f,PRODUCT_CONFIG[_0x103b98(0x1c8)]),this[_0x103b98(0x1f3)]&&this['winstonLogger'][_0x103b98(0x1bf)](),this[_0x103b98(0x1f1)]();}[a129_0x3577e3(0x1f1)](){const _0xd2eda8=a129_0x3577e3,_0x8cf83c=a129_0x2641a9[_0xd2eda8(0x1c4)](this[_0xd2eda8(0x1d1)]);!a129_0x1fe133[_0xd2eda8(0x1f5)](_0x8cf83c)&&a129_0x1fe133[_0xd2eda8(0x1e3)](_0x8cf83c,{'recursive':!![]});const _0x28e5a8=a129_0x172cc4[_0xd2eda8(0x1e5)][_0xd2eda8(0x1ea)](a129_0x172cc4[_0xd2eda8(0x1e5)][_0xd2eda8(0x1f0)](),a129_0x172cc4[_0xd2eda8(0x1e5)][_0xd2eda8(0x1bd)]({'stack':!![]}),a129_0x172cc4['format'][_0xd2eda8(0x1be)](_0x5c3d32=>{const _0x26f56b=_0xd2eda8,_0x4a627b={'timestamp':_0x5c3d32['timestamp']||new Date()[_0x26f56b(0x1c0)](),'level':_0x5c3d32['level']||_0x26f56b(0x1c5),'command':_0x5c3d32[_0x26f56b(0x1bc)]||_0x26f56b(0x1cb),'rawCommand':_0x5c3d32[_0x26f56b(0x1e7)]||this[_0x26f56b(0x1ed)]||undefined,'message':_0x5c3d32[_0x26f56b(0x1e1)]||'','duration':_0x5c3d32[_0x26f56b(0x1f7)]||undefined,'details':_0x5c3d32['details']||undefined};return JSON[_0x26f56b(0x1f2)](_0x4a627b);}));this['winstonLogger']=a129_0x172cc4['createLogger']({'level':_0xd2eda8(0x1c5),'format':_0x28e5a8,'transports':[new a129_0x172cc4[(_0xd2eda8(0x1c7))][(_0xd2eda8(0x1ca))]({'filename':this[_0xd2eda8(0x1d1)],'level':_0xd2eda8(0x1c5)})],'silent':![]}),a129_0x172cc4[_0xd2eda8(0x1d5)]({'success':_0xd2eda8(0x1f4),'error':_0xd2eda8(0x1e8),'warn':_0xd2eda8(0x1d3),'info':_0xd2eda8(0x1e4)});}[a129_0x3577e3(0x1c5)](_0x312dfb,_0x359a30,_0x26f43a){const _0x3ba3d7=a129_0x3577e3;if(!this[_0x3ba3d7(0x1d1)]||!this[_0x3ba3d7(0x1f3)])return;this[_0x3ba3d7(0x1f3)][_0x3ba3d7(0x1c5)](_0x359a30,{'command':_0x312dfb,'details':_0x26f43a});}[a129_0x3577e3(0x1e2)](_0x517f22,_0x473c1c,_0x3e6aed,_0x3c6599){const _0xb0d38e=a129_0x3577e3;if(!this[_0xb0d38e(0x1d1)]||!this['winstonLogger'])return;this[_0xb0d38e(0x1f3)][_0xb0d38e(0x1eb)](_0xb0d38e(0x1c5),_0x473c1c,{'level':'success','command':_0x517f22,'duration':_0x3e6aed,'details':_0x3c6599});}[a129_0x3577e3(0x1d9)](_0xf39d47,_0x2d6ea0,_0x21e2b0){const _0x3762ad=a129_0x3577e3;if(!this[_0x3762ad(0x1d1)]||!this['winstonLogger'])return;this[_0x3762ad(0x1f3)][_0x3762ad(0x1d9)](_0x2d6ea0,{'command':_0xf39d47,'details':_0x21e2b0});}[a129_0x3577e3(0x1c9)](_0x470566,_0x4eb90b,_0x369259){const _0x2e3dae=a129_0x3577e3;if(!this[_0x2e3dae(0x1d1)]||!this['winstonLogger'])return;this[_0x2e3dae(0x1f3)][_0x2e3dae(0x1c9)](_0x4eb90b,{'command':_0x470566,'details':_0x369259});}async[a129_0x3577e3(0x1ef)](_0x47cf7c,_0x13577e,_0x21214b){const _0x5477b3=a129_0x3577e3,_0xd6fd08=Date[_0x5477b3(0x1f6)]();this[_0x5477b3(0x1c5)](_0x47cf7c,_0x5477b3(0x1cd)+_0x13577e);try{const _0x1d118b=await _0x21214b(),_0x39cdbf=Date['now']()-_0xd6fd08;return this['success'](_0x47cf7c,_0x5477b3(0x1d7)+_0x13577e,_0x39cdbf),_0x1d118b;}catch(_0x1e3533){const _0x37ff6e=Date[_0x5477b3(0x1f6)]()-_0xd6fd08;this['error'](_0x47cf7c,_0x5477b3(0x1c2)+_0x13577e,{'error':_0x1e3533 instanceof Error?_0x1e3533[_0x5477b3(0x1e1)]:String(_0x1e3533),'duration':_0x37ff6e});throw _0x1e3533;}}[a129_0x3577e3(0x1f9)](){const _0x1beeea=a129_0x3577e3;try{if(!a129_0x1fe133[_0x1beeea(0x1f5)](this['logFilePath']))return[];const _0x230afb=a129_0x1fe133[_0x1beeea(0x1d6)](this[_0x1beeea(0x1d1)],'utf8');return _0x230afb[_0x1beeea(0x1ee)](/\r?\n/)[_0x1beeea(0x1ec)](_0x545b95=>_0x545b95[_0x1beeea(0x1dc)]())[_0x1beeea(0x1cc)](_0x57491f=>JSON[_0x1beeea(0x1e0)](_0x57491f));}catch(_0x3ebbee){return console[_0x1beeea(0x1c9)]('Failed\x20to\x20read\x20logs:',_0x3ebbee),[];}}[a129_0x3577e3(0x1cf)](){const _0x3a0eb7=a129_0x3577e3;try{a129_0x1fe133[_0x3a0eb7(0x1f5)](this[_0x3a0eb7(0x1d1)])&&a129_0x1fe133[_0x3a0eb7(0x1d2)](this['logFilePath'],'','utf8');}catch(_0x2b83e3){console['warn'](_0x3a0eb7(0x1d4),_0x2b83e3);}}['getWinstonInstance'](){const _0x148b9b=a129_0x3577e3;return this[_0x148b9b(0x1f3)];}}export const logger=new Logger();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a130_0x4dca(_0x445775,_0x11d94f){_0x445775=_0x445775-0x1b2;const _0x5ed944=a130_0x5ed9();let _0x4dca1c=_0x5ed944[_0x445775];return _0x4dca1c;}(function(_0x20b642,_0x3f5103){const _0x6cdbdb=a130_0x4dca,_0xf3956f=_0x20b642();while(!![]){try{const _0x16be2a=parseInt(_0x6cdbdb(0x1c5))/0x1*(-parseInt(_0x6cdbdb(0x1b5))/0x2)+parseInt(_0x6cdbdb(0x1c3))/0x3*(-parseInt(_0x6cdbdb(0x1c4))/0x4)+-parseInt(_0x6cdbdb(0x1ba))/0x5+parseInt(_0x6cdbdb(0x1b9))/0x6+-parseInt(_0x6cdbdb(0x1b8))/0x7*(-parseInt(_0x6cdbdb(0x1bb))/0x8)+-parseInt(_0x6cdbdb(0x1b6))/0x9*(-parseInt(_0x6cdbdb(0x1c2))/0xa)+-parseInt(_0x6cdbdb(0x1bf))/0xb;if(_0x16be2a===_0x3f5103)break;else _0xf3956f['push'](_0xf3956f['shift']());}catch(_0x23b4d0){_0xf3956f['push'](_0xf3956f['shift']());}}}(a130_0x5ed9,0xabfaf));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 a130_0x5ed9(){const _0x156740=['prototype','1116951emgUcy','exec','slice','1810iPQXfV','2955ZJKDPn','2644vWStVj','5OTXMSZ','json','defineProperty','parse','82664tzSOrw','27243tnwVkc','getOwnPropertyDescriptor','336PAwrvV','1297542ZcjufM','1656455MeLICG','205144jevUHL','includes','undefined'];a130_0x5ed9=function(){return _0x156740;};return a130_0x5ed9();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function isUnsafeIntegerLiteral(_0x1645f6){const _0xe5989c=a130_0x4dca;if(_0x1645f6[_0xe5989c(0x1bc)]('.')||_0x1645f6[_0xe5989c(0x1bc)]('e')||_0x1645f6['includes']('E'))return![];const _0x249438=BigInt(_0x1645f6);return _0x249438>MAX_SAFE_INTEGER||_0x249438<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x336e07){const _0x3f707d=a130_0x4dca;let _0x23aec7='',_0x436a06=![],_0x1145bc=![];for(let _0x26e6d7=0x0;_0x26e6d7<_0x336e07['length'];){const _0x45fcb0=_0x336e07[_0x26e6d7];if(_0x436a06){_0x23aec7+=_0x45fcb0,_0x26e6d7+=0x1;if(_0x1145bc)_0x1145bc=![];else{if(_0x45fcb0==='\x5c')_0x1145bc=!![];else _0x45fcb0==='\x22'&&(_0x436a06=![]);}continue;}if(_0x45fcb0==='\x22'){_0x436a06=!![],_0x23aec7+=_0x45fcb0,_0x26e6d7+=0x1;continue;}if(_0x45fcb0==='-'||_0x45fcb0>='0'&&_0x45fcb0<='9'){const _0x5dd38c=JSON_NUMBER_PATTERN[_0x3f707d(0x1c0)](_0x336e07[_0x3f707d(0x1c1)](_0x26e6d7))?.[0x0];if(_0x5dd38c){_0x23aec7+=isUnsafeIntegerLiteral(_0x5dd38c)?'\x22'+_0x5dd38c+'\x22':_0x5dd38c,_0x26e6d7+=_0x5dd38c['length'];continue;}}_0x23aec7+=_0x45fcb0,_0x26e6d7+=0x1;}return _0x23aec7;}export function parseLosslessJson(_0x31b0fc){const _0x5263ce=a130_0x4dca;return JSON[_0x5263ce(0x1b4)](quoteUnsafeIntegerLiterals(_0x31b0fc));}export function installLosslessJsonResponseParser(){const _0x697a00=a130_0x4dca;if(typeof Response===_0x697a00(0x1bd))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x697a00(0x1be)],originalResponseJsonDescriptor=Object[_0x697a00(0x1b7)](responseJsonPrototype,_0x697a00(0x1b2)),Object['defineProperty'](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x2f1020(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x2269af=_0x697a00;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0x2269af(0x1b3)](responseJsonPrototype,_0x2269af(0x1b2),originalResponseJsonDescriptor):delete responseJsonPrototype[_0x2269af(0x1b2)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
|