@lovrabet/lovrabet-cli 2.1.23-beta.2 → 2.1.23-beta.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/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.d.ts +14 -0
- 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/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/npx-skills-add.d.ts +30 -0
- 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.d.ts +48 -0
- package/lib/skills/skill-presence.js +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x69d589,_0x9e4c89){const _0x463bed=a112_0x1fa7,_0x56c666=_0x69d589();while(!![]){try{const _0x52e763=-parseInt(_0x463bed(0x132))/0x1+parseInt(_0x463bed(0x12c))/0x2+-parseInt(_0x463bed(0x13e))/0x3+parseInt(_0x463bed(0x120))/0x4*(-parseInt(_0x463bed(0x145))/0x5)+parseInt(_0x463bed(0x129))/0x6*(parseInt(_0x463bed(0x135))/0x7)+parseInt(_0x463bed(0x125))/0x8+-parseInt(_0x463bed(0x138))/0x9;if(_0x52e763===_0x9e4c89)break;else _0x56c666['push'](_0x56c666['shift']());}catch(_0xa9fa47){_0x56c666['push'](_0x56c666['shift']());}}}(a112_0x3887,0x6670d));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';function a112_0x3887(){const _0x478134=['env','linkedPaths','tags','linkedPath','code','125QLmHbS','isArray','skillCode','\x20!=\x20','isDirectory','name','appCode','60000VvNWeE','project','local','validation','map','4376792NpjKHQ','push','localeCompare','from','6DIUkwH','cache','accessKey','1362652DTTCdW','isSymbolicLink','scope','has','link','sort','566654QvQOZj','builtin','skillMdPath','5663329yWQDTc','includes','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','1215675jxRFFo','trim','source','scopes','filter','dir','1623438ywwJvF','values'];a112_0x3887=function(){return _0x478134;};return a112_0x3887();}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(_0x102b24,_0x260fe4,_0x10d075={}){const _0x3cad33=a112_0x1fa7,_0x3ac39c=safePathSegment(_0x102b24['appCode'],_0x3cad33(0x11f));if(_0x260fe4[_0x3cad33(0x11f)]!==_0x3ac39c)throw CliErrors[_0x3cad33(0x123)](_0x3cad33(0x137)+_0x260fe4['appCode']+_0x3cad33(0x148)+_0x3ac39c);const _0x422090=normalizeRuntimeSkillScopes(_0x102b24[_0x3cad33(0x13b)]),_0x26b43f=new Set(_0x422090),_0x4ce1d8=_0x102b24[_0x3cad33(0x144)]?.[_0x3cad33(0x139)](),_0x2378ce=new Map(),_0x23f792=resolve(getRuntimeSkillCacheRoot(_0x102b24[_0x3cad33(0x140)],_0x102b24[_0x3cad33(0x12b)],_0x10d075),_0x3ac39c);for(const _0x22b521 of _0x422090){for(const _0x447574 of localSkillEntryDirs(resolve(_0x23f792,_0x22b521))){collectLocalRuntimeSkill(_0x2378ce,_0x447574,{'appCode':_0x3ac39c,'scopes':_0x26b43f,'code':_0x4ce1d8,'source':_0x3cad33(0x12a)});}}for(const _0xc56f77 of _0x260fe4['skillRoots']){for(const _0x1f5ef6 of localSkillLinkCandidates(_0xc56f77,_0x260fe4,_0x26b43f)){collectLocalRuntimeSkill(_0x2378ce,_0x1f5ef6,{'appCode':_0x3ac39c,'scopes':_0x26b43f,'code':_0x4ce1d8,'source':_0x3cad33(0x130),'linkedPath':_0x1f5ef6});}}return Array[_0x3cad33(0x128)](_0x2378ce[_0x3cad33(0x13f)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x55ac5f){const _0x2760ec=a112_0x1fa7;if(!existsSync(_0x55ac5f))return[];return readdirSync(_0x55ac5f,{'withFileTypes':!![]})[_0x2760ec(0x13c)](_0x2dec2e=>_0x2dec2e[_0x2760ec(0x149)]()||_0x2dec2e[_0x2760ec(0x12d)]())[_0x2760ec(0x124)](_0x47f256=>resolve(_0x55ac5f,_0x47f256[_0x2760ec(0x14a)]));}function localSkillLinkCandidates(_0x3b5bfd,_0x677925,_0x314fb2){const _0x14959f=a112_0x1fa7;if(!existsSync(_0x3b5bfd))return[];const _0x49d97a=_0x677925[_0x14959f(0x11f)]+'--';return readdirSync(_0x3b5bfd,{'withFileTypes':!![]})[_0x14959f(0x13c)](_0x380b30=>_0x380b30[_0x14959f(0x149)]()||_0x380b30[_0x14959f(0x12d)]())['filter'](_0x3f2477=>_0x677925[_0x14959f(0x12e)]===_0x14959f(0x121)||_0x3f2477[_0x14959f(0x14a)]['startsWith'](_0x49d97a)||_0x314fb2[_0x14959f(0x12f)](_0x14959f(0x133)))['map'](_0x1d9e15=>resolve(_0x3b5bfd,_0x1d9e15[_0x14959f(0x14a)]));}function collectLocalRuntimeSkill(_0x444b0e,_0x4238a5,_0x2d9f5d){const _0x16ecad=a112_0x1fa7,_0x1a44e7=resolve(_0x4238a5,METADATA_FILE),_0x1bc047=readMetadataIfPresent(_0x1a44e7);if(!_0x1bc047)return;if(_0x1bc047[_0x16ecad(0x11f)]!==_0x2d9f5d[_0x16ecad(0x11f)])return;if(!isRuntimeSkillScope(_0x1bc047[_0x16ecad(0x12e)])||!_0x2d9f5d[_0x16ecad(0x13b)][_0x16ecad(0x12f)](_0x1bc047[_0x16ecad(0x12e)]))return;const _0xe39bda=_0x1bc047[_0x16ecad(0x147)]?.[_0x16ecad(0x139)]();if(!_0xe39bda)return;if(_0x2d9f5d[_0x16ecad(0x144)]&&_0xe39bda!==_0x2d9f5d[_0x16ecad(0x144)])return;const _0x19a094=_0x1bc047[_0x16ecad(0x12e)]+':'+_0xe39bda,_0x3276aa=_0x2d9f5d[_0x16ecad(0x143)]?[_0x2d9f5d[_0x16ecad(0x143)]]:[],_0x43f776=_0x444b0e['get'](_0x19a094);if(_0x43f776){_0x2d9f5d[_0x16ecad(0x13a)]==='cache'&&(_0x43f776[_0x16ecad(0x13d)]=_0x4238a5,_0x43f776['cacheDir']=_0x4238a5,_0x43f776[_0x16ecad(0x134)]=resolve(_0x4238a5,SKILL_FILE),_0x43f776['metadataPath']=_0x1a44e7);for(const _0x5da52b of _0x3276aa){!_0x43f776[_0x16ecad(0x141)][_0x16ecad(0x136)](_0x5da52b)&&_0x43f776['linkedPaths'][_0x16ecad(0x126)](_0x5da52b);}_0x43f776[_0x16ecad(0x141)][_0x16ecad(0x131)]();return;}_0x444b0e['set'](_0x19a094,{..._0x1bc047,'tags':Array[_0x16ecad(0x146)](_0x1bc047[_0x16ecad(0x142)])?_0x1bc047[_0x16ecad(0x142)]:[],'scope':_0x1bc047[_0x16ecad(0x12e)],'source':_0x16ecad(0x122),'dir':_0x4238a5,'cacheDir':_0x2d9f5d[_0x16ecad(0x13a)]===_0x16ecad(0x12a)?_0x4238a5:undefined,'skillMdPath':resolve(_0x4238a5,SKILL_FILE),'metadataPath':_0x1a44e7,'linkedPaths':_0x3276aa});}function a112_0x1fa7(_0x30df63,_0x1a4d78){_0x30df63=_0x30df63-0x11f;const _0x3887d0=a112_0x3887();let _0x1fa73f=_0x3887d0[_0x30df63];return _0x1fa73f;}function compareLocalRuntimeSkills(_0x4bf8e1,_0x10bb8e){const _0x446ab2=a112_0x1fa7,_0x1417ad={'personal':0x0,'company':0x1,'builtin':0x2};return _0x1417ad[_0x4bf8e1[_0x446ab2(0x12e)]]-_0x1417ad[_0x10bb8e['scope']]||_0x4bf8e1[_0x446ab2(0x147)][_0x446ab2(0x127)](_0x10bb8e[_0x446ab2(0x147)])||_0x4bf8e1[_0x446ab2(0x13d)][_0x446ab2(0x127)](_0x10bb8e['dir']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x586a47,_0x42dc0c){const _0x3089d5=a113_0x45a5,_0x32329f=_0x586a47();while(!![]){try{const _0x524c6b=-parseInt(_0x3089d5(0xef))/0x1*(parseInt(_0x3089d5(0xe3))/0x2)+parseInt(_0x3089d5(0xfd))/0x3*(parseInt(_0x3089d5(0xe1))/0x4)+-parseInt(_0x3089d5(0xd2))/0x5*(parseInt(_0x3089d5(0xf2))/0x6)+-parseInt(_0x3089d5(0xf3))/0x7+-parseInt(_0x3089d5(0xf7))/0x8*(parseInt(_0x3089d5(0xf4))/0x9)+-parseInt(_0x3089d5(0xf9))/0xa*(parseInt(_0x3089d5(0x100))/0xb)+parseInt(_0x3089d5(0xdf))/0xc*(parseInt(_0x3089d5(0xea))/0xd);if(_0x524c6b===_0x42dc0c)break;else _0x32329f['push'](_0x32329f['shift']());}catch(_0x5bdfca){_0x32329f['push'](_0x32329f['shift']());}}}(a113_0x2ebf,0xc8a88));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';function a113_0x2ebf(){const _0x4e186e=['9023320vAZHmP','toLowerCase','60QfsRpA','string','Duplicate\x20Skill\x20file\x20path:\x20','Skill\x20file\x20sha256\x20is\x20invalid:\x20','86673PjSGWk','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isFile','911119bJGbqT','startsWith','isBuffer','isDirectory','object','15cpekDC','set','sha256','from','trim','replace','split','push','localeCompare','isArray','values','bytes','content','12PABgRi','Skill\x20file\x20size\x20is\x20invalid:\x20','124icCAJP','name','2JjQccK','has','isSafeInteger','Skill\x20file\x20path\x20must\x20be\x20text.','validation','length','sort','56736537GVYHuE','isSymbolicLink','path','toString','utf8','581323PQKwgz','size','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','1854276EDvgXm','9133068vnVSLg','9aGPuQr','Unsafe\x20Skill\x20file\x20path:\x20','compare'];a113_0x2ebf=function(){return _0x4e186e;};return a113_0x2ebf();}export function fileContent(_0x26452c){const _0x48c31f=a113_0x45a5;return _0x26452c[_0x48c31f(0xdd)]??Buffer[_0x48c31f(0xd5)](_0x26452c[_0x48c31f(0xde)]??'',_0x48c31f(0xee));}export function fileText(_0x576424){const _0x54fe3d=a113_0x45a5;return fileContent(_0x576424)[_0x54fe3d(0xed)](_0x54fe3d(0xee));}export function normalizeLocalFiles(_0x1f7a82){const _0x5092de=a113_0x45a5;if(!Array[_0x5092de(0xdb)](_0x1f7a82)||_0x1f7a82['length']===0x0)return[];const _0x5cad52=new Map();for(const _0x1f4dcd of _0x1f7a82){if(!_0x1f4dcd||typeof _0x1f4dcd!==_0x5092de(0xd1)||typeof _0x1f4dcd[_0x5092de(0xec)]!==_0x5092de(0xfa))throw CliErrors[_0x5092de(0xe7)](_0x5092de(0xe6));const _0x538c06=normalizeSkillRelativePath(_0x1f4dcd[_0x5092de(0xec)]);if(_0x5cad52[_0x5092de(0xe4)](_0x538c06))throw CliErrors[_0x5092de(0xe7)](_0x5092de(0xfb)+_0x538c06);if(_0x1f4dcd[_0x5092de(0xdd)]!==undefined&&!Buffer[_0x5092de(0xcf)](_0x1f4dcd[_0x5092de(0xdd)]))throw CliErrors[_0x5092de(0xe7)](_0x5092de(0xfe)+_0x538c06);if(_0x1f4dcd[_0x5092de(0xdd)]===undefined&&typeof _0x1f4dcd[_0x5092de(0xde)]!==_0x5092de(0xfa))throw CliErrors['validation']('Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'+_0x538c06);const _0x2d8863=fileContent(_0x1f4dcd);_0x5cad52[_0x5092de(0xd3)](_0x538c06,{'path':_0x538c06,'bytes':_0x2d8863});}return Array[_0x5092de(0xd5)](_0x5cad52[_0x5092de(0xdc)]())[_0x5092de(0xe9)](compareSkillFiles);}export function normalizeManifestFiles(_0x4a8445){const _0x4a3c82=a113_0x45a5;if(!Array[_0x4a3c82(0xdb)](_0x4a8445)||_0x4a8445[_0x4a3c82(0xe8)]===0x0)return[];const _0x3a0269=new Map();for(const _0x8537e3 of _0x4a8445){if(!_0x8537e3||typeof _0x8537e3!==_0x4a3c82(0xd1)||typeof _0x8537e3['path']!=='string')throw CliErrors['validation'](_0x4a3c82(0xe6));const _0x5c1dfc=normalizeSkillRelativePath(_0x8537e3['path']);if(_0x3a0269[_0x4a3c82(0xe4)](_0x5c1dfc))throw CliErrors[_0x4a3c82(0xe7)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x5c1dfc);if(!isSha256Hex(_0x8537e3[_0x4a3c82(0xd4)]))throw CliErrors[_0x4a3c82(0xe7)](_0x4a3c82(0xfc)+_0x5c1dfc);if(!Number[_0x4a3c82(0xe5)](_0x8537e3[_0x4a3c82(0xf0)])||_0x8537e3[_0x4a3c82(0xf0)]<0x0)throw CliErrors['validation'](_0x4a3c82(0xe0)+_0x5c1dfc);_0x3a0269[_0x4a3c82(0xd3)](_0x5c1dfc,{'path':_0x5c1dfc,'sha256':_0x8537e3[_0x4a3c82(0xd4)][_0x4a3c82(0xf8)](),'size':_0x8537e3[_0x4a3c82(0xf0)]});}return Array[_0x4a3c82(0xd5)](_0x3a0269[_0x4a3c82(0xdc)]())[_0x4a3c82(0xe9)](compareSkillFiles);}function a113_0x45a5(_0x3e6a30,_0x35ea0b){_0x3e6a30=_0x3e6a30-0xcf;const _0x2ebf04=a113_0x2ebf();let _0x45a50d=_0x2ebf04[_0x3e6a30];return _0x45a50d;}export function scanSkillDirectory(_0xc57209){const _0x43adf1=realpathSync(_0xc57209),_0x171fe=[];function _0x182587(_0x1069a6){const _0x46f128=a113_0x45a5,_0x1e5f40=readdirSync(_0x1069a6,{'withFileTypes':!![]})[_0x46f128(0xe9)]((_0x44b35a,_0x34042f)=>_0x44b35a[_0x46f128(0xe2)][_0x46f128(0xda)](_0x34042f['name']));for(const _0x5db31f of _0x1e5f40){if(_0x5db31f[_0x46f128(0xd0)]()&&IGNORED_DIR_NAMES[_0x46f128(0xe4)](_0x5db31f[_0x46f128(0xe2)]))continue;if(IGNORED_FILE_NAMES[_0x46f128(0xe4)](_0x5db31f[_0x46f128(0xe2)]))continue;const _0x130fb0=resolve(_0x1069a6,_0x5db31f[_0x46f128(0xe2)]);if(_0x5db31f[_0x46f128(0xeb)]())throw CliErrors['validation'](_0x46f128(0xf1)+_0x130fb0);const _0x22e07d=toPosixPath(relative(_0x43adf1,_0x130fb0));if(_0x5db31f[_0x46f128(0xd0)]()){_0x182587(_0x130fb0);continue;}if(!_0x5db31f[_0x46f128(0xff)]())continue;validateSkillRelativePath(_0x22e07d);const _0x1127c4=readFileSync(_0x130fb0);_0x171fe[_0x46f128(0xd9)]({'path':_0x22e07d,'bytes':_0x1127c4});}}return _0x182587(_0x43adf1),normalizeLocalFiles(_0x171fe);}export function compareSkillFiles(_0x23d35a,_0x155d86){const _0x241836=a113_0x45a5;if(_0x23d35a[_0x241836(0xec)]===SKILL_FILE)return _0x155d86['path']===SKILL_FILE?0x0:-0x1;if(_0x155d86[_0x241836(0xec)]===SKILL_FILE)return 0x1;return Buffer[_0x241836(0xf6)](Buffer[_0x241836(0xd5)](_0x23d35a[_0x241836(0xec)],_0x241836(0xee)),Buffer[_0x241836(0xd5)](_0x155d86[_0x241836(0xec)],'utf8'));}export function normalizeSkillRelativePath(_0x3657a4){const _0x2eaa31=a113_0x45a5,_0x2a8908=toPosixPath(_0x3657a4[_0x2eaa31(0xd6)]());return validateSkillRelativePath(_0x2a8908),_0x2a8908;}export function validateSkillRelativePath(_0x14c9e1){const _0x420441=a113_0x45a5;if(!_0x14c9e1||_0x14c9e1[_0x420441(0x101)]('/')||_0x14c9e1['includes']('//'))throw CliErrors[_0x420441(0xe7)](_0x420441(0xf5)+_0x14c9e1);for(const _0x51072e of _0x14c9e1[_0x420441(0xd8)]('/')){if(!_0x51072e||_0x51072e==='.'||_0x51072e==='..')throw CliErrors[_0x420441(0xe7)](_0x420441(0xf5)+_0x14c9e1);}}export function toPosixPath(_0x1c730b){const _0x3261e4=a113_0x45a5;return _0x1c730b[_0x3261e4(0xd7)](/\\/g,'/');}export function isSha256Hex(_0x1bb7d3){const _0x30778e=a113_0x45a5;return typeof _0x1bb7d3===_0x30778e(0xfa)&&/^[a-fA-F0-9]{64}$/['test'](_0x1bb7d3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16a30f,_0x5051f7){const _0x1e8f5c=a114_0x41db,_0x28c6fe=_0x16a30f();while(!![]){try{const _0x49cb7c=-parseInt(_0x1e8f5c(0x83))/0x1*(parseInt(_0x1e8f5c(0x75))/0x2)+-parseInt(_0x1e8f5c(0x94))/0x3+parseInt(_0x1e8f5c(0x8c))/0x4+-parseInt(_0x1e8f5c(0x76))/0x5*(parseInt(_0x1e8f5c(0x99))/0x6)+parseInt(_0x1e8f5c(0x95))/0x7+-parseInt(_0x1e8f5c(0x92))/0x8+parseInt(_0x1e8f5c(0xa1))/0x9;if(_0x49cb7c===_0x5051f7)break;else _0x28c6fe['push'](_0x28c6fe['shift']());}catch(_0x1b5ee9){_0x28c6fe['push'](_0x28c6fe['shift']());}}}(a114_0x3955,0x64ea3));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(_0x3cb54f,_0x187810,_0x1697e4){const _0x11a50a=a114_0x41db,_0xf8ead6=requireSkillCode(_0x3cb54f),_0x2e2ee7=requirePackageBytes(_0xf8ead6,_0x1697e4[_0x11a50a(0x84)]),_0x425bf5=extractDownloadedPackage(_0x2e2ee7),_0x13efe6=_0x425bf5[_0x11a50a(0x78)](_0x4545fb=>_0x4545fb[_0x11a50a(0x69)]===SKILL_FILE);if(!_0x13efe6)throw CliErrors['validation'](_0x11a50a(0x82)+SKILL_FILE+':\x20'+_0xf8ead6);const _0x410b8b=withMaterializedSkillFrontmatter(_0x425bf5,_0x3cb54f,_0xf8ead6),_0x58a95e=_0x410b8b[_0x11a50a(0x78)](_0x4c7e5f=>_0x4c7e5f[_0x11a50a(0x69)]===SKILL_FILE),_0x554986=fileText(_0x58a95e),_0x590aea=getRuntimeSkillDir(_0x1697e4[_0x11a50a(0x96)],_0x1697e4[_0x11a50a(0x7f)],_0x1697e4[_0x11a50a(0x9b)],_0x187810,_0xf8ead6,_0x1697e4[_0x11a50a(0x98)]),_0x4cc619=resolve(_0x590aea,SKILL_FILE),_0x55603a=resolve(_0x590aea,METADATA_FILE),_0x2eee6d=contentHash(_0x554986),_0x5cd0aa=readMetadataIfPresent(_0x55603a)?.[_0x11a50a(0x81)];ensurePulledFilesCanBeOverwritten(_0x590aea,_0x55603a,_0x410b8b,_0x1697e4[_0x11a50a(0x6d)]===!![]),mkdirSync(_0x590aea,{'recursive':!![],'mode':0x1c0});const _0x42eef7=existsSync(_0x4cc619)?readFileSync(_0x4cc619,'utf8'):undefined;return materializeFiles(_0x590aea,_0x410b8b),removeStaleManagedFiles(_0x590aea,_0x5cd0aa,_0x410b8b),writeJsonAtomic(_0x55603a,buildMetadata(_0x3cb54f,_0x187810,_0x1697e4[_0x11a50a(0x9b)],_0x2eee6d,_0x1697e4[_0x11a50a(0xa0)],_0x410b8b,_0x2e2ee7)),{'skill':_0x3cb54f,'scope':_0x187810,'dir':_0x590aea,'skillMdPath':_0x4cc619,'metadataPath':_0x55603a,'contentHash':_0x2eee6d,'changed':_0x42eef7!==_0x554986};}function withMaterializedSkillFrontmatter(_0x27bcec,_0x102003,_0x2b9a02){const _0x4bc87f=a114_0x41db,_0x1b92a0=skillDisplayName(_0x102003,_0x2b9a02),_0x1aec58=_0x102003['description']?.[_0x4bc87f(0x8f)]()||_0x1b92a0||_0x2b9a02;return normalizeLocalFiles(_0x27bcec)[_0x4bc87f(0x6a)](_0x17f11b=>{const _0x5e819c=_0x4bc87f,_0x151333=fileText(_0x17f11b);if(_0x17f11b[_0x5e819c(0x69)]!==SKILL_FILE)return _0x17f11b;if(hasYamlFrontmatter(_0x151333))return{'path':_0x17f11b[_0x5e819c(0x69)],'content':withSyncedDisplayName(_0x151333,_0x1b92a0)};return{'path':_0x17f11b['path'],'content':prependSkillFrontmatter(_0x151333,{'name':_0x2b9a02,'displayName':_0x1b92a0,'description':_0x1aec58})};});}function hasYamlFrontmatter(_0x38a2a8){const _0x4ec363=a114_0x41db;return/^\uFEFF?---\s*\r?\n/[_0x4ec363(0x7d)](_0x38a2a8);}function prependSkillFrontmatter(_0x534e3a,_0x23d7ee){const _0xecd071=a114_0x41db,_0x69050a=_0x534e3a['replace'](/^\uFEFF/,'');return[_0xecd071(0x9e),_0xecd071(0x71)+yamlString(_0x23d7ee[_0xecd071(0x7c)]),_0x23d7ee[_0xecd071(0x8b)]?_0xecd071(0x7a)+yamlString(_0x23d7ee['displayName']):undefined,_0xecd071(0x6b)+yamlString(_0x23d7ee['description']),_0xecd071(0x9e),'',_0x69050a][_0xecd071(0x8d)](_0x5944ae=>_0x5944ae!==undefined)['join']('\x0a');}function yamlString(_0x346c02){const _0x37d2f5=a114_0x41db;return JSON[_0x37d2f5(0x72)](_0x346c02[_0x37d2f5(0x91)](/\r/g,'')[_0x37d2f5(0x8f)]());}function skillDisplayName(_0x55a5af,_0x118584){const _0x5f0aa2=a114_0x41db,_0x4d08ba=_0x55a5af[_0x5f0aa2(0x89)]?.[_0x5f0aa2(0x8f)]();return _0x4d08ba||_0x118584;}function withSyncedDisplayName(_0x4006f0,_0x3462b2){const _0x47816d=a114_0x41db,_0x325836=_0x4006f0[_0x47816d(0x7e)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x325836)return _0x4006f0;const _0x3a0aa7=_0x325836[0x1]??'',_0x57a4c2=_0x325836[0x2]??'',_0x44c77e=parseDocument(_0x57a4c2);if(_0x44c77e[_0x47816d(0x79)][_0x47816d(0x90)]>0x0||!isMap(_0x44c77e['contents']))return _0x4006f0;if(_0x3462b2)_0x44c77e[_0x47816d(0x87)](_0x47816d(0x8b),_0x3462b2);else{if(_0x44c77e['has']('displayName'))_0x44c77e[_0x47816d(0x93)](_0x47816d(0x8b));else return _0x4006f0;}forceBlockCollections(_0x44c77e['contents']);const _0x4efee4=_0x44c77e[_0x47816d(0x8e)]({'lineWidth':0x0})[_0x47816d(0x77)](),_0x518ed0=_0x4006f0[_0x47816d(0x74)](_0x325836[0x0]['length'])[_0x47816d(0x91)](/^\r?\n/,'');return _0x3a0aa7+_0x47816d(0x6c)+_0x4efee4+_0x47816d(0x70)+_0x518ed0;}function a114_0x3955(){const _0x2154c1=['Managed\x20file\x20was\x20removed\x20locally:\x20','name','test','match','accessKey','has','fileHashes','Runtime\x20Skill\x20package\x20is\x20missing\x20','76547QKacmc','packageBytes','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','flow','set','keys','skillName','.\x20Changed\x20file:\x20','displayName','2393496WcMRWx','filter','toString','trim','length','replace','4683832fZusMY','delete','960792JuNUdz','3526656qgtiNk','env','entries','paths','42bXcwoc','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','appCode','validation','isFile','---','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','pulledAt','13266378bEgkFN','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','path','map','description:\x20','---\x0a','force','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','\x0a---\x0a\x0a','name:\x20','stringify','contentHash','slice','18WNqyNl','405865ElDHug','trimEnd','find','errors','displayName:\x20'];a114_0x3955=function(){return _0x2154c1;};return a114_0x3955();}function forceBlockCollections(_0x3acf0f){if(!isNode(_0x3acf0f))return;visit(_0x3acf0f,(_0x5425f4,_0x485c36)=>{const _0x152d40=a114_0x41db;isCollection(_0x485c36)&&(_0x485c36[_0x152d40(0x86)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x4e3d5f,_0x3c2e7c,_0x5a70eb,_0x518cc9){const _0x598e9e=a114_0x41db;if(_0x518cc9||!existsSync(_0x3c2e7c))return;const _0x40e7c2=readMetadataIfPresent(_0x3c2e7c);if(!_0x40e7c2)return;const _0x3ce0d4=_0x40e7c2[_0x598e9e(0x81)]&&Object[_0x598e9e(0x88)](_0x40e7c2[_0x598e9e(0x81)])['length']>0x0?_0x40e7c2['fileHashes']:undefined;if(_0x3ce0d4)for(const [_0x4242b6,_0x51a4ca]of Object[_0x598e9e(0x97)](_0x3ce0d4)){const _0x2b1e90=resolveManagedFilePath(_0x4e3d5f,_0x4242b6);if(!existsSync(_0x2b1e90))throw CliErrors[_0x598e9e(0x9c)](_0x598e9e(0x9a)+_0x4e3d5f,_0x598e9e(0x7b)+_0x4242b6);const _0x55a39f=lstatSync(_0x2b1e90);if(!_0x55a39f[_0x598e9e(0x9d)]())throw CliErrors[_0x598e9e(0x9c)](_0x598e9e(0x9a)+_0x4e3d5f,_0x598e9e(0x6e)+_0x4242b6);const _0x4856f6=bufferSha256(readFileSync(_0x2b1e90));if(_0x4856f6!==_0x51a4ca)throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x4e3d5f+_0x598e9e(0x8a)+_0x4242b6,_0x598e9e(0x6f)+_0x4242b6);}else{const _0x5868ad=resolve(_0x4e3d5f,SKILL_FILE);if(existsSync(_0x5868ad)&&_0x40e7c2[_0x598e9e(0x73)]){const _0x1cadda=contentHash(readFileSync(_0x5868ad,'utf8'));if(_0x1cadda!==_0x40e7c2[_0x598e9e(0x73)])throw CliErrors['validation']('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x5868ad,_0x598e9e(0x68));}}for(const _0x50d886 of normalizeLocalFiles(_0x5a70eb)){if(_0x3ce0d4?.[_0x50d886[_0x598e9e(0x69)]])continue;if(!_0x3ce0d4&&_0x50d886[_0x598e9e(0x69)]===SKILL_FILE)continue;const _0x1a72b6=resolveManagedFilePath(_0x4e3d5f,_0x50d886[_0x598e9e(0x69)]);if(!existsSync(_0x1a72b6))continue;const _0x3c88cd=lstatSync(_0x1a72b6);if(!_0x3c88cd[_0x598e9e(0x9d)]())throw CliErrors[_0x598e9e(0x9c)](_0x598e9e(0x9a)+_0x4e3d5f,_0x598e9e(0x85)+_0x50d886['path']);const _0x4f3a3b=bufferSha256(readFileSync(_0x1a72b6));if(_0x4f3a3b!==fileHash(_0x50d886))throw CliErrors[_0x598e9e(0x9c)](_0x598e9e(0x9a)+_0x4e3d5f,_0x598e9e(0x9f)+_0x50d886[_0x598e9e(0x69)]);}}function a114_0x41db(_0x20c85d,_0x54ef92){_0x20c85d=_0x20c85d-0x68;const _0x3955d4=a114_0x3955();let _0x41dba4=_0x3955d4[_0x20c85d];return _0x41dba4;}function materializeFiles(_0x112db7,_0x4b99df){const _0x2b6dca=a114_0x41db;for(const _0x52a409 of normalizeLocalFiles(_0x4b99df)){const _0x2e9a55=resolveManagedFilePath(_0x112db7,_0x52a409[_0x2b6dca(0x69)]);mkdirSync(dirname(_0x2e9a55),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2e9a55,fileContent(_0x52a409),0x180);}}function removeStaleManagedFiles(_0x516532,_0x47beb8,_0x990ee7){const _0x6f343c=a114_0x41db;if(!_0x47beb8)return;const _0x39ac68=new Set(normalizeLocalFiles(_0x990ee7)[_0x6f343c(0x6a)](_0x764aa4=>_0x764aa4[_0x6f343c(0x69)]));for(const _0x541c8f of Object[_0x6f343c(0x88)](_0x47beb8)){if(_0x39ac68[_0x6f343c(0x80)](_0x541c8f))continue;const _0x4a8911=resolveManagedFilePath(_0x516532,_0x541c8f);existsSync(_0x4a8911)&&lstatSync(_0x4a8911)[_0x6f343c(0x9d)]()&&rmSync(_0x4a8911,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x447466,_0x2ef466){const _0x59ebe0=a115_0xa9c6,_0x23e703=_0x447466();while(!![]){try{const _0x50bc8a=-parseInt(_0x59ebe0(0x1f5))/0x1+parseInt(_0x59ebe0(0x1ed))/0x2*(parseInt(_0x59ebe0(0x1e0))/0x3)+parseInt(_0x59ebe0(0x1df))/0x4*(parseInt(_0x59ebe0(0x1fa))/0x5)+parseInt(_0x59ebe0(0x1e4))/0x6+-parseInt(_0x59ebe0(0x1d7))/0x7+-parseInt(_0x59ebe0(0x1e7))/0x8*(parseInt(_0x59ebe0(0x1f1))/0x9)+-parseInt(_0x59ebe0(0x1fd))/0xa*(-parseInt(_0x59ebe0(0x1f9))/0xb);if(_0x50bc8a===_0x2ef466)break;else _0x23e703['push'](_0x23e703['shift']());}catch(_0x4cd9c9){_0x23e703['push'](_0x23e703['shift']());}}}(a115_0x4d61,0x2bd20));function a115_0xa9c6(_0x59de47,_0x434e02){_0x59de47=_0x59de47-0x1d7;const _0x4d6110=a115_0x4d61();let _0xa9c634=_0x4d6110[_0x59de47];return _0xa9c634;}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';export function buildMetadata(_0xa1d8da,_0x212628,_0x283f0a,_0x1e527c,_0x51212d,_0x367de5,_0x35b35c){const _0x4e3c51=a115_0xa9c6,_0x43056e=_0x367de5?normalizeLocalFiles(_0x367de5):[],_0x1ebc3b=!_0x35b35c&&_0x43056e['length']>0x0?buildSkillPackage(_0x43056e):undefined,_0x1d1d03=_0x35b35c?bufferSha256(_0x35b35c):_0x1ebc3b?.[_0x4e3c51(0x1e5)]['zipSha256'],_0x4a7e73=_0x35b35c?.[_0x4e3c51(0x1f2)]??_0x1ebc3b?.['manifest'][_0x4e3c51(0x1f6)],_0x1f182e=_0x43056e['length']>0x0?Object[_0x4e3c51(0x1e9)](_0x43056e['map'](_0x453b46=>[_0x453b46[_0x4e3c51(0x1f8)],fileHash(_0x453b46)])):undefined;return{'schemaVersion':_0x43056e[_0x4e3c51(0x1f2)]>0x0?0x2:0x1,'id':_0xa1d8da['id'],'appCode':_0x283f0a,'skillCode':requireSkillCode(_0xa1d8da),'skillName':_0xa1d8da[_0x4e3c51(0x1d8)],'description':_0xa1d8da[_0x4e3c51(0x1f4)],'scope':_0x212628,'readonly':_0x212628!==_0x4e3c51(0x1e6)||_0xa1d8da[_0x4e3c51(0x1e8)]===!![],'tenantCode':_0xa1d8da[_0x4e3c51(0x1ef)],'userId':_0xa1d8da['userId'],'version':_0xa1d8da[_0x4e3c51(0x1f7)],'status':_0xa1d8da[_0x4e3c51(0x1f3)],'tags':Array[_0x4e3c51(0x1dd)](_0xa1d8da[_0x4e3c51(0x1d9)])?_0xa1d8da[_0x4e3c51(0x1d9)]:[],'hasUpstreamUpdate':_0xa1d8da[_0x4e3c51(0x1e3)],'forkedFromSkillId':_0xa1d8da[_0x4e3c51(0x1dc)],'forkedFromVersion':_0xa1d8da[_0x4e3c51(0x1da)],'sourceSessionId':_0xa1d8da[_0x4e3c51(0x1f0)],'contentHash':_0x1e527c,'fileHashes':_0x1f182e,'treeHash':_0x43056e[_0x4e3c51(0x1f2)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x43056e)):undefined,'ossPath':remoteManifestOssPath(_0xa1d8da[_0x4e3c51(0x1db)]),'zipSha256':_0x1d1d03,'zipSize':_0x4a7e73,'files':_0x43056e[_0x4e3c51(0x1f2)]>0x0?_0x43056e[_0x4e3c51(0x1ec)](_0x5d86ed=>({'path':_0x5d86ed[_0x4e3c51(0x1f8)],'hash':fileHash(_0x5d86ed),'size':fileContent(_0x5d86ed)[_0x4e3c51(0x1f2)]})):undefined,'pulledAt':_0x51212d??new Date()[_0x4e3c51(0x1fb)]()};}export function requireSkillCode(_0x5ec7b7){const _0x5b2fb7=a115_0xa9c6,_0x543b33=_0x5ec7b7[_0x5b2fb7(0x1e1)]?.[_0x5b2fb7(0x1e2)]();if(!_0x543b33)throw CliErrors[_0x5b2fb7(0x1eb)](_0x5b2fb7(0x1fc));return _0x543b33;}export function readMetadataIfPresent(_0x3326d6){const _0x2fba22=a115_0xa9c6;if(!existsSync(_0x3326d6))return undefined;try{const _0x2d1e04=JSON['parse'](readFileSync(_0x3326d6,_0x2fba22(0x1ea)));return _0x2d1e04;}catch{throw CliErrors[_0x2fba22(0x1eb)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x3326d6);}}function a115_0x4d61(){const _0x57742a=['zipSize','version','path','935mNwXyb','55ugdlPb','toISOString','Runtime\x20Skill\x20is\x20missing\x20skillCode.','44130wFcOji','1973048onYRZW','skillName','tags','forkedFromVersion','files','forkedFromSkillId','isArray','ossPath','52424FvAlov','424803NeklyG','skillCode','trim','hasUpstreamUpdate','806988Mbekdb','manifest','personal','883096eKbqHg','readonly','fromEntries','utf8','validation','map','2FjlpCw','object','tenantCode','sourceSessionId','9JGWwID','length','status','description','223631MXXpAZ'];a115_0x4d61=function(){return _0x57742a;};return a115_0x4d61();}function remoteManifestOssPath(_0x29429b){const _0xfa530c=a115_0xa9c6;if(!_0x29429b||typeof _0x29429b!==_0xfa530c(0x1ee)||Array[_0xfa530c(0x1dd)](_0x29429b))return undefined;const _0x455975=_0x29429b[_0xfa530c(0x1de)];return typeof _0x455975==='string'&&_0x455975[_0xfa530c(0x1e2)]()?_0x455975[_0xfa530c(0x1e2)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5bb123,_0x17b3e1){const _0x25f400=a116_0x14d9,_0x428e18=_0x5bb123();while(!![]){try{const _0x1a1b41=-parseInt(_0x25f400(0x193))/0x1+parseInt(_0x25f400(0x184))/0x2+-parseInt(_0x25f400(0x195))/0x3*(parseInt(_0x25f400(0x18d))/0x4)+parseInt(_0x25f400(0x187))/0x5*(parseInt(_0x25f400(0x194))/0x6)+parseInt(_0x25f400(0x182))/0x7+-parseInt(_0x25f400(0x18e))/0x8+parseInt(_0x25f400(0x183))/0x9;if(_0x1a1b41===_0x17b3e1)break;else _0x428e18['push'](_0x428e18['shift']());}catch(_0x10f44c){_0x428e18['push'](_0x428e18['shift']());}}}(a116_0x5427,0x3cefd));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';function a116_0x14d9(_0xcf86bb,_0x5edb82){_0xcf86bb=_0xcf86bb-0x182;const _0x542733=a116_0x5427();let _0x14d9eb=_0x542733[_0xcf86bb];return _0x14d9eb;}import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x491e1a={}){const _0x2e028f=a116_0x14d9,_0xec94f3=_0x491e1a[_0x2e028f(0x196)]??homedir(),_0x17d536=resolve(_0xec94f3,PRODUCT_CONFIG[_0x2e028f(0x189)],_0x2e028f(0x188)),_0x527794=trimmedEnv('SKILL_ROOT'),_0x364a90=trimmedEnv(_0x2e028f(0x18a)),_0x3a6dda=resolve(_0xec94f3,_0x2e028f(0x18c)),_0x1f81c9=_0x491e1a['workbuddySkillsDir']??(existsSync(_0x3a6dda)?resolve(_0x3a6dda,_0x2e028f(0x190)):undefined);return{'homeDir':_0xec94f3,'cacheRoot':_0x17d536,'managedRoot':resolve(_0xec94f3,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x491e1a[_0x2e028f(0x198)]??_0x527794??resolve(_0xec94f3,_0x2e028f(0x18b),_0x2e028f(0x190)),'claudeSkillsDir':_0x491e1a['claudeSkillsDir']??_0x364a90??resolve(_0xec94f3,_0x2e028f(0x199),_0x2e028f(0x190)),'workbuddySkillsDir':_0x1f81c9};}export function runtimeAgentSkillRoots(_0x53cde9){const _0x273e60=a116_0x14d9;return[_0x53cde9[_0x273e60(0x198)],_0x53cde9[_0x273e60(0x197)],_0x53cde9[_0x273e60(0x191)]]['filter'](_0x1bab17=>Boolean(_0x1bab17));}export function getRuntimeSkillCacheRoot(_0x2d4390,_0x46abf2,_0x191b6c={}){const _0x48cb8a=a116_0x14d9,_0x36015d=resolveSkillSyncPaths(_0x191b6c);return resolve(_0x36015d['cacheRoot'],_0x2d4390,fingerprintAccessKey(_0x46abf2),_0x48cb8a(0x190));}export function getRuntimeSkillDir(_0x308ac6,_0x523e8a,_0xd135c0,_0x3b334c,_0xd38cd,_0x56532f={}){const _0x47c4d6=a116_0x14d9;return resolve(getRuntimeSkillCacheRoot(_0x308ac6,_0x523e8a,_0x56532f),safePathSegment(_0xd135c0,_0x47c4d6(0x192)),_0x3b334c,safePathSegment(_0xd38cd,'skillCode'));}function a116_0x5427(){const _0x435ae0=['1504531SdtWCE','2781081HTTnYu','943934fcpQjD','includes','Unsafe\x20','55qlfoKu','cache','homeDirName','CLAUDE_SKILL_ROOT','.agents','.workbuddy','294776cSiBZl','2990016DbFsov','trim','skills','workbuddySkillsDir','appCode','406545iEKHsg','58734qGwuSI','3dVKClj','homeDir','claudeSkillsDir','agentsSkillsDir','.claude'];a116_0x5427=function(){return _0x435ae0;};return a116_0x5427();}export function safePathSegment(_0x2957ee,_0x44b25c='path\x20segment'){const _0x3b0e4f=a116_0x14d9;if(!_0x2957ee||_0x2957ee[_0x3b0e4f(0x185)]('/')||_0x2957ee[_0x3b0e4f(0x185)]('\x5c')||_0x2957ee[_0x3b0e4f(0x185)]('..'))throw CliErrors['validation'](_0x3b0e4f(0x186)+_0x44b25c+'\x20for\x20local\x20path:\x20'+_0x2957ee);return _0x2957ee;}function trimmedEnv(_0x49a8f9){const _0xf9e040=a116_0x14d9,_0x5b2747=productEnv(_0x49a8f9)?.[_0xf9e040(0x18f)]();return _0x5b2747?_0x5b2747:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1080a7,_0x513623){const _0xcce7b9=a117_0x2db5,_0xeaee8a=_0x1080a7();while(!![]){try{const _0x4ac1f5=parseInt(_0xcce7b9(0x80))/0x1*(parseInt(_0xcce7b9(0x9f))/0x2)+-parseInt(_0xcce7b9(0x73))/0x3+-parseInt(_0xcce7b9(0x7d))/0x4+parseInt(_0xcce7b9(0x7b))/0x5+-parseInt(_0xcce7b9(0x78))/0x6*(-parseInt(_0xcce7b9(0xa4))/0x7)+parseInt(_0xcce7b9(0x9a))/0x8+-parseInt(_0xcce7b9(0x7e))/0x9*(parseInt(_0xcce7b9(0x7c))/0xa);if(_0x4ac1f5===_0x513623)break;else _0xeaee8a['push'](_0xeaee8a['shift']());}catch(_0x48e1aa){_0xeaee8a['push'](_0xeaee8a['shift']());}}}(a117_0xacfe,0xa94a2));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a117_0x437ab2}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(_0x57aea9,_0x287bac,_0x105c8a={}){const _0x49d45e=a117_0x2db5,_0x2c69a1=resolvePushDirectoryRoot(_0x57aea9),_0x1fff91=readPushMetadataIfPresent(resolve(_0x2c69a1,METADATA_FILE),{'ignoreInvalidMetadata':_0x105c8a[_0x49d45e(0xa7)]});if(_0x1fff91?.[_0x49d45e(0x84)]&&_0x1fff91[_0x49d45e(0x84)]!==_0x287bac&&!_0x105c8a[_0x49d45e(0xa1)]&&!_0x105c8a[_0x49d45e(0x95)])throw CliErrors[_0x49d45e(0x71)](_0x49d45e(0x70)+_0x1fff91[_0x49d45e(0x84)]+_0x49d45e(0x8e)+_0x287bac+'\x22.');const _0x32d44e=resolvePushSkillCode(_0x2c69a1,_0x287bac,_0x1fff91,_0x105c8a);if(!_0x32d44e)throw CliErrors[_0x49d45e(0x71)](_0x49d45e(0x83)+SKILL_FILE+',\x20'+METADATA_FILE+_0x49d45e(0x8a));return{'dir':_0x2c69a1,'skillCode':_0x32d44e,'metadata':_0x1fff91};}export function readPushDirectory(_0x2fd77e,_0x3e8c05,_0x227151={}){const _0x1fcc80=a117_0x2db5,_0x47d4f1=resolvePushDirectoryIdentity(_0x2fd77e,_0x3e8c05,_0x227151),_0x567f78=_0x47d4f1['dir'],_0x131f00=resolve(_0x567f78,SKILL_FILE);if(!existsSync(_0x131f00)||!lstatSync(_0x131f00)['isFile']())throw CliErrors['validation'](_0x1fcc80(0xab)+SKILL_FILE+':\x20'+_0x131f00);const _0x18b4f6=_0x47d4f1['metadata'],_0x94cdc=_0x227151[_0x1fcc80(0x89)]??_0x1fcc80(0x72);if(!_0x227151[_0x1fcc80(0xaf)]&&_0x18b4f6?.[_0x1fcc80(0x7f)]===_0x1fcc80(0x6d))throw CliErrors[_0x1fcc80(0x71)](_0x1fcc80(0x9b)+METADATA_FILE+_0x1fcc80(0xa2)+_0x18b4f6[_0x1fcc80(0x7f)]+'\x22.');if(!_0x227151[_0x1fcc80(0xaf)]&&_0x94cdc==='personal'&&_0x18b4f6?.[_0x1fcc80(0x7f)]&&_0x18b4f6['scope']!=='personal')throw CliErrors[_0x1fcc80(0x71)](_0x1fcc80(0xae)+METADATA_FILE+_0x1fcc80(0xa2)+_0x18b4f6[_0x1fcc80(0x7f)]+'\x22.',_0x1fcc80(0x93)+_0x567f78+_0x1fcc80(0x87));const _0x25c87d=scanSkillDirectory(_0x567f78),_0x1da097=buildSkillPackage(_0x25c87d),_0x5b082e=readFileSync(_0x131f00,_0x1fcc80(0xa5)),_0x5289e7=_0x47d4f1[_0x1fcc80(0x92)],_0x1d9073=_0x227151['ignoreMetadataForPayload']?undefined:_0x18b4f6,_0x32e457=readSkillDisplayName(_0x5b082e);return{'skillCode':_0x5289e7,'metadata':_0x18b4f6,'frontmatterDisplayName':_0x32e457,'input':{'skillCode':_0x5289e7,'skillName':_0x32e457??_0x1d9073?.[_0x1fcc80(0x97)],'description':_0x1d9073?.[_0x1fcc80(0x75)],'content':_0x5b082e,'files':_0x1da097[_0x1fcc80(0x8f)],'packageBase64':_0x1da097[_0x1fcc80(0x8c)],'tags':_0x1d9073?.['tags'],'version':_0x1d9073?.['version'],'sourceSessionId':_0x1d9073?.[_0x1fcc80(0x90)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1ace7f,_0x490613,_0x313574,_0x30ff73={}){const _0x4bff4a=a117_0x2db5,_0x29ab58=resolvePushDirectoryRoot(_0x1ace7f),_0x35ba49=readPushMetadataIfPresent(resolve(_0x29ab58,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x562e70=requireRemoteScope(_0x490613),_0x3bcfb6=readLocalSkillContent(_0x29ab58),_0x2d838b={..._0x490613,'appCode':_0x490613[_0x4bff4a(0x84)]??_0x313574,'skillName':_0x490613['skillName']??_0x35ba49?.[_0x4bff4a(0x97)],'description':_0x490613[_0x4bff4a(0x75)]??_0x35ba49?.[_0x4bff4a(0x75)],'tags':Array[_0x4bff4a(0x86)](_0x490613[_0x4bff4a(0x6e)])?_0x490613[_0x4bff4a(0x6e)]:_0x35ba49?.[_0x4bff4a(0x6e)],'sourceSessionId':_0x490613['sourceSessionId']??_0x35ba49?.[_0x4bff4a(0x90)],'content':_0x490613['content']??_0x3bcfb6},_0x3dabf2=buildMetadata(_0x2d838b,_0x562e70,_0x313574,contentHash(_0x3bcfb6),_0x30ff73[_0x4bff4a(0x85)]);writeJsonAtomic(resolve(_0x29ab58,METADATA_FILE),_0x3dabf2);}export function recordPushedRuntimeSkill(_0x43742f,_0x19b1ff,_0x62fd28,_0x33b1a6={}){const _0x30fe49=a117_0x2db5,_0x509bbe=resolvePushDirectoryRoot(_0x43742f),_0x59fdd8=scanSkillDirectory(_0x509bbe),_0x4c9c3d=_0x59fdd8['find'](_0x4b8d72=>_0x4b8d72['path']===SKILL_FILE),_0xe3da7b=_0x4c9c3d?fileText(_0x4c9c3d):'',_0x1c36e5=tryNormalizePackageManifest(_0x19b1ff[_0x30fe49(0xa8)]),_0x1092a2={..._0x19b1ff,'content':_0x19b1ff[_0x30fe49(0xaa)]??_0xe3da7b,'files':_0x1c36e5},_0x55e758=_0x1c36e5?normalizeLocalFiles(_0x59fdd8)[_0x30fe49(0x8d)](_0x4d51d9=>_0x1c36e5['files'][_0x30fe49(0x96)](_0x4ad26b=>_0x4ad26b['path']===_0x4d51d9['path'])):undefined,_0x2fbf48=buildMetadata(_0x1092a2,_0x33b1a6[_0x30fe49(0x7f)]??_0x30fe49(0x72),_0x62fd28,contentHash(_0x1092a2[_0x30fe49(0xaa)]??''),_0x33b1a6['pushedAt'],_0x55e758);writeJsonAtomic(resolve(_0x509bbe,METADATA_FILE),_0x2fbf48);}export function deriveSkillCodeFromDirectory(_0x1ad926,_0x49984d){const _0x10b058=a117_0x2db5,_0x22cc0e=basename(resolve(_0x1ad926)),_0x4b5390=_0x49984d+'--';return _0x22cc0e[_0x10b058(0xa0)](_0x4b5390)?_0x22cc0e[_0x10b058(0x94)](_0x4b5390[_0x10b058(0x6c)]):_0x22cc0e;}function resolvePushSkillCode(_0xd45499,_0x288718,_0x10f137,_0x6b14b8){const _0x3f8822=a117_0x2db5,_0x202cab=deriveSkillCodeFromSkillFile(_0xd45499)||deriveSkillCodeFromDirectory(_0xd45499,_0x288718);if(_0x6b14b8[_0x3f8822(0x9c)])return _0x202cab;return _0x10f137?.[_0x3f8822(0x92)]?.['trim']()||_0x202cab;}function deriveSkillCodeFromSkillFile(_0x16326b){const _0x112b77=a117_0x2db5,_0x4868b8=resolve(_0x16326b,SKILL_FILE);if(!existsSync(_0x4868b8)||!lstatSync(_0x4868b8)[_0x112b77(0x79)]())return undefined;const _0x304ef2=readFileSync(_0x4868b8,_0x112b77(0xa5)),_0x273a10=_0x304ef2['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x273a10)return undefined;const _0x3e2f64=parseFrontmatterObject(_0x273a10[0x1]??''),_0x2e0012=scalarToString(_0x3e2f64?.[_0x112b77(0x88)]);return _0x2e0012?slugifySkillName(_0x2e0012):undefined;}function readSkillDisplayName(_0x281954){const _0xe5489c=a117_0x2db5,_0x300ba8=_0x281954[_0xe5489c(0x8b)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x300ba8)return undefined;const _0x3c1bc5=parseFrontmatterObject(_0x300ba8[0x1]??'');return scalarToString(_0x3c1bc5?.[_0xe5489c(0xa6)]);}function slugifySkillName(_0x4d573a){const _0x4dac6c=a117_0x2db5,_0x732bd4=_0x4d573a['trim']()[_0x4dac6c(0xa9)]()[_0x4dac6c(0x91)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4dac6c(0x91)](/^-+/,'')[_0x4dac6c(0x91)](/-+$/,'')[_0x4dac6c(0x91)](/-{2,}/g,'-');if(!_0x732bd4)throw CliErrors[_0x4dac6c(0x71)](_0x4dac6c(0x77)+SKILL_FILE+_0x4dac6c(0x9d));return _0x732bd4;}function parseFrontmatterObject(_0x5dfe4a){const _0x2f011f=a117_0x2db5;try{const _0x15a438=a117_0x437ab2(_0x5dfe4a);return _0x15a438&&typeof _0x15a438===_0x2f011f(0x74)&&!Array[_0x2f011f(0x86)](_0x15a438)?_0x15a438:undefined;}catch{return undefined;}}function scalarToString(_0x2a5d9c){const _0x59934b=a117_0x2db5;if(typeof _0x2a5d9c===_0x59934b(0x98))return _0x2a5d9c[_0x59934b(0x81)]();if(typeof _0x2a5d9c===_0x59934b(0x99)||typeof _0x2a5d9c===_0x59934b(0x9e))return String(_0x2a5d9c);return undefined;}function resolvePushDirectoryRoot(_0x42f93a){const _0x34da09=a117_0x2db5,_0x550f78=resolve(_0x42f93a);if(!existsSync(_0x550f78))throw CliErrors[_0x34da09(0x71)](_0x34da09(0xa3)+_0x42f93a);const _0xb8a182=lstatSync(_0x550f78);if(_0xb8a182['isDirectory']())return _0x550f78;if(_0xb8a182[_0x34da09(0xac)]()){const _0x5b0dbf=realpathSync(_0x550f78);if(lstatSync(_0x5b0dbf)[_0x34da09(0x6f)]())return _0x5b0dbf;}throw CliErrors['validation'](_0x34da09(0xa3)+_0x42f93a);}function a117_0x2db5(_0x2af7f8,_0x34d9a0){_0x2af7f8=_0x2af7f8-0x6c;const _0xacfeed=a117_0xacfe();let _0x2db53c=_0xacfeed[_0x2af7f8];return _0x2db53c;}function requireRemoteScope(_0x3a067){const _0x59cdea=a117_0x2db5;if(_0x3a067[_0x59cdea(0x7f)]==='personal'||_0x3a067['scope']===_0x59cdea(0x82)||_0x3a067[_0x59cdea(0x7f)]===_0x59cdea(0x6d))return _0x3a067['scope'];throw CliErrors[_0x59cdea(0x71)]('Remote\x20Skill\x20'+(_0x3a067[_0x59cdea(0x92)]||_0x59cdea(0x76))+_0x59cdea(0x7a)+(_0x3a067[_0x59cdea(0x7f)]??_0x59cdea(0xad))+'\x22.');}function readLocalSkillContent(_0x2e66be){const _0x4a9c9e=a117_0x2db5,_0xa4cc5c=resolve(_0x2e66be,SKILL_FILE);return existsSync(_0xa4cc5c)&&lstatSync(_0xa4cc5c)[_0x4a9c9e(0x79)]()?readFileSync(_0xa4cc5c,_0x4a9c9e(0xa5)):'';}function a117_0xacfe(){const _0x3224c4=['appCode','refreshedAt','isArray','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','name','targetScope',',\x20or\x20directory\x20name.','match','packageBase64','filter','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','manifest','sourceSessionId','replace','skillCode','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','slice','ignoreMetadataAppCodeMismatch','some','skillName','string','number','9790520nNnpiS','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','ignoreMetadataSkillCode','\x20name\x20for\x20SkillHub\x20slug\x20generation.','boolean','334744Bqpwwf','startsWith','allowAppCodeRetarget','\x20has\x20scope=\x22','Skill\x20directory\x20not\x20found:\x20','2821931VBotpl','utf8','displayName','ignoreInvalidMetadata','files','toLowerCase','content','Missing\x20','isSymbolicLink','unknown','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataScope','length','builtin','tags','isDirectory','Skill\x20metadata\x20appCode\x20\x22','validation','personal','1699905Otggvt','object','description','(unknown)','Invalid\x20','18udFjwi','isFile','\x20has\x20unsupported\x20scope\x20\x22','320040zFHczo','933390NreQqf','3300836vJgMpY','72HirmWQ','scope','2DUdORP','trim','company','Unable\x20to\x20resolve\x20skillCode\x20from\x20'];a117_0xacfe=function(){return _0x3224c4;};return a117_0xacfe();}function readPushMetadataIfPresent(_0xb331d5,_0x2f8486={}){const _0x95bcc6=a117_0x2db5;try{return readMetadataIfPresent(_0xb331d5);}catch(_0x32b008){if(_0x2f8486[_0x95bcc6(0xa7)])return undefined;throw _0x32b008;}}
|
|
1
|
+
(function(_0x7fca68,_0x23da61){const _0x731dfd=a117_0xb41a,_0xf013e0=_0x7fca68();while(!![]){try{const _0x13c666=parseInt(_0x731dfd(0x178))/0x1*(-parseInt(_0x731dfd(0x18a))/0x2)+-parseInt(_0x731dfd(0x18b))/0x3*(-parseInt(_0x731dfd(0x158))/0x4)+-parseInt(_0x731dfd(0x183))/0x5*(parseInt(_0x731dfd(0x160))/0x6)+-parseInt(_0x731dfd(0x149))/0x7+parseInt(_0x731dfd(0x182))/0x8*(parseInt(_0x731dfd(0x157))/0x9)+-parseInt(_0x731dfd(0x15c))/0xa*(parseInt(_0x731dfd(0x176))/0xb)+parseInt(_0x731dfd(0x14c))/0xc;if(_0x13c666===_0x23da61)break;else _0xf013e0['push'](_0xf013e0['shift']());}catch(_0x74d6e5){_0xf013e0['push'](_0xf013e0['shift']());}}}(a117_0x3146,0x673e5));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a117_0x39d0b4}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(_0x3bbdef,_0x4e5499,_0x5daca9={}){const _0x69c10=a117_0xb41a,_0x196f87=resolvePushDirectoryRoot(_0x3bbdef),_0x360cef=readPushMetadataIfPresent(resolve(_0x196f87,METADATA_FILE),{'ignoreInvalidMetadata':_0x5daca9[_0x69c10(0x16a)]});if(_0x360cef?.['appCode']&&_0x360cef[_0x69c10(0x173)]!==_0x4e5499&&!_0x5daca9[_0x69c10(0x17e)]&&!_0x5daca9[_0x69c10(0x161)])throw CliErrors[_0x69c10(0x185)](_0x69c10(0x189)+_0x360cef[_0x69c10(0x173)]+_0x69c10(0x16c)+_0x4e5499+'\x22.');const _0x805176=resolvePushSkillCode(_0x196f87,_0x4e5499,_0x360cef,_0x5daca9);if(!_0x805176)throw CliErrors[_0x69c10(0x185)](_0x69c10(0x172)+SKILL_FILE+',\x20'+METADATA_FILE+_0x69c10(0x16f));return{'dir':_0x196f87,'skillCode':_0x805176,'metadata':_0x360cef};}export function readPushDirectory(_0x479138,_0x25f71e,_0x410abe={}){const _0x3660b5=a117_0xb41a,_0x4118b5=resolvePushDirectoryIdentity(_0x479138,_0x25f71e,_0x410abe),_0x5969b6=_0x4118b5[_0x3660b5(0x16b)],_0x418e3b=resolve(_0x5969b6,SKILL_FILE);if(!existsSync(_0x418e3b)||!lstatSync(_0x418e3b)[_0x3660b5(0x14f)]())throw CliErrors[_0x3660b5(0x185)](_0x3660b5(0x17d)+SKILL_FILE+':\x20'+_0x418e3b);const _0xc069de=_0x4118b5[_0x3660b5(0x17a)],_0x1c9cfa=_0x410abe[_0x3660b5(0x166)]??_0x3660b5(0x175);if(!_0x410abe[_0x3660b5(0x156)]&&_0xc069de?.[_0x3660b5(0x170)]==='builtin')throw CliErrors[_0x3660b5(0x185)](_0x3660b5(0x165)+METADATA_FILE+_0x3660b5(0x16d)+_0xc069de[_0x3660b5(0x170)]+'\x22.');if(!_0x410abe['ignoreMetadataScope']&&_0x1c9cfa===_0x3660b5(0x175)&&_0xc069de?.['scope']&&_0xc069de[_0x3660b5(0x170)]!==_0x3660b5(0x175))throw CliErrors[_0x3660b5(0x185)](_0x3660b5(0x16e)+METADATA_FILE+_0x3660b5(0x16d)+_0xc069de['scope']+'\x22.',_0x3660b5(0x17b)+_0x5969b6+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x3b9710=scanSkillDirectory(_0x5969b6),_0x1ec6b2=buildSkillPackage(_0x3b9710),_0x2026d7=readFileSync(_0x418e3b,_0x3660b5(0x15e)),_0x40fca2=_0x4118b5[_0x3660b5(0x14b)],_0x53d2fe=_0x410abe[_0x3660b5(0x14d)]?undefined:_0xc069de,_0x3deb30=readSkillDisplayName(_0x2026d7);return{'skillCode':_0x40fca2,'metadata':_0xc069de,'frontmatterDisplayName':_0x3deb30,'input':{'skillCode':_0x40fca2,'skillName':_0x3deb30??_0x53d2fe?.['skillName'],'description':_0x53d2fe?.['description'],'content':_0x2026d7,'files':_0x1ec6b2['manifest'],'packageBase64':_0x1ec6b2['packageBase64'],'tags':_0x53d2fe?.[_0x3660b5(0x154)],'version':_0x53d2fe?.[_0x3660b5(0x179)],'sourceSessionId':_0x53d2fe?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x5bd974,_0xd15159,_0x2b99f2,_0x1bde3b={}){const _0x47b7ad=a117_0xb41a,_0x55c504=resolvePushDirectoryRoot(_0x5bd974),_0x567913=readPushMetadataIfPresent(resolve(_0x55c504,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x42bce3=requireRemoteScope(_0xd15159),_0x391695=readLocalSkillContent(_0x55c504),_0x40eb5f={..._0xd15159,'appCode':_0xd15159[_0x47b7ad(0x173)]??_0x2b99f2,'skillName':_0xd15159[_0x47b7ad(0x174)]??_0x567913?.[_0x47b7ad(0x174)],'description':_0xd15159[_0x47b7ad(0x187)]??_0x567913?.['description'],'tags':Array[_0x47b7ad(0x186)](_0xd15159[_0x47b7ad(0x154)])?_0xd15159[_0x47b7ad(0x154)]:_0x567913?.[_0x47b7ad(0x154)],'sourceSessionId':_0xd15159['sourceSessionId']??_0x567913?.['sourceSessionId'],'content':_0xd15159[_0x47b7ad(0x169)]??_0x391695},_0x56fd22=buildMetadata(_0x40eb5f,_0x42bce3,_0x2b99f2,contentHash(_0x391695),_0x1bde3b['refreshedAt']);writeJsonAtomic(resolve(_0x55c504,METADATA_FILE),_0x56fd22);}export function recordPushedRuntimeSkill(_0xe501b3,_0x4bccb4,_0x2dbfd6,_0x308f37={}){const _0x39a50f=a117_0xb41a,_0x31c433=resolvePushDirectoryRoot(_0xe501b3),_0x322b74=scanSkillDirectory(_0x31c433),_0x3f5f02=_0x322b74[_0x39a50f(0x14e)](_0x22241a=>_0x22241a[_0x39a50f(0x164)]===SKILL_FILE),_0x43bf2f=_0x3f5f02?fileText(_0x3f5f02):'',_0x416dac=tryNormalizePackageManifest(_0x4bccb4[_0x39a50f(0x181)]),_0x1120bc={..._0x4bccb4,'content':_0x4bccb4[_0x39a50f(0x169)]??_0x43bf2f,'files':_0x416dac},_0x93e133=_0x416dac?normalizeLocalFiles(_0x322b74)[_0x39a50f(0x14a)](_0x192d53=>_0x416dac['files'][_0x39a50f(0x163)](_0x159323=>_0x159323[_0x39a50f(0x164)]===_0x192d53[_0x39a50f(0x164)])):undefined,_0x34fd75=buildMetadata(_0x1120bc,_0x308f37[_0x39a50f(0x170)]??_0x39a50f(0x175),_0x2dbfd6,contentHash(_0x1120bc['content']??''),_0x308f37['pushedAt'],_0x93e133);writeJsonAtomic(resolve(_0x31c433,METADATA_FILE),_0x34fd75);}function a117_0xb41a(_0x2f4d72,_0x4ef2e5){_0x2f4d72=_0x2f4d72-0x149;const _0x31460c=a117_0x3146();let _0xb41aca=_0x31460c[_0x2f4d72];return _0xb41aca;}export function deriveSkillCodeFromDirectory(_0x323f7d,_0x141be5){const _0x15f48c=a117_0xb41a,_0x17f247=basename(resolve(_0x323f7d)),_0x11acdd=_0x141be5+'--';return _0x17f247[_0x15f48c(0x188)](_0x11acdd)?_0x17f247[_0x15f48c(0x184)](_0x11acdd[_0x15f48c(0x180)]):_0x17f247;}function resolvePushSkillCode(_0x13b215,_0x3bcee5,_0x4be9a4,_0x720046){const _0x2db7ff=a117_0xb41a,_0x262b22=deriveSkillCodeFromSkillFile(_0x13b215)||deriveSkillCodeFromDirectory(_0x13b215,_0x3bcee5);if(_0x720046['ignoreMetadataSkillCode'])return _0x262b22;return _0x4be9a4?.[_0x2db7ff(0x14b)]?.['trim']()||_0x262b22;}function deriveSkillCodeFromSkillFile(_0x347e55){const _0x3f5ec3=a117_0xb41a,_0x165c18=resolve(_0x347e55,SKILL_FILE);if(!existsSync(_0x165c18)||!lstatSync(_0x165c18)[_0x3f5ec3(0x14f)]())return undefined;const _0x5deda2=readFileSync(_0x165c18,_0x3f5ec3(0x15e)),_0x25f997=_0x5deda2[_0x3f5ec3(0x15d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x25f997)return undefined;const _0x5d9989=parseFrontmatterObject(_0x25f997[0x1]??''),_0x544740=scalarToString(_0x5d9989?.[_0x3f5ec3(0x168)]);return _0x544740?slugifySkillName(_0x544740):undefined;}function a117_0x3146(){const _0x5800ff=['startsWith','Skill\x20metadata\x20appCode\x20\x22','800TdVQBw','1851288TgLbmf','4597131VEOMkm','filter','skillCode','11884668xdyUSy','ignoreMetadataForPayload','find','isFile','Skill\x20directory\x20not\x20found:\x20','isDirectory','builtin','unknown','tags','displayName','ignoreMetadataScope','13329hMZsMi','4RyHkts','(unknown)','number','company','2808350dkHxPa','match','utf8','replace','18EKjojx','ignoreMetadataAppCodeMismatch','object','some','path','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','targetScope','toLowerCase','name','content','ignoreInvalidMetadata','dir','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','\x20has\x20scope=\x22','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20',',\x20or\x20directory\x20name.','scope','trim','Unable\x20to\x20resolve\x20skillCode\x20from\x20','appCode','skillName','personal','11UzqhZk','string','1024tIfgGq','version','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','isSymbolicLink','Missing\x20','allowAppCodeRetarget','\x20has\x20unsupported\x20scope\x20\x22','length','files','1120qJNKUj','74620ukUrNb','slice','validation','isArray','description'];a117_0x3146=function(){return _0x5800ff;};return a117_0x3146();}function readSkillDisplayName(_0x777f55){const _0x427667=a117_0xb41a,_0xb5906d=_0x777f55[_0x427667(0x15d)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xb5906d)return undefined;const _0x2d7a9a=parseFrontmatterObject(_0xb5906d[0x1]??'');return scalarToString(_0x2d7a9a?.[_0x427667(0x155)]);}function slugifySkillName(_0x331630){const _0x55c40a=a117_0xb41a,_0x4924d6=_0x331630[_0x55c40a(0x171)]()[_0x55c40a(0x167)]()[_0x55c40a(0x15f)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x55c40a(0x15f)](/-+$/,'')[_0x55c40a(0x15f)](/-{2,}/g,'-');if(!_0x4924d6)throw CliErrors[_0x55c40a(0x185)]('Invalid\x20'+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x4924d6;}function parseFrontmatterObject(_0xd249bc){const _0x2e779e=a117_0xb41a;try{const _0x3f4a2c=a117_0x39d0b4(_0xd249bc);return _0x3f4a2c&&typeof _0x3f4a2c===_0x2e779e(0x162)&&!Array[_0x2e779e(0x186)](_0x3f4a2c)?_0x3f4a2c:undefined;}catch{return undefined;}}function scalarToString(_0x16c8a2){const _0x3e2120=a117_0xb41a;if(typeof _0x16c8a2===_0x3e2120(0x177))return _0x16c8a2[_0x3e2120(0x171)]();if(typeof _0x16c8a2===_0x3e2120(0x15a)||typeof _0x16c8a2==='boolean')return String(_0x16c8a2);return undefined;}function resolvePushDirectoryRoot(_0x495d29){const _0x59f2a5=a117_0xb41a,_0x4d4ef0=resolve(_0x495d29);if(!existsSync(_0x4d4ef0))throw CliErrors['validation'](_0x59f2a5(0x150)+_0x495d29);const _0x192407=lstatSync(_0x4d4ef0);if(_0x192407['isDirectory']())return _0x4d4ef0;if(_0x192407[_0x59f2a5(0x17c)]()){const _0x50e8f3=realpathSync(_0x4d4ef0);if(lstatSync(_0x50e8f3)[_0x59f2a5(0x151)]())return _0x50e8f3;}throw CliErrors[_0x59f2a5(0x185)](_0x59f2a5(0x150)+_0x495d29);}function requireRemoteScope(_0x4a5c79){const _0x32a6f5=a117_0xb41a;if(_0x4a5c79[_0x32a6f5(0x170)]===_0x32a6f5(0x175)||_0x4a5c79[_0x32a6f5(0x170)]===_0x32a6f5(0x15b)||_0x4a5c79[_0x32a6f5(0x170)]===_0x32a6f5(0x152))return _0x4a5c79['scope'];throw CliErrors[_0x32a6f5(0x185)]('Remote\x20Skill\x20'+(_0x4a5c79[_0x32a6f5(0x14b)]||_0x32a6f5(0x159))+_0x32a6f5(0x17f)+(_0x4a5c79[_0x32a6f5(0x170)]??_0x32a6f5(0x153))+'\x22.');}function readLocalSkillContent(_0x47d39a){const _0x1b98c0=a117_0xb41a,_0x22d462=resolve(_0x47d39a,SKILL_FILE);return existsSync(_0x22d462)&&lstatSync(_0x22d462)[_0x1b98c0(0x14f)]()?readFileSync(_0x22d462,_0x1b98c0(0x15e)):'';}function readPushMetadataIfPresent(_0x29f793,_0x546809={}){const _0x2045aa=a117_0xb41a;try{return readMetadataIfPresent(_0x29f793);}catch(_0x242785){if(_0x546809[_0x2045aa(0x16a)])return undefined;throw _0x242785;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a118_0x5b8f(_0x4505eb,_0x1c9555){_0x4505eb=_0x4505eb-0x177;const _0x3678db=a118_0x3678();let _0x5b8f5b=_0x3678db[_0x4505eb];return _0x5b8f5b;}(function(_0x5db2e1,_0x770971){const _0x1ddf40=a118_0x5b8f,_0x283156=_0x5db2e1();while(!![]){try{const _0x1971af=parseInt(_0x1ddf40(0x180))/0x1+parseInt(_0x1ddf40(0x177))/0x2*(parseInt(_0x1ddf40(0x17f))/0x3)+-parseInt(_0x1ddf40(0x17b))/0x4+parseInt(_0x1ddf40(0x17d))/0x5+parseInt(_0x1ddf40(0x17a))/0x6+parseInt(_0x1ddf40(0x17e))/0x7+-parseInt(_0x1ddf40(0x179))/0x8;if(_0x1971af===_0x770971)break;else _0x283156['push'](_0x283156['shift']());}catch(_0x247ffa){_0x283156['push'](_0x283156['shift']());}}}(a118_0x3678,0x2a81f));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x402fa0){const _0x16949c=a118_0x5b8f,_0xa6658c=_0x402fa0&&_0x402fa0[_0x16949c(0x178)]>0x0?_0x402fa0:[_0x16949c(0x184),_0x16949c(0x185),_0x16949c(0x182)],_0x3df26e=[];for(const _0x4f8760 of _0xa6658c){if(!isRuntimeSkillScope(_0x4f8760))throw CliErrors[_0x16949c(0x181)](_0x16949c(0x17c)+_0x4f8760);!_0x3df26e[_0x16949c(0x183)](_0x4f8760)&&_0x3df26e['push'](_0x4f8760);}return _0x3df26e;}function a118_0x3678(){const _0x308f40=['personal','company','318aCVMKy','length','7260824mZqJKe','946242exfxMh','132184hChEJE','Unsupported\x20runtime\x20Skill\x20scope:\x20','1654375KcvMkZ','2265942jhypMd','5205PDoTMU','26607ByAgMw','validation','builtin','includes'];a118_0x3678=function(){return _0x308f40;};return a118_0x3678();}export function isRuntimeSkillScope(_0x553981){const _0x3782e6=a118_0x5b8f;return _0x553981===_0x3782e6(0x184)||_0x553981==='company'||_0x553981===_0x3782e6(0x182);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a120_0xa69452=a120_0x167b;function a120_0x167b(_0x560393,_0x22d717){_0x560393=_0x560393-0x194;const _0x4e0b7d=a120_0x4e0b();let _0x167b23=_0x4e0b7d[_0x560393];return _0x167b23;}(function(_0x2dcf1d,_0x409175){const _0x390b46=a120_0x167b,_0x1c83bb=_0x2dcf1d();while(!![]){try{const _0x58a190=-parseInt(_0x390b46(0x1ab))/0x1*(parseInt(_0x390b46(0x19f))/0x2)+parseInt(_0x390b46(0x1a4))/0x3*(-parseInt(_0x390b46(0x195))/0x4)+-parseInt(_0x390b46(0x1aa))/0x5*(-parseInt(_0x390b46(0x1a3))/0x6)+parseInt(_0x390b46(0x1a9))/0x7+-parseInt(_0x390b46(0x19a))/0x8+parseInt(_0x390b46(0x1a2))/0x9*(-parseInt(_0x390b46(0x1ac))/0xa)+parseInt(_0x390b46(0x1a1))/0xb*(parseInt(_0x390b46(0x196))/0xc);if(_0x58a190===_0x409175)break;else _0x1c83bb['push'](_0x1c83bb['shift']());}catch(_0x21e11f){_0x1c83bb['push'](_0x1c83bb['shift']());}}}(a120_0x4e0b,0x8eaa1));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a120_0xa69452(0x198));export function createDeterministicZipPackage(_0x2a11a3){const _0x3a1cea=a120_0xa69452,_0x5858d7={};for(const _0x1dc403 of normalizeLocalFiles(_0x2a11a3)){_0x5858d7[_0x1dc403[_0x3a1cea(0x1a6)]]=fileContent(_0x1dc403);}return Buffer[_0x3a1cea(0x194)](zipSync(_0x5858d7,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x1b46ed){const _0x1f531d=a120_0xa69452;if(_0x1b46ed[_0x1f531d(0x1a0)]<0x16)throw CliErrors[_0x1f531d(0x199)](_0x1f531d(0x197));let _0x15f31c;try{_0x15f31c=unzipSync(_0x1b46ed,{'filter'(_0x3b893a){const _0x322870=_0x1f531d,_0x1452e2=normalizeSkillRelativePath(_0x3b893a[_0x322870(0x19c)]);if(_0x1452e2['endsWith']('/'))throw CliErrors['validation'](_0x322870(0x19d)+_0x1452e2);return!![];}});}catch(_0xa04849){if(isRuntimeSkillValidationError(_0xa04849))throw _0xa04849;throw CliErrors[_0x1f531d(0x199)](_0x1f531d(0x197));}return Object[_0x1f531d(0x1a5)](_0x15f31c)['map'](([_0x489030,_0x3f74db])=>({'path':normalizeSkillRelativePath(_0x489030),'bytes':Buffer[_0x1f531d(0x194)](_0x3f74db)}))[_0x1f531d(0x1a8)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x363d73){const _0x5b8084=a120_0xa69452;return typeof _0x363d73===_0x5b8084(0x1a7)&&_0x363d73!==null&&_0x5b8084(0x19e)in _0x363d73&&_0x363d73[_0x5b8084(0x19e)]===_0x5b8084(0x19b);}function a120_0x4e0b(){const _0x596e14=['Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','code','2xjpDBR','length','22PmWzEs','9ITtcRz','312SozEWV','2174199rHoPMl','entries','path','object','sort','1501402qHGFQY','16855MggeXd','700735QODoWV','8584920Vhvixu','from','4yldZkI','18681876qYTBea','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1980-01-01T00:00:00.000Z','validation','5080888ThUQPx','validation_error','name'];a120_0x4e0b=function(){return _0x596e14;};return a120_0x4e0b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3073e8,_0x52fae5){const _0x3598d4=a121_0x1813,_0x2e92b9=_0x3073e8();while(!![]){try{const _0x25c5c6=parseInt(_0x3598d4(0x190))/0x1+parseInt(_0x3598d4(0x199))/0x2+-parseInt(_0x3598d4(0x183))/0x3*(parseInt(_0x3598d4(0x181))/0x4)+-parseInt(_0x3598d4(0x193))/0x5+parseInt(_0x3598d4(0x1a5))/0x6+parseInt(_0x3598d4(0x1a0))/0x7*(parseInt(_0x3598d4(0x194))/0x8)+-parseInt(_0x3598d4(0x1a3))/0x9;if(_0x25c5c6===_0x52fae5)break;else _0x2e92b9['push'](_0x2e92b9['shift']());}catch(_0x81fbef){_0x2e92b9['push'](_0x2e92b9['shift']());}}}(a121_0x5152,0x9478a));import{CliErrors}from'../../errors.js';function a121_0x1813(_0x4828cd,_0x42b02d){_0x4828cd=_0x4828cd-0x17a;const _0x5152ca=a121_0x5152();let _0x181374=_0x5152ca[_0x4828cd];return _0x181374;}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(_0x1a3183){const _0x4bcede=a121_0x1813,_0x318f2f=normalizeLocalFiles(_0x1a3183);if(!_0x318f2f['some'](_0x585aa3=>_0x585aa3[_0x4bcede(0x198)]===SKILL_FILE))throw CliErrors[_0x4bcede(0x17c)]('Missing\x20'+SKILL_FILE+_0x4bcede(0x185));const _0x5c9644=localFilesToManifestFiles(_0x318f2f),_0x2ede44=createDeterministicZipPackage(_0x318f2f);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x5c9644),'zipSha256':bufferSha256(_0x2ede44),'zipSize':_0x2ede44['length'],'files':_0x5c9644},'packageBytes':_0x2ede44,'packageBase64':_0x2ede44[_0x4bcede(0x180)]('base64')};}export function verifyRuntimeSkillPackage(_0x5cd635,_0x347805){const _0x19200d=a121_0x1813,_0x1b0df1=normalizePackageManifest(_0x5cd635,{'requireOssPath':![]});if(!_0x1b0df1)throw CliErrors[_0x19200d(0x17c)](_0x19200d(0x17b));return extractAndVerifyPackage(_0x1b0df1,_0x347805);}export function verifyRuntimeSkillBundle(_0x3e86c6,_0x4758ef){const _0x2f3245=a121_0x1813,_0x4f0249=normalizePackageManifest(_0x3e86c6,{'requireOssPath':![]});if(!_0x4f0249)throw CliErrors['validation'](_0x2f3245(0x17b));return extractAndVerifyPackageFiles(_0x4f0249,_0x4758ef);}export function tryNormalizePackageManifest(_0x28e766){return normalizePackageManifest(_0x28e766,{'requireOssPath':![]});}export function requirePackageBytes(_0x4688c4,_0x8fc30b){const _0x5af4a8=a121_0x1813;if(!_0x8fc30b||_0x8fc30b[_0x5af4a8(0x186)]===0x0)throw CliErrors[_0x5af4a8(0x17c)](_0x5af4a8(0x19d)+_0x4688c4);return _0x8fc30b;}export function extractDownloadedPackage(_0x3dc379){const _0x46d139=a121_0x1813,_0x2a3687=parseZipPackage(_0x3dc379)[_0x46d139(0x187)](_0x1692f6=>({'path':_0x1692f6[_0x46d139(0x198)],'bytes':_0x1692f6['bytes']}));if(!_0x2a3687['some'](_0x37a05d=>_0x37a05d['path']===SKILL_FILE))throw CliErrors[_0x46d139(0x17c)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x2a3687);}export function localFilesToManifestFiles(_0x220ecf){const _0x542d0c=a121_0x1813;return normalizeLocalFiles(_0x220ecf)[_0x542d0c(0x187)](_0x55d165=>({'path':_0x55d165[_0x542d0c(0x198)],'sha256':fileHash(_0x55d165),'size':fileContent(_0x55d165)[_0x542d0c(0x186)]}));}function normalizePackageManifest(_0x27c17b,_0x54459e){const _0x134c9f=a121_0x1813;if(!_0x27c17b||typeof _0x27c17b!=='object'||Array[_0x134c9f(0x17e)](_0x27c17b))return undefined;const _0x1c25ef=_0x27c17b,_0x55f421=typeof _0x1c25ef[_0x134c9f(0x18a)]===_0x134c9f(0x19f)?_0x1c25ef[_0x134c9f(0x18a)][_0x134c9f(0x18d)]():undefined;if(_0x54459e['requireOssPath']&&!_0x55f421)return undefined;if(!Array[_0x134c9f(0x17e)](_0x1c25ef[_0x134c9f(0x19a)])||_0x1c25ef['files'][_0x134c9f(0x186)]===0x0)return undefined;if(!isSha256Hex(_0x1c25ef[_0x134c9f(0x1a1)]))throw CliErrors[_0x134c9f(0x17c)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x1c25ef[_0x134c9f(0x192)]))throw CliErrors[_0x134c9f(0x17c)](_0x134c9f(0x184));if(!Number['isSafeInteger'](_0x1c25ef['zipSize'])||_0x1c25ef[_0x134c9f(0x189)]<0x0)throw CliErrors[_0x134c9f(0x17c)](_0x134c9f(0x191));const _0x286f12=normalizeManifestFiles(_0x1c25ef[_0x134c9f(0x19a)]);if(!_0x286f12[_0x134c9f(0x196)](_0x1631dc=>_0x1631dc[_0x134c9f(0x198)]===SKILL_FILE))throw CliErrors[_0x134c9f(0x17c)](_0x134c9f(0x1a2)+SKILL_FILE+'.');const _0x199b11=fileTreeHash(_0x286f12);if(_0x199b11!==_0x1c25ef['treeSha256'][_0x134c9f(0x195)]())throw CliErrors[_0x134c9f(0x17c)](_0x134c9f(0x18b));return{'schemaVersion':Number[_0x134c9f(0x17f)](_0x1c25ef[_0x134c9f(0x197)])?_0x1c25ef[_0x134c9f(0x197)]:0x2,'ossPath':_0x55f421,'treeSha256':_0x199b11,'zipSha256':_0x1c25ef[_0x134c9f(0x192)][_0x134c9f(0x195)](),'zipSize':_0x1c25ef['zipSize'],'files':_0x286f12};}function extractAndVerifyPackage(_0xd48608,_0x92787e){const _0xe9055a=a121_0x1813,_0x265cd0=normalizePackageManifest(_0xd48608,{'requireOssPath':![]});if(!_0x265cd0)throw CliErrors[_0xe9055a(0x17c)](_0xe9055a(0x17b));if(_0x92787e[_0xe9055a(0x186)]!==_0x265cd0[_0xe9055a(0x189)])throw CliErrors[_0xe9055a(0x17c)](_0xe9055a(0x17d));const _0x2e25d3=bufferSha256(_0x92787e);if(_0x2e25d3!==_0x265cd0['zipSha256'])throw CliErrors[_0xe9055a(0x17c)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x265cd0,_0x92787e);}function extractAndVerifyPackageFiles(_0x4cd9d6,_0x4a6a4b){const _0x4194d1=a121_0x1813,_0x57a876=parseZipPackage(_0x4a6a4b);if(_0x57a876[_0x4194d1(0x186)]!==_0x4cd9d6[_0x4194d1(0x19a)]['length'])throw CliErrors[_0x4194d1(0x17c)](_0x4194d1(0x1a4));const _0x5ad275=new Map();for(const _0x251c12 of _0x57a876){if(_0x5ad275[_0x4194d1(0x18c)](_0x251c12[_0x4194d1(0x198)]))throw CliErrors[_0x4194d1(0x17c)](_0x4194d1(0x188)+_0x251c12[_0x4194d1(0x198)]);_0x5ad275[_0x4194d1(0x182)](_0x251c12[_0x4194d1(0x198)],_0x251c12);}const _0x100865=[];for(const _0x4f0aeb of _0x4cd9d6['files']){const _0x43831=_0x5ad275[_0x4194d1(0x19c)](_0x4f0aeb[_0x4194d1(0x198)]);if(!_0x43831)throw CliErrors[_0x4194d1(0x17c)](_0x4194d1(0x19e)+_0x4f0aeb[_0x4194d1(0x198)]);if(_0x43831[_0x4194d1(0x19b)][_0x4194d1(0x186)]!==_0x4f0aeb[_0x4194d1(0x18f)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x4f0aeb[_0x4194d1(0x198)]);const _0x50152b=bufferSha256(_0x43831[_0x4194d1(0x19b)]);if(_0x50152b!==_0x4f0aeb['sha256'])throw CliErrors[_0x4194d1(0x17c)](_0x4194d1(0x18e)+_0x4f0aeb[_0x4194d1(0x198)]);_0x100865[_0x4194d1(0x17a)]({'path':_0x4f0aeb[_0x4194d1(0x198)],'bytes':_0x43831[_0x4194d1(0x19b)]});}return normalizeLocalFiles(_0x100865);}function a121_0x5152(){const _0x36abbd=['path','85536FlcMff','files','bytes','get','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','string','49RouxIr','treeSha256','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','4172499nyrDdf','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','4162386TAIKLm','push','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','validation','Runtime\x20Skill\x20package\x20size\x20mismatch.','isArray','isSafeInteger','toString','16miNEQq','set','485913bwtxRf','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','\x20in\x20Skill\x20file\x20package.','length','map','Duplicate\x20Skill\x20package\x20entry:\x20','zipSize','ossPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','has','trim','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','size','839737OPjIXl','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','zipSha256','1994990ouqhbW','619880StiJOY','toLowerCase','some','schemaVersion'];a121_0x5152=function(){return _0x36abbd;};return a121_0x5152();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a122_0x3f30(){var _0x506d83=['80289RxaqLf','1670tFVNEx','9344464uBLQVr','6167FxsLJp','3346500BbBtJM','4386EVPhNW','3908937uAtUaw','5334800zATkvi','166bQQhXu','16297bAhImE'];a122_0x3f30=function(){return _0x506d83;};return a122_0x3f30();}(function(_0x502f6c,_0x9b461f){var _0x19068c=a122_0x1bb1,_0x578fc9=_0x502f6c();while(!![]){try{var _0x5923ab=-parseInt(_0x19068c(0x129))/0x1*(parseInt(_0x19068c(0x128))/0x2)+parseInt(_0x19068c(0x126))/0x3+parseInt(_0x19068c(0x124))/0x4+-parseInt(_0x19068c(0x127))/0x5+-parseInt(_0x19068c(0x125))/0x6*(-parseInt(_0x19068c(0x123))/0x7)+-parseInt(_0x19068c(0x122))/0x8+-parseInt(_0x19068c(0x120))/0x9*(-parseInt(_0x19068c(0x121))/0xa);if(_0x5923ab===_0x9b461f)break;else _0x578fc9['push'](_0x578fc9['shift']());}catch(_0x1b1848){_0x578fc9['push'](_0x578fc9['shift']());}}}(a122_0x3f30,0xa76b9));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a122_0x1bb1(_0xaa05e9,_0x9c14c){_0xaa05e9=_0xaa05e9-0x120;var _0x3f30e7=a122_0x3f30();var _0x1bb18a=_0x3f30e7[_0xaa05e9];return _0x1bb18a;}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Global Skill install-state resolution, decoupled from the external `skills` CLI.
|
|
3
|
+
*
|
|
4
|
+
* Only reasonably trustworthy signals are used, and "confirmed missing" is kept
|
|
5
|
+
* distinct from "cannot tell":
|
|
6
|
+
* - artifact probe: `<globalSkillsDir>/<name>/SKILL.md`, what consumers actually resolve
|
|
7
|
+
* - install bookkeeping: the `skills` CLI's own `~/.agents/.skill-lock.json`
|
|
8
|
+
*
|
|
9
|
+
* Directory layout is owned by the external tool, so a stale layout assumption must
|
|
10
|
+
* resolve to `unverifiable` (pass through with a reason) rather than `absent` (fail).
|
|
11
|
+
* Only when both the artifact probe and the bookkeeping agree is the skill `absent`.
|
|
12
|
+
*/
|
|
13
|
+
/** Install bookkeeping file written by the `skills` CLI, relative to HOME. */
|
|
14
|
+
export declare const SKILL_LOCK_RELATIVE_PATH: string;
|
|
15
|
+
/** Known global Skill directories, relative to HOME, in probe order. */
|
|
16
|
+
export declare const GLOBAL_SKILLS_DIR_RELATIVE_PATHS: string[];
|
|
17
|
+
/**
|
|
18
|
+
* Install state of a global Skill.
|
|
19
|
+
*
|
|
20
|
+
* `unverifiable` is deliberate: local assumptions were not sufficient to decide, so
|
|
21
|
+
* callers should pass through instead of failing.
|
|
22
|
+
*/
|
|
23
|
+
export type SkillPresence = {
|
|
24
|
+
state: "present";
|
|
25
|
+
path: string;
|
|
26
|
+
} | {
|
|
27
|
+
state: "absent";
|
|
28
|
+
checked: string[];
|
|
29
|
+
} | {
|
|
30
|
+
state: "unverifiable";
|
|
31
|
+
reason: string;
|
|
32
|
+
};
|
|
33
|
+
export interface ResolveSkillPresenceOptions {
|
|
34
|
+
/** Override candidate global Skill directories (isolated environments or tests). */
|
|
35
|
+
globalSkillsDirs?: string[];
|
|
36
|
+
/** Override the `skills` CLI bookkeeping file path. */
|
|
37
|
+
lockFile?: string;
|
|
38
|
+
/** Override HOME. Tests only. */
|
|
39
|
+
home?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Resolves whether a global Skill is currently discoverable by consumers.
|
|
43
|
+
*
|
|
44
|
+
* @param skillName - Global Skill name (its directory name), e.g. `lovrabet`.
|
|
45
|
+
* @param options - Probe overrides for isolated environments or tests.
|
|
46
|
+
* @returns `present`, `absent`, or `unverifiable`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function resolveInstalledSkill(skillName: string, options?: ResolveSkillPresenceOptions): SkillPresence;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a123_0x3fed(){const _0x159db5=['.skill-lock.json','present','2030196NnpzlD','403230gdhZFo','\x20uses\x20unsupported\x20version\x20','globalSkillsDirs','join','11812KHzgqe','parse','3129335xHuGgf','unverifiable','SKILL.md','find','kind','554Ejiqnr','skills','includes','reason','1236IwxluW','.agents','unusable','\x20records\x20\x22','496HLSQaA','117082CnvSKH','.claude','message','home','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','recorded','25277391OdHyIB','object','absent','\x20is\x20unreadable:\x20','version','map'];a123_0x3fed=function(){return _0x159db5;};return a123_0x3fed();}const a123_0xf18cdb=a123_0x1e2a;(function(_0xdb6045,_0x45742c){const _0x29c9d5=a123_0x1e2a,_0x13cb4d=_0xdb6045();while(!![]){try{const _0xd73868=parseInt(_0x29c9d5(0x103))/0x1+parseInt(_0x29c9d5(0x10a))/0x2*(-parseInt(_0x29c9d5(0x10e))/0x3)+-parseInt(_0x29c9d5(0xfe))/0x4+-parseInt(_0x29c9d5(0x105))/0x5+parseInt(_0x29c9d5(0xff))/0x6+-parseInt(_0x29c9d5(0x113))/0x7*(parseInt(_0x29c9d5(0x112))/0x8)+parseInt(_0x29c9d5(0xf6))/0x9;if(_0xd73868===_0x45742c)break;else _0x13cb4d['push'](_0x13cb4d['shift']());}catch(_0x206ca8){_0x13cb4d['push'](_0x13cb4d['shift']());}}}(a123_0x3fed,0x933b8));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a123_0x1e2a(_0x248b5f,_0x574278){_0x248b5f=_0x248b5f-0xf6;const _0x3fed27=a123_0x3fed();let _0x1e2a77=_0x3fed27[_0x248b5f];return _0x1e2a77;}export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a123_0xf18cdb(0xfc));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a123_0xf18cdb(0x10f),a123_0xf18cdb(0x10b)),join(a123_0xf18cdb(0x114),a123_0xf18cdb(0x10b))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x8541c6,_0x1cfd00){const _0x257bbc=a123_0xf18cdb;if(!existsSync(_0x8541c6))return{'kind':'not-recorded'};let _0x2970c2;try{_0x2970c2=JSON[_0x257bbc(0x104)](readFileSync(_0x8541c6,'utf8'));}catch(_0x1a447a){return{'kind':_0x257bbc(0x110),'reason':_0x8541c6+_0x257bbc(0xf9)+_0x1a447a[_0x257bbc(0x115)]};}const _0x1d7cdc=_0x2970c2;if(typeof _0x1d7cdc?.[_0x257bbc(0xfa)]!=='number'||!SUPPORTED_LOCK_VERSIONS[_0x257bbc(0x10c)](_0x1d7cdc[_0x257bbc(0xfa)]))return{'kind':'unusable','reason':_0x8541c6+_0x257bbc(0x100)+String(_0x1d7cdc?.[_0x257bbc(0xfa)])};if(!_0x1d7cdc['skills']||typeof _0x1d7cdc[_0x257bbc(0x10b)]!==_0x257bbc(0xf7))return{'kind':_0x257bbc(0x110),'reason':_0x8541c6+'\x20has\x20no\x20skills\x20map'};return _0x1d7cdc[_0x257bbc(0x10b)][_0x1cfd00]?{'kind':_0x257bbc(0x118)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x34ef69,_0x1d2db8){const _0x5d5842=a123_0xf18cdb,_0x20fe20=_0x1d2db8?.[_0x5d5842(0x116)]??homedir(),_0x3e4952=_0x1d2db8?.[_0x5d5842(0x101)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x5d5842(0xfb)](_0xb6d82d=>join(_0x20fe20,_0xb6d82d)),_0x353f3c=_0x1d2db8?.['lockFile']??join(_0x20fe20,SKILL_LOCK_RELATIVE_PATH),_0x456789=_0x3e4952[_0x5d5842(0xfb)](_0x4454f6=>join(_0x4454f6,_0x34ef69,_0x5d5842(0x107))),_0x1d93f2=_0x456789[_0x5d5842(0x108)](_0x571d46=>existsSync(_0x571d46));if(_0x1d93f2)return{'state':_0x5d5842(0xfd),'path':_0x1d93f2};const _0x4e0ea3=readLockLookup(_0x353f3c,_0x34ef69);if(_0x4e0ea3[_0x5d5842(0x109)]===_0x5d5842(0x110))return{'state':_0x5d5842(0x106),'reason':_0x4e0ea3[_0x5d5842(0x10d)]};if(_0x4e0ea3['kind']==='recorded')return{'state':_0x5d5842(0x106),'reason':_0x353f3c+_0x5d5842(0x111)+_0x34ef69+_0x5d5842(0x117)+('('+_0x456789[_0x5d5842(0x102)](',\x20')+')')};return{'state':_0x5d5842(0xf8),'checked':_0x456789};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1c9cb3,_0x1b3315){const _0x256efe=a124_0xf910,_0x40ed33=_0x1c9cb3();while(!![]){try{const _0x4921b7=-parseInt(_0x256efe(0xf8))/0x1+parseInt(_0x256efe(0xed))/0x2*(-parseInt(_0x256efe(0xf3))/0x3)+parseInt(_0x256efe(0xf0))/0x4*(parseInt(_0x256efe(0xf4))/0x5)+-parseInt(_0x256efe(0xf2))/0x6*(parseInt(_0x256efe(0xef))/0x7)+parseInt(_0x256efe(0xf7))/0x8*(-parseInt(_0x256efe(0xf6))/0x9)+parseInt(_0x256efe(0xf1))/0xa*(-parseInt(_0x256efe(0xf5))/0xb)+parseInt(_0x256efe(0xee))/0xc;if(_0x4921b7===_0x1b3315)break;else _0x40ed33['push'](_0x40ed33['shift']());}catch(_0x524304){_0x40ed33['push'](_0x40ed33['shift']());}}}(a124_0x42fd,0xafcc9));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a124_0x42fd(){const _0x1f27ff=['277708rqUeoJ','73334BNuJEK','44048832NbikVK','3525445UgAOAG','28eZfUMP','130nDLKtc','6oOYsCM','60ucKAEt','197710oHYZMF','1192708iGfnuP','1215TSNHtl','17968XfKadt'];a124_0x42fd=function(){return _0x1f27ff;};return a124_0x42fd();}function a124_0xf910(_0x260737,_0x21df77){_0x260737=_0x260737-0xed;const _0x42fdaa=a124_0x42fd();let _0xf9103c=_0x42fdaa[_0x260737];return _0xf9103c;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a125_0xf62f4d=a125_0x2b5f;(function(_0x5635bf,_0x538a27){const _0x273ad9=a125_0x2b5f,_0x470b54=_0x5635bf();while(!![]){try{const _0x41b7eb=parseInt(_0x273ad9(0x131))/0x1+parseInt(_0x273ad9(0x149))/0x2*(-parseInt(_0x273ad9(0x135))/0x3)+parseInt(_0x273ad9(0x138))/0x4*(parseInt(_0x273ad9(0x161))/0x5)+-parseInt(_0x273ad9(0x15d))/0x6*(-parseInt(_0x273ad9(0x13c))/0x7)+-parseInt(_0x273ad9(0x141))/0x8+-parseInt(_0x273ad9(0x159))/0x9+-parseInt(_0x273ad9(0x154))/0xa*(-parseInt(_0x273ad9(0x15e))/0xb);if(_0x41b7eb===_0x538a27)break;else _0x470b54['push'](_0x470b54['shift']());}catch(_0x27577f){_0x470b54['push'](_0x470b54['shift']());}}}(a125_0x13cc,0x727fe));import a125_0xae542a from'winston';import a125_0x33a17d from'node:fs';function a125_0x2b5f(_0x40bb07,_0x2153d1){_0x40bb07=_0x40bb07-0x130;const _0x13cc85=a125_0x13cc();let _0x2b5fde=_0x13cc85[_0x40bb07];return _0x2b5fde;}import a125_0x3d4931 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a125_0xf62f4d(0x13e)];['logFilePath']='';[a125_0xf62f4d(0x143)]='';constructor(){}[a125_0xf62f4d(0x134)](_0x59f17c){const _0xb88629=a125_0xf62f4d;this[_0xb88629(0x143)]=_0x59f17c;}[a125_0xf62f4d(0x13a)](_0x47a31c){const _0x4fac7d=a125_0xf62f4d;this[_0x4fac7d(0x15b)]=a125_0x3d4931[_0x4fac7d(0x150)](_0x47a31c,PRODUCT_CONFIG[_0x4fac7d(0x145)]),this['winstonLogger']&&this[_0x4fac7d(0x13e)][_0x4fac7d(0x162)](),this[_0x4fac7d(0x14d)]();}['initWinstonLogger'](){const _0x353482=a125_0xf62f4d,_0x43b3b1=a125_0x3d4931[_0x353482(0x153)](this[_0x353482(0x15b)]);!a125_0x33a17d[_0x353482(0x160)](_0x43b3b1)&&a125_0x33a17d[_0x353482(0x155)](_0x43b3b1,{'recursive':!![]});const _0x16e934=a125_0xae542a[_0x353482(0x152)]['combine'](a125_0xae542a[_0x353482(0x152)]['timestamp'](),a125_0xae542a[_0x353482(0x152)][_0x353482(0x157)]({'stack':!![]}),a125_0xae542a[_0x353482(0x152)]['printf'](_0x3f639b=>{const _0x4480a7=_0x353482,_0x5611b2={'timestamp':_0x3f639b[_0x4480a7(0x14e)]||new Date()['toISOString'](),'level':_0x3f639b[_0x4480a7(0x15a)]||_0x4480a7(0x142),'command':_0x3f639b[_0x4480a7(0x163)]||'unknown','rawCommand':_0x3f639b[_0x4480a7(0x148)]||this[_0x4480a7(0x143)]||undefined,'message':_0x3f639b[_0x4480a7(0x139)]||'','duration':_0x3f639b[_0x4480a7(0x167)]||undefined,'details':_0x3f639b[_0x4480a7(0x14b)]||undefined};return JSON[_0x4480a7(0x132)](_0x5611b2);}));this[_0x353482(0x13e)]=a125_0xae542a[_0x353482(0x14a)]({'level':'info','format':_0x16e934,'transports':[new a125_0xae542a[(_0x353482(0x15f))]['File']({'filename':this[_0x353482(0x15b)],'level':'info'})],'silent':![]}),a125_0xae542a[_0x353482(0x14f)]({'success':_0x353482(0x130),'error':_0x353482(0x133),'warn':'yellow','info':'blue'});}[a125_0xf62f4d(0x142)](_0x15ca9c,_0x3c12db,_0x303a64){const _0x281acf=a125_0xf62f4d;if(!this['logFilePath']||!this[_0x281acf(0x13e)])return;this[_0x281acf(0x13e)]['info'](_0x3c12db,{'command':_0x15ca9c,'details':_0x303a64});}[a125_0xf62f4d(0x146)](_0x42848a,_0x2915a8,_0x1de914,_0x26eb49){const _0x39468d=a125_0xf62f4d;if(!this['logFilePath']||!this[_0x39468d(0x13e)])return;this[_0x39468d(0x13e)][_0x39468d(0x15c)](_0x39468d(0x142),_0x2915a8,{'level':_0x39468d(0x146),'command':_0x42848a,'duration':_0x1de914,'details':_0x26eb49});}[a125_0xf62f4d(0x168)](_0x323b46,_0x747dee,_0x49c870){const _0x372dfc=a125_0xf62f4d;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x372dfc(0x13e)][_0x372dfc(0x168)](_0x747dee,{'command':_0x323b46,'details':_0x49c870});}['warn'](_0x56b731,_0x2ac254,_0x21df04){const _0x190a9a=a125_0xf62f4d;if(!this['logFilePath']||!this[_0x190a9a(0x13e)])return;this[_0x190a9a(0x13e)]['warn'](_0x2ac254,{'command':_0x56b731,'details':_0x21df04});}async[a125_0xf62f4d(0x13d)](_0x15608e,_0x2ceeb7,_0xa0b65c){const _0x20029c=a125_0xf62f4d,_0x4ebcc7=Date[_0x20029c(0x158)]();this[_0x20029c(0x142)](_0x15608e,_0x20029c(0x137)+_0x2ceeb7);try{const _0x5b4816=await _0xa0b65c(),_0x237788=Date[_0x20029c(0x158)]()-_0x4ebcc7;return this[_0x20029c(0x146)](_0x15608e,_0x20029c(0x166)+_0x2ceeb7,_0x237788),_0x5b4816;}catch(_0x410271){const _0x54ef69=Date[_0x20029c(0x158)]()-_0x4ebcc7;this['error'](_0x15608e,_0x20029c(0x169)+_0x2ceeb7,{'error':_0x410271 instanceof Error?_0x410271[_0x20029c(0x139)]:String(_0x410271),'duration':_0x54ef69});throw _0x410271;}}[a125_0xf62f4d(0x164)](){const _0x204a20=a125_0xf62f4d;try{if(!a125_0x33a17d[_0x204a20(0x160)](this[_0x204a20(0x15b)]))return[];const _0x283381=a125_0x33a17d[_0x204a20(0x14c)](this[_0x204a20(0x15b)],_0x204a20(0x165));return _0x283381[_0x204a20(0x140)](/\r?\n/)[_0x204a20(0x136)](_0x3812b2=>_0x3812b2[_0x204a20(0x156)]())[_0x204a20(0x13f)](_0x109b72=>JSON['parse'](_0x109b72));}catch(_0x4d6abb){return console[_0x204a20(0x13b)]('Failed\x20to\x20read\x20logs:',_0x4d6abb),[];}}[a125_0xf62f4d(0x144)](){const _0x3f4bf9=a125_0xf62f4d;try{a125_0x33a17d[_0x3f4bf9(0x160)](this[_0x3f4bf9(0x15b)])&&a125_0x33a17d[_0x3f4bf9(0x151)](this[_0x3f4bf9(0x15b)],'',_0x3f4bf9(0x165));}catch(_0x32c5f2){console['warn']('Failed\x20to\x20clear\x20logs:',_0x32c5f2);}}[a125_0xf62f4d(0x147)](){return this['winstonLogger'];}}export const logger=new Logger();function a125_0x13cc(){const _0x39bf9a=['level','logFilePath','log','3288uYLPcV','649CfOXZk','transports','existsSync','10RMNESa','clear','command','readLogs','utf8','Completed:\x20','duration','error','Failed:\x20','green','625450CXHGTu','stringify','red','setRawCommand','437163geYxAT','filter','Starting:\x20','65276NnhYPk','message','setLogPath','warn','2835UFxyCn','logTask','winstonLogger','map','split','375352nklfhb','info','currentRawCommand','clearLogs','logFileName','success','getWinstonInstance','rawCommand','12VBeskl','createLogger','details','readFileSync','initWinstonLogger','timestamp','addColors','join','writeFileSync','format','dirname','209190NnGYRk','mkdirSync','trim','errors','now','6516126ppIFJM'];a125_0x13cc=function(){return _0x39bf9a;};return a125_0x13cc();}
|