@lovrabet/lovrabet-cli 2.3.10-beta.2 → 2.3.10
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/approval/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/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/import-excel.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/issue/context.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.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/domain-config.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.d.ts +1 -3
- 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/region.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/kb-management-client.js +1 -1
- package/lib/core/kb-sdk-errors.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.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/generated/official-routing.d.ts +4 -1
- package/lib/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.d.ts +2 -2
- package/lib/generated/routing-contract.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/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.js +1 -1
- package/lib/services/dataset-import/image-ooxml.js +1 -1
- package/lib/services/dataset-import/image-runner.js +1 -1
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.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/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.js +1 -1
- package/lib/utils/runtime-user-id.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/references/lovrabet-config-commands.md +17 -33
- package/skills/lovrabet/references/lovrabet-config.md +11 -3
- package/skills/lovrabet/references/lovrabet-doctor.md +1 -1
- package/skills/lovrabet/references/lovrabet-kb-workflow.md +4 -4
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f68fb,_0x56d7d7){const _0x1453e0=a160_0x4f69,_0x41dc6a=_0x2f68fb();while(!![]){try{const _0x203d96=parseInt(_0x1453e0(0xdf))/0x1*(parseInt(_0x1453e0(0xf5))/0x2)+parseInt(_0x1453e0(0xf7))/0x3*(parseInt(_0x1453e0(0xe0))/0x4)+parseInt(_0x1453e0(0xef))/0x5+-parseInt(_0x1453e0(0xfc))/0x6+-parseInt(_0x1453e0(0xd8))/0x7+-parseInt(_0x1453e0(0xda))/0x8+-parseInt(_0x1453e0(0xde))/0x9*(-parseInt(_0x1453e0(0xd1))/0xa);if(_0x203d96===_0x56d7d7)break;else _0x41dc6a['push'](_0x41dc6a['shift']());}catch(_0x2837b8){_0x41dc6a['push'](_0x41dc6a['shift']());}}}(a160_0x34e2,0x93729));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(_0x50c0ac){const _0x493658=a160_0x4f69;return _0x50c0ac[_0x493658(0xe7)]??Buffer[_0x493658(0xd7)](_0x50c0ac[_0x493658(0xf0)]??'',_0x493658(0xeb));}export function fileText(_0x910465){const _0x3737cb=a160_0x4f69;return fileContent(_0x910465)[_0x3737cb(0xe3)](_0x3737cb(0xeb));}export function normalizeLocalFiles(_0x3b3f0b){const _0x361478=a160_0x4f69;if(!Array['isArray'](_0x3b3f0b)||_0x3b3f0b[_0x361478(0xec)]===0x0)return[];const _0xb486a=new Map();for(const _0x3acba4 of _0x3b3f0b){if(!_0x3acba4||typeof _0x3acba4!==_0x361478(0xfe)||typeof _0x3acba4[_0x361478(0xd6)]!==_0x361478(0xd0))throw CliErrors[_0x361478(0xf3)](_0x361478(0xed));const _0x30e63b=normalizeSkillRelativePath(_0x3acba4[_0x361478(0xd6)]);if(_0xb486a[_0x361478(0xd9)](_0x30e63b))throw CliErrors[_0x361478(0xf3)](_0x361478(0xd3)+_0x30e63b);if(_0x3acba4['bytes']!==undefined&&!Buffer['isBuffer'](_0x3acba4[_0x361478(0xe7)]))throw CliErrors['validation'](_0x361478(0xf6)+_0x30e63b);if(_0x3acba4[_0x361478(0xe7)]===undefined&&typeof _0x3acba4[_0x361478(0xf0)]!==_0x361478(0xd0))throw CliErrors[_0x361478(0xf3)](_0x361478(0xf4)+_0x30e63b);const _0x46c2ed=fileContent(_0x3acba4);_0xb486a[_0x361478(0xf8)](_0x30e63b,{'path':_0x30e63b,'bytes':_0x46c2ed});}return Array[_0x361478(0xd7)](_0xb486a[_0x361478(0xe1)]())[_0x361478(0xf2)](compareSkillFiles);}export function normalizeManifestFiles(_0x27864a){const _0x29bb04=a160_0x4f69;if(!Array[_0x29bb04(0xee)](_0x27864a)||_0x27864a[_0x29bb04(0xec)]===0x0)return[];const _0x18b7bd=new Map();for(const _0x2e648a of _0x27864a){if(!_0x2e648a||typeof _0x2e648a!==_0x29bb04(0xfe)||typeof _0x2e648a[_0x29bb04(0xd6)]!==_0x29bb04(0xd0))throw CliErrors[_0x29bb04(0xf3)](_0x29bb04(0xed));const _0x13ce08=normalizeSkillRelativePath(_0x2e648a[_0x29bb04(0xd6)]);if(_0x18b7bd[_0x29bb04(0xd9)](_0x13ce08))throw CliErrors[_0x29bb04(0xf3)](_0x29bb04(0xd3)+_0x13ce08);if(!isSha256Hex(_0x2e648a[_0x29bb04(0xdc)]))throw CliErrors[_0x29bb04(0xf3)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x13ce08);if(!Number[_0x29bb04(0xfa)](_0x2e648a[_0x29bb04(0xf1)])||_0x2e648a[_0x29bb04(0xf1)]<0x0)throw CliErrors[_0x29bb04(0xf3)](_0x29bb04(0xdd)+_0x13ce08);_0x18b7bd[_0x29bb04(0xf8)](_0x13ce08,{'path':_0x13ce08,'sha256':_0x2e648a[_0x29bb04(0xdc)][_0x29bb04(0xfb)](),'size':_0x2e648a[_0x29bb04(0xf1)]});}return Array[_0x29bb04(0xd7)](_0x18b7bd[_0x29bb04(0xe1)]())[_0x29bb04(0xf2)](compareSkillFiles);}export function scanSkillDirectory(_0xbb1a3e,_0x158e19={}){const _0x129ccd=a160_0x4f69,_0x1d9d68=realpathSync(_0xbb1a3e),_0x4a0378=canonicalExcludedFilePaths(_0x158e19[_0x129ccd(0xe6)]),_0x2de4a7=[];function _0x55ec68(_0x55bf10){const _0x2f2345=_0x129ccd,_0x3acf23=readdirSync(_0x55bf10,{'withFileTypes':!![]})['sort']((_0x27c053,_0x35a3eb)=>_0x27c053[_0x2f2345(0xfd)]['localeCompare'](_0x35a3eb[_0x2f2345(0xfd)]));for(const _0x1dc1f6 of _0x3acf23){if(_0x1dc1f6[_0x2f2345(0xe9)]()&&IGNORED_DIR_NAMES[_0x2f2345(0xd9)](_0x1dc1f6[_0x2f2345(0xfd)]))continue;if(IGNORED_FILE_NAMES[_0x2f2345(0xd9)](_0x1dc1f6['name']))continue;const _0x24e6e6=resolve(_0x55bf10,_0x1dc1f6[_0x2f2345(0xfd)]);if(isExcludedFilePath(_0x24e6e6,_0x4a0378))continue;if(_0x1dc1f6[_0x2f2345(0xd2)]())throw CliErrors[_0x2f2345(0xf3)](_0x2f2345(0xd5)+_0x24e6e6);const _0xbc33ce=toPosixPath(relative(_0x1d9d68,_0x24e6e6));if(_0x1dc1f6[_0x2f2345(0xe9)]()){_0x55ec68(_0x24e6e6);continue;}if(!_0x1dc1f6[_0x2f2345(0xea)]())continue;validateSkillRelativePath(_0xbc33ce);const _0x481abf=readFileSync(_0x24e6e6);_0x2de4a7[_0x2f2345(0xdb)]({'path':_0xbc33ce,'bytes':_0x481abf});}}return _0x55ec68(_0x1d9d68),normalizeLocalFiles(_0x2de4a7);}function canonicalExcludedFilePaths(_0x1b7241){const _0x17faec=a160_0x4f69,_0x55857b=new Set();for(const _0x1db9af of _0x1b7241??[]){const _0x4ac1ff=resolve(_0x1db9af);_0x55857b[_0x17faec(0xe4)](_0x4ac1ff);try{_0x55857b[_0x17faec(0xe4)](realpathSync(_0x4ac1ff));}catch{}}return _0x55857b;}function isExcludedFilePath(_0x4e6e25,_0x5088f8){const _0x165da6=a160_0x4f69;if(_0x5088f8[_0x165da6(0xd9)](_0x4e6e25))return!![];if(_0x5088f8['size']===0x0)return![];try{return _0x5088f8[_0x165da6(0xd9)](realpathSync(_0x4e6e25));}catch{return![];}}function a160_0x34e2(){const _0x13f1ff=['compare','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','path','from','1990352JnGCUF','has','4401400iQnoem','push','sha256','Skill\x20file\x20size\x20is\x20invalid:\x20','531HaOuJm','1poHZgO','138896Mnjtaz','values','test','toString','add','trim','excludedFilePaths','bytes','split','isDirectory','isFile','utf8','length','Skill\x20file\x20path\x20must\x20be\x20text.','isArray','1059365gvGSgj','content','size','sort','validation','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','1158140uaffTa','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','15kVpZOI','set','replace','isSafeInteger','toLowerCase','4891896DBRtth','name','object','string','218510nOkGeV','isSymbolicLink','Duplicate\x20Skill\x20file\x20path:\x20'];a160_0x34e2=function(){return _0x13f1ff;};return a160_0x34e2();}export function compareSkillFiles(_0x3f3fa8,_0x15c69e){const _0x203dfd=a160_0x4f69;if(_0x3f3fa8[_0x203dfd(0xd6)]===SKILL_FILE)return _0x15c69e[_0x203dfd(0xd6)]===SKILL_FILE?0x0:-0x1;if(_0x15c69e[_0x203dfd(0xd6)]===SKILL_FILE)return 0x1;return Buffer[_0x203dfd(0xd4)](Buffer['from'](_0x3f3fa8['path'],'utf8'),Buffer[_0x203dfd(0xd7)](_0x15c69e[_0x203dfd(0xd6)],_0x203dfd(0xeb)));}export function normalizeSkillRelativePath(_0x4548c7){const _0x1774f8=a160_0x4f69,_0x5b7777=toPosixPath(_0x4548c7[_0x1774f8(0xe5)]());return validateSkillRelativePath(_0x5b7777),_0x5b7777;}export function validateSkillRelativePath(_0x1a9a52){const _0x119b39=a160_0x4f69;if(!_0x1a9a52||_0x1a9a52['startsWith']('/')||_0x1a9a52['includes']('//'))throw CliErrors[_0x119b39(0xf3)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x1a9a52);for(const _0x554038 of _0x1a9a52[_0x119b39(0xe8)]('/')){if(!_0x554038||_0x554038==='.'||_0x554038==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x1a9a52);}}export function toPosixPath(_0x310779){const _0x5101ca=a160_0x4f69;return _0x310779[_0x5101ca(0xf9)](/\\/g,'/');}function a160_0x4f69(_0x384908,_0x5a2b59){_0x384908=_0x384908-0xd0;const _0x34e26c=a160_0x34e2();let _0x4f6950=_0x34e26c[_0x384908];return _0x4f6950;}export function isSha256Hex(_0x4a09b2){const _0x3422a5=a160_0x4f69;return typeof _0x4a09b2===_0x3422a5(0xd0)&&/^[a-fA-F0-9]{64}$/[_0x3422a5(0xe2)](_0x4a09b2);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x330c68,_0x18e25a){const _0x52e9cd=a161_0x6b9d,_0x14952f=_0x330c68();while(!![]){try{const _0x19ed2d=parseInt(_0x52e9cd(0x1b2))/0x1*(-parseInt(_0x52e9cd(0x18e))/0x2)+-parseInt(_0x52e9cd(0x18b))/0x3*(parseInt(_0x52e9cd(0x187))/0x4)+-parseInt(_0x52e9cd(0x192))/0x5*(-parseInt(_0x52e9cd(0x196))/0x6)+parseInt(_0x52e9cd(0x1a4))/0x7+-parseInt(_0x52e9cd(0x1a7))/0x8*(-parseInt(_0x52e9cd(0x18d))/0x9)+-parseInt(_0x52e9cd(0x1ad))/0xa+-parseInt(_0x52e9cd(0x194))/0xb*(-parseInt(_0x52e9cd(0x179))/0xc);if(_0x19ed2d===_0x18e25a)break;else _0x14952f['push'](_0x14952f['shift']());}catch(_0x86bd51){_0x14952f['push'](_0x14952f['shift']());}}}(a161_0x3916,0x86880));function a161_0x3916(){const _0x4950c9=['env','name:\x20','delete','displayName','version','isFile','toString','Managed\x20file\x20was\x20removed\x20locally:\x20','112KVJooy','paths','hasOwn','contentHash','20067KckzYy','match','9WhGFiF','229386qSxYhV','scope','example','fileHashes','5HMgOjD','replace','62986vlmSNb','contents','1066620WuRcYi','filter','slice','test','validation','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','.\x20Changed\x20file:\x20','displayName:\x20','find','entries','appCode','keys','schemaVersion','5685820GCHIUZ','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','path','2420936TVRQAO','errors','name','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','trimEnd','pulledAt','7080520uWFolK','packageBytes','utf8','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','---','5kxdIvV','skillName','map','---\x0a','length','description','1524lSYzTC','\x0a---\x0a\x0a','trim','accessKey','status','has'];a161_0x3916=function(){return _0x4950c9;};return a161_0x3916();}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(_0x9d755,_0x595009,_0x240ae7){const _0x1ea068=a161_0x6b9d,_0x28a075=requireSkillCode(_0x9d755),_0x41cd08=requirePackageBytes(_0x28a075,_0x240ae7[_0x1ea068(0x1ae)]),_0x2c7a67=extractDownloadedPackage(_0x41cd08),_0x296e4e=_0x2c7a67['find'](_0xb5dd09=>_0xb5dd09[_0x1ea068(0x1a6)]===SKILL_FILE);if(!_0x296e4e)throw CliErrors[_0x1ea068(0x19a)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x28a075);const _0x5f1ade=withMaterializedSkillFrontmatter(_0x2c7a67,_0x9d755,_0x28a075),_0x2a0e33=_0x5f1ade[_0x1ea068(0x19f)](_0x19a54b=>_0x19a54b[_0x1ea068(0x1a6)]===SKILL_FILE),_0x11ad60=fileText(_0x2a0e33),_0x495bc1=getRuntimeSkillDir(_0x240ae7[_0x1ea068(0x17f)],_0x240ae7[_0x1ea068(0x17c)],_0x240ae7[_0x1ea068(0x1a1)],_0x595009,_0x28a075,_0x240ae7[_0x1ea068(0x188)]),_0xb273a4=resolve(_0x495bc1,SKILL_FILE),_0x2071bd=resolve(_0x495bc1,METADATA_FILE),_0x5a8ae0=contentHash(_0x11ad60),_0x4a949e=readMetadataIfPresent(_0x2071bd)?.[_0x1ea068(0x191)];ensurePulledFilesCanBeOverwritten(_0x495bc1,_0x2071bd,_0x5f1ade,_0x240ae7['force']===!![]),mkdirSync(_0x495bc1,{'recursive':!![],'mode':0x1c0});const _0x599281=existsSync(_0xb273a4)?readFileSync(_0xb273a4,_0x1ea068(0x1af)):undefined;return materializeFiles(_0x495bc1,_0x5f1ade),removeStaleManagedFiles(_0x495bc1,_0x4a949e,_0x5f1ade),writeJsonAtomic(_0x2071bd,buildMetadata(_0x9d755,_0x595009,_0x240ae7[_0x1ea068(0x1a1)],_0x5a8ae0,_0x240ae7[_0x1ea068(0x1ac)],_0x5f1ade,_0x41cd08)),{'skill':_0x9d755,'scope':_0x595009,'dir':_0x495bc1,'skillMdPath':_0xb273a4,'metadataPath':_0x2071bd,'contentHash':_0x5a8ae0,'changed':_0x599281!==_0x11ad60};}export function reuseMaterializedRuntimeSkill(_0x5ec461,_0x504099,_0x3fbe76){const _0x26facc=a161_0x6b9d,_0x37b18b=_0x5ec461[_0x26facc(0x183)]?.[_0x26facc(0x17b)]();if(!_0x37b18b)return undefined;const _0x2e3e90=requireSkillCode(_0x5ec461),_0xc8c2f2=getRuntimeSkillDir(_0x3fbe76[_0x26facc(0x17f)],_0x3fbe76[_0x26facc(0x17c)],_0x3fbe76[_0x26facc(0x1a1)],_0x504099,_0x2e3e90,_0x3fbe76[_0x26facc(0x188)]),_0x5dcf1f=resolve(_0xc8c2f2,SKILL_FILE),_0x258be0=resolve(_0xc8c2f2,METADATA_FILE),_0x3d6580=readMetadataIfPresent(_0x258be0);if(!_0x3d6580||_0x3d6580[_0x26facc(0x1a3)]!==0x2||_0x3d6580[_0x26facc(0x1a1)]!==_0x3fbe76[_0x26facc(0x1a1)]||_0x3d6580[_0x26facc(0x18f)]!==_0x504099||_0x3d6580['skillCode']!==_0x2e3e90||_0x3d6580[_0x26facc(0x183)]!==_0x37b18b||_0x3d6580['id']!==_0x5ec461['id']||_0x3d6580[_0x26facc(0x1b3)]!==_0x5ec461['skillName']||_0x3d6580[_0x26facc(0x1b7)]!==_0x5ec461[_0x26facc(0x1b7)]||_0x3d6580['example']!==_0x5ec461[_0x26facc(0x190)]||_0x3d6580[_0x26facc(0x17d)]!==_0x5ec461[_0x26facc(0x17d)]||!_0x3d6580[_0x26facc(0x18a)]||!_0x3d6580[_0x26facc(0x191)]||!Object[_0x26facc(0x189)](_0x3d6580['fileHashes'],SKILL_FILE))return undefined;for(const [_0x30ddd1,_0xaac83e]of Object[_0x26facc(0x1a0)](_0x3d6580['fileHashes'])){if(!/^[a-f0-9]{64}$/[_0x26facc(0x199)](_0xaac83e))return undefined;const _0x441eab=resolveManagedFilePath(_0xc8c2f2,_0x30ddd1);if(!existsSync(_0x441eab)||!lstatSync(_0x441eab)['isFile']())return undefined;if(bufferSha256(readFileSync(_0x441eab))!==_0xaac83e)return undefined;}return{'skill':_0x5ec461,'scope':_0x504099,'dir':_0xc8c2f2,'skillMdPath':_0x5dcf1f,'metadataPath':_0x258be0,'contentHash':_0x3d6580['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x5e62d3,_0x2f57f1,_0x467791){const _0x98ed83=a161_0x6b9d,_0x486b1a=skillDisplayName(_0x2f57f1,_0x467791),_0x6c228c=_0x2f57f1[_0x98ed83(0x1b7)]?.[_0x98ed83(0x17b)]()||_0x486b1a||_0x467791;return normalizeLocalFiles(_0x5e62d3)[_0x98ed83(0x1b4)](_0x38c85c=>{const _0x296cd0=_0x98ed83,_0xea4aa2=fileText(_0x38c85c);if(_0x38c85c['path']!==SKILL_FILE)return _0x38c85c;if(hasYamlFrontmatter(_0xea4aa2))return{'path':_0x38c85c[_0x296cd0(0x1a6)],'content':withSyncedDisplayName(_0xea4aa2,_0x486b1a)};return{'path':_0x38c85c[_0x296cd0(0x1a6)],'content':prependSkillFrontmatter(_0xea4aa2,{'name':_0x467791,'displayName':_0x486b1a,'description':_0x6c228c})};});}function hasYamlFrontmatter(_0x373433){const _0x325b51=a161_0x6b9d;return/^\uFEFF?---\s*\r?\n/[_0x325b51(0x199)](_0x373433);}function prependSkillFrontmatter(_0x34a695,_0x299c73){const _0x5ead96=a161_0x6b9d,_0x23d631=_0x34a695[_0x5ead96(0x193)](/^\uFEFF/,'');return['---',_0x5ead96(0x180)+yamlString(_0x299c73[_0x5ead96(0x1a9)]),_0x299c73['displayName']?_0x5ead96(0x19e)+yamlString(_0x299c73[_0x5ead96(0x182)]):undefined,'description:\x20'+yamlString(_0x299c73[_0x5ead96(0x1b7)]),_0x5ead96(0x1b1),'',_0x23d631][_0x5ead96(0x197)](_0x24fd82=>_0x24fd82!==undefined)['join']('\x0a');}function yamlString(_0xb6454c){const _0x2777a7=a161_0x6b9d;return JSON['stringify'](_0xb6454c[_0x2777a7(0x193)](/\r/g,'')['trim']());}function skillDisplayName(_0x20b90c,_0x91c225){const _0x5e34fe=a161_0x6b9d,_0x2a62e5=_0x20b90c[_0x5e34fe(0x1b3)]?.[_0x5e34fe(0x17b)]();return _0x2a62e5||_0x91c225;}function withSyncedDisplayName(_0x474b6a,_0x255266){const _0x3486ce=a161_0x6b9d,_0x2ad3a0=_0x474b6a[_0x3486ce(0x18c)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2ad3a0)return _0x474b6a;const _0x32f659=_0x2ad3a0[0x1]??'',_0xc3d960=_0x2ad3a0[0x2]??'',_0x27aca9=parseDocument(_0xc3d960);if(_0x27aca9[_0x3486ce(0x1a8)][_0x3486ce(0x1b6)]>0x0||!isMap(_0x27aca9[_0x3486ce(0x195)]))return _0x474b6a;if(_0x255266)_0x27aca9['set']('displayName',_0x255266);else{if(_0x27aca9[_0x3486ce(0x17e)](_0x3486ce(0x182)))_0x27aca9[_0x3486ce(0x181)](_0x3486ce(0x182));else return _0x474b6a;}forceBlockCollections(_0x27aca9[_0x3486ce(0x195)]);const _0x3b15c1=_0x27aca9[_0x3486ce(0x185)]({'lineWidth':0x0})[_0x3486ce(0x1ab)](),_0x2d4d04=_0x474b6a[_0x3486ce(0x198)](_0x2ad3a0[0x0][_0x3486ce(0x1b6)])[_0x3486ce(0x193)](/^\r?\n/,'');return _0x32f659+_0x3486ce(0x1b5)+_0x3b15c1+_0x3486ce(0x17a)+_0x2d4d04;}function a161_0x6b9d(_0x2ac8b7,_0x229aa8){_0x2ac8b7=_0x2ac8b7-0x179;const _0x3916f7=a161_0x3916();let _0x6b9d=_0x3916f7[_0x2ac8b7];return _0x6b9d;}function forceBlockCollections(_0x2e0cec){if(!isNode(_0x2e0cec))return;visit(_0x2e0cec,(_0x5cd897,_0x120004)=>{isCollection(_0x120004)&&(_0x120004['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0xe821d0,_0x34a368,_0xf07df9,_0x2ef0d6){const _0x2075e4=a161_0x6b9d;if(_0x2ef0d6||!existsSync(_0x34a368))return;const _0x5cafe6=readMetadataIfPresent(_0x34a368);if(!_0x5cafe6)return;const _0x314558=_0x5cafe6['fileHashes']&&Object[_0x2075e4(0x1a2)](_0x5cafe6[_0x2075e4(0x191)])[_0x2075e4(0x1b6)]>0x0?_0x5cafe6['fileHashes']:undefined;if(_0x314558)for(const [_0x9364ea,_0x4b3b37]of Object[_0x2075e4(0x1a0)](_0x314558)){const _0x7f61f7=resolveManagedFilePath(_0xe821d0,_0x9364ea);if(!existsSync(_0x7f61f7))throw CliErrors[_0x2075e4(0x19a)](_0x2075e4(0x19c)+_0xe821d0,_0x2075e4(0x186)+_0x9364ea);const _0x10379e=lstatSync(_0x7f61f7);if(!_0x10379e[_0x2075e4(0x184)]())throw CliErrors[_0x2075e4(0x19a)](_0x2075e4(0x19c)+_0xe821d0,_0x2075e4(0x1aa)+_0x9364ea);const _0x587c6a=bufferSha256(readFileSync(_0x7f61f7));if(_0x587c6a!==_0x4b3b37)throw CliErrors[_0x2075e4(0x19a)](_0x2075e4(0x19c)+_0xe821d0+_0x2075e4(0x19d)+_0x9364ea,_0x2075e4(0x19b)+_0x9364ea);}else{const _0x38b080=resolve(_0xe821d0,SKILL_FILE);if(existsSync(_0x38b080)&&_0x5cafe6[_0x2075e4(0x18a)]){const _0x24041b=contentHash(readFileSync(_0x38b080,_0x2075e4(0x1af)));if(_0x24041b!==_0x5cafe6[_0x2075e4(0x18a)])throw CliErrors['validation']('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x38b080,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x3eaabf of normalizeLocalFiles(_0xf07df9)){if(_0x314558?.[_0x3eaabf['path']])continue;if(!_0x314558&&_0x3eaabf[_0x2075e4(0x1a6)]===SKILL_FILE)continue;const _0x3cbbd2=resolveManagedFilePath(_0xe821d0,_0x3eaabf['path']);if(!existsSync(_0x3cbbd2))continue;const _0x453bd3=lstatSync(_0x3cbbd2);if(!_0x453bd3[_0x2075e4(0x184)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0xe821d0,_0x2075e4(0x1a5)+_0x3eaabf['path']);const _0x7a5eac=bufferSha256(readFileSync(_0x3cbbd2));if(_0x7a5eac!==fileHash(_0x3eaabf))throw CliErrors[_0x2075e4(0x19a)](_0x2075e4(0x19c)+_0xe821d0,_0x2075e4(0x1b0)+_0x3eaabf[_0x2075e4(0x1a6)]);}}function materializeFiles(_0x38bb50,_0x5e045a){const _0x4e456b=a161_0x6b9d;for(const _0x2a1d03 of normalizeLocalFiles(_0x5e045a)){const _0x1b403b=resolveManagedFilePath(_0x38bb50,_0x2a1d03[_0x4e456b(0x1a6)]);mkdirSync(dirname(_0x1b403b),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1b403b,fileContent(_0x2a1d03),0x180);}}function removeStaleManagedFiles(_0x577db8,_0x2335d9,_0x54dfc0){const _0x490262=a161_0x6b9d;if(!_0x2335d9)return;const _0xab7b34=new Set(normalizeLocalFiles(_0x54dfc0)[_0x490262(0x1b4)](_0x31e5af=>_0x31e5af['path']));for(const _0x22e878 of Object[_0x490262(0x1a2)](_0x2335d9)){if(_0xab7b34[_0x490262(0x17e)](_0x22e878))continue;const _0x354160=resolveManagedFilePath(_0x577db8,_0x22e878);existsSync(_0x354160)&&lstatSync(_0x354160)['isFile']()&&rmSync(_0x354160,{'force':!![]});}}
|
|
1
|
+
(function(_0x5ffea1,_0x2a5c4c){const _0x2571df=a161_0x3ed1,_0x1bff3e=_0x5ffea1();while(!![]){try{const _0x207f59=-parseInt(_0x2571df(0x1be))/0x1*(parseInt(_0x2571df(0x1b2))/0x2)+-parseInt(_0x2571df(0x19e))/0x3+-parseInt(_0x2571df(0x1cc))/0x4+parseInt(_0x2571df(0x1c1))/0x5+parseInt(_0x2571df(0x1b7))/0x6*(-parseInt(_0x2571df(0x1d4))/0x7)+-parseInt(_0x2571df(0x19f))/0x8*(-parseInt(_0x2571df(0x1d5))/0x9)+parseInt(_0x2571df(0x1af))/0xa;if(_0x207f59===_0x2a5c4c)break;else _0x1bff3e['push'](_0x1bff3e['shift']());}catch(_0x29fdfc){_0x1bff3e['push'](_0x1bff3e['shift']());}}}(a161_0x1cf7,0xada49));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(_0x121947,_0x4c7acc,_0x57b5a4){const _0x3c5a01=a161_0x3ed1,_0x4949ed=requireSkillCode(_0x121947),_0x4dfa2b=requirePackageBytes(_0x4949ed,_0x57b5a4[_0x3c5a01(0x1cb)]),_0x32c1db=extractDownloadedPackage(_0x4dfa2b),_0x342c7d=_0x32c1db[_0x3c5a01(0x1ce)](_0x5ddce0=>_0x5ddce0[_0x3c5a01(0x197)]===SKILL_FILE);if(!_0x342c7d)throw CliErrors['validation'](_0x3c5a01(0x19d)+SKILL_FILE+':\x20'+_0x4949ed);const _0x156004=withMaterializedSkillFrontmatter(_0x32c1db,_0x121947,_0x4949ed),_0x4cf32e=_0x156004['find'](_0xbea467=>_0xbea467[_0x3c5a01(0x197)]===SKILL_FILE),_0x39bbb3=fileText(_0x4cf32e),_0x3bec3a=getRuntimeSkillDir(_0x57b5a4[_0x3c5a01(0x1bf)],_0x57b5a4[_0x3c5a01(0x1d6)],_0x57b5a4[_0x3c5a01(0x1c5)],_0x4c7acc,_0x4949ed,_0x57b5a4[_0x3c5a01(0x1b8)]),_0x138a33=resolve(_0x3bec3a,SKILL_FILE),_0x1985ce=resolve(_0x3bec3a,METADATA_FILE),_0xb21caa=contentHash(_0x39bbb3),_0x561379=readMetadataIfPresent(_0x1985ce)?.[_0x3c5a01(0x1bc)];ensurePulledFilesCanBeOverwritten(_0x3bec3a,_0x1985ce,_0x156004,_0x57b5a4['force']===!![]),mkdirSync(_0x3bec3a,{'recursive':!![],'mode':0x1c0});const _0xb14271=existsSync(_0x138a33)?readFileSync(_0x138a33,_0x3c5a01(0x1bb)):undefined;return materializeFiles(_0x3bec3a,_0x156004),removeStaleManagedFiles(_0x3bec3a,_0x561379,_0x156004),writeJsonAtomic(_0x1985ce,buildMetadata(_0x121947,_0x4c7acc,_0x57b5a4[_0x3c5a01(0x1c5)],_0xb21caa,_0x57b5a4[_0x3c5a01(0x1d7)],_0x156004,_0x4dfa2b)),{'skill':_0x121947,'scope':_0x4c7acc,'dir':_0x3bec3a,'skillMdPath':_0x138a33,'metadataPath':_0x1985ce,'contentHash':_0xb21caa,'changed':_0xb14271!==_0x39bbb3};}export function reuseMaterializedRuntimeSkill(_0x17eb12,_0x1a5c63,_0x159b32){const _0x43dca7=a161_0x3ed1,_0x488a62=_0x17eb12[_0x43dca7(0x1a5)]?.[_0x43dca7(0x1ae)]();if(!_0x488a62)return undefined;const _0x1d4a62=requireSkillCode(_0x17eb12),_0x488fa6=getRuntimeSkillDir(_0x159b32['env'],_0x159b32[_0x43dca7(0x1d6)],_0x159b32[_0x43dca7(0x1c5)],_0x1a5c63,_0x1d4a62,_0x159b32[_0x43dca7(0x1b8)]),_0x282cf2=resolve(_0x488fa6,SKILL_FILE),_0x27fb89=resolve(_0x488fa6,METADATA_FILE),_0x221671=readMetadataIfPresent(_0x27fb89);if(!_0x221671||_0x221671['schemaVersion']!==0x2||_0x221671['appCode']!==_0x159b32['appCode']||_0x221671[_0x43dca7(0x1d0)]!==_0x1a5c63||_0x221671[_0x43dca7(0x1a0)]!==_0x1d4a62||_0x221671['version']!==_0x488a62||_0x221671['id']!==_0x17eb12['id']||_0x221671[_0x43dca7(0x1a2)]!==_0x17eb12[_0x43dca7(0x1a2)]||_0x221671['description']!==_0x17eb12[_0x43dca7(0x19a)]||_0x221671[_0x43dca7(0x198)]!==_0x17eb12[_0x43dca7(0x198)]||_0x221671['status']!==_0x17eb12[_0x43dca7(0x1aa)]||!_0x221671[_0x43dca7(0x1ba)]||!_0x221671[_0x43dca7(0x1bc)]||!Object[_0x43dca7(0x1a8)](_0x221671[_0x43dca7(0x1bc)],SKILL_FILE))return undefined;for(const [_0x56cf92,_0x5bc671]of Object[_0x43dca7(0x1b0)](_0x221671['fileHashes'])){if(!/^[a-f0-9]{64}$/[_0x43dca7(0x1b3)](_0x5bc671))return undefined;const _0x6a0afc=resolveManagedFilePath(_0x488fa6,_0x56cf92);if(!existsSync(_0x6a0afc)||!lstatSync(_0x6a0afc)['isFile']())return undefined;if(bufferSha256(readFileSync(_0x6a0afc))!==_0x5bc671)return undefined;}return{'skill':_0x17eb12,'scope':_0x1a5c63,'dir':_0x488fa6,'skillMdPath':_0x282cf2,'metadataPath':_0x27fb89,'contentHash':_0x221671[_0x43dca7(0x1ba)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x522a5a,_0x1fc9f0,_0x10b3ad){const _0x2821fd=a161_0x3ed1,_0x39e668=skillDisplayName(_0x1fc9f0,_0x10b3ad),_0x513948=_0x1fc9f0[_0x2821fd(0x19a)]?.[_0x2821fd(0x1ae)]()||_0x39e668||_0x10b3ad;return normalizeLocalFiles(_0x522a5a)['map'](_0x5dcd56=>{const _0x874de9=_0x2821fd,_0x459ce1=fileText(_0x5dcd56);if(_0x5dcd56[_0x874de9(0x197)]!==SKILL_FILE)return _0x5dcd56;if(hasYamlFrontmatter(_0x459ce1))return{'path':_0x5dcd56['path'],'content':withSyncedDisplayName(_0x459ce1,_0x39e668)};return{'path':_0x5dcd56['path'],'content':prependSkillFrontmatter(_0x459ce1,{'name':_0x10b3ad,'displayName':_0x39e668,'description':_0x513948})};});}function hasYamlFrontmatter(_0x3d464e){const _0x5484bc=a161_0x3ed1;return/^\uFEFF?---\s*\r?\n/[_0x5484bc(0x1b3)](_0x3d464e);}function prependSkillFrontmatter(_0x55789a,_0x1e800e){const _0x4deabe=a161_0x3ed1,_0x105337=_0x55789a['replace'](/^\uFEFF/,'');return[_0x4deabe(0x1a1),_0x4deabe(0x1b6)+yamlString(_0x1e800e['name']),_0x1e800e[_0x4deabe(0x1ad)]?_0x4deabe(0x1c7)+yamlString(_0x1e800e[_0x4deabe(0x1ad)]):undefined,_0x4deabe(0x1d3)+yamlString(_0x1e800e[_0x4deabe(0x19a)]),_0x4deabe(0x1a1),'',_0x105337]['filter'](_0xf7c68b=>_0xf7c68b!==undefined)[_0x4deabe(0x1d2)]('\x0a');}function yamlString(_0x50240a){const _0x59a9d0=a161_0x3ed1;return JSON[_0x59a9d0(0x1a9)](_0x50240a[_0x59a9d0(0x19c)](/\r/g,'')['trim']());}function skillDisplayName(_0x3a50a5,_0x2b5f08){const _0x4f05aa=a161_0x3ed1,_0x961afc=_0x3a50a5['skillName']?.[_0x4f05aa(0x1ae)]();return _0x961afc||_0x2b5f08;}function withSyncedDisplayName(_0x56bbbf,_0x53fe15){const _0x453bc3=a161_0x3ed1,_0x564c4f=_0x56bbbf[_0x453bc3(0x1b5)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x564c4f)return _0x56bbbf;const _0x8daebb=_0x564c4f[0x1]??'',_0x583f20=_0x564c4f[0x2]??'',_0x502dfb=parseDocument(_0x583f20);if(_0x502dfb[_0x453bc3(0x1b9)]['length']>0x0||!isMap(_0x502dfb[_0x453bc3(0x1ab)]))return _0x56bbbf;if(_0x53fe15)_0x502dfb[_0x453bc3(0x1c3)](_0x453bc3(0x1ad),_0x53fe15);else{if(_0x502dfb[_0x453bc3(0x1d1)]('displayName'))_0x502dfb[_0x453bc3(0x1cd)](_0x453bc3(0x1ad));else return _0x56bbbf;}forceBlockCollections(_0x502dfb[_0x453bc3(0x1ab)]);const _0x22ff45=_0x502dfb[_0x453bc3(0x1b4)]({'lineWidth':0x0})['trimEnd'](),_0x5d10b7=_0x56bbbf[_0x453bc3(0x1bd)](_0x564c4f[0x0][_0x453bc3(0x1c6)])[_0x453bc3(0x19c)](/^\r?\n/,'');return _0x8daebb+_0x453bc3(0x1b1)+_0x22ff45+'\x0a---\x0a\x0a'+_0x5d10b7;}function forceBlockCollections(_0x2bff2f){if(!isNode(_0x2bff2f))return;visit(_0x2bff2f,(_0x45e5bb,_0xc99c6)=>{const _0x29037f=a161_0x3ed1;isCollection(_0xc99c6)&&(_0xc99c6[_0x29037f(0x1c9)]=![]);});}function a161_0x3ed1(_0x271c19,_0x460660){_0x271c19=_0x271c19-0x197;const _0x1cf787=a161_0x1cf7();let _0x3ed15b=_0x1cf787[_0x271c19];return _0x3ed15b;}function ensurePulledFilesCanBeOverwritten(_0x244993,_0x1d67c6,_0x484bd9,_0x1aaef7){const _0x168c3f=a161_0x3ed1;if(_0x1aaef7||!existsSync(_0x1d67c6))return;const _0x45a8a5=readMetadataIfPresent(_0x1d67c6);if(!_0x45a8a5)return;const _0x1c31a6=_0x45a8a5['fileHashes']&&Object[_0x168c3f(0x1c8)](_0x45a8a5[_0x168c3f(0x1bc)])['length']>0x0?_0x45a8a5['fileHashes']:undefined;if(_0x1c31a6)for(const [_0x4cb415,_0x59a55e]of Object[_0x168c3f(0x1b0)](_0x1c31a6)){const _0x13ca45=resolveManagedFilePath(_0x244993,_0x4cb415);if(!existsSync(_0x13ca45))throw CliErrors[_0x168c3f(0x1a7)](_0x168c3f(0x1c4)+_0x244993,_0x168c3f(0x1a3)+_0x4cb415);const _0x1f3435=lstatSync(_0x13ca45);if(!_0x1f3435[_0x168c3f(0x1c0)]())throw CliErrors[_0x168c3f(0x1a7)](_0x168c3f(0x1c4)+_0x244993,_0x168c3f(0x1a6)+_0x4cb415);const _0xa6340a=bufferSha256(readFileSync(_0x13ca45));if(_0xa6340a!==_0x59a55e)throw CliErrors[_0x168c3f(0x1a7)](_0x168c3f(0x1c4)+_0x244993+_0x168c3f(0x19b)+_0x4cb415,_0x168c3f(0x1ac)+_0x4cb415);}else{const _0x580a2c=resolve(_0x244993,SKILL_FILE);if(existsSync(_0x580a2c)&&_0x45a8a5[_0x168c3f(0x1ba)]){const _0x38cfa8=contentHash(readFileSync(_0x580a2c,_0x168c3f(0x1bb)));if(_0x38cfa8!==_0x45a8a5['contentHash'])throw CliErrors['validation'](_0x168c3f(0x1c2)+_0x580a2c,_0x168c3f(0x1a4));}}for(const _0x579c32 of normalizeLocalFiles(_0x484bd9)){if(_0x1c31a6?.[_0x579c32['path']])continue;if(!_0x1c31a6&&_0x579c32['path']===SKILL_FILE)continue;const _0x502967=resolveManagedFilePath(_0x244993,_0x579c32[_0x168c3f(0x197)]);if(!existsSync(_0x502967))continue;const _0x3db1d6=lstatSync(_0x502967);if(!_0x3db1d6['isFile']())throw CliErrors[_0x168c3f(0x1a7)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x244993,_0x168c3f(0x1ca)+_0x579c32[_0x168c3f(0x197)]);const _0x5837b0=bufferSha256(readFileSync(_0x502967));if(_0x5837b0!==fileHash(_0x579c32))throw CliErrors[_0x168c3f(0x1a7)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x244993,_0x168c3f(0x1cf)+_0x579c32[_0x168c3f(0x197)]);}}function materializeFiles(_0x2e8bcd,_0x239aec){const _0x23c7d7=a161_0x3ed1;for(const _0x400b40 of normalizeLocalFiles(_0x239aec)){const _0x3ad8d1=resolveManagedFilePath(_0x2e8bcd,_0x400b40[_0x23c7d7(0x197)]);mkdirSync(dirname(_0x3ad8d1),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3ad8d1,fileContent(_0x400b40),0x180);}}function a161_0x1cf7(){const _0xb26351=['length','displayName:\x20','keys','flow','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','packageBytes','663716xsBFii','delete','find','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','scope','has','join','description:\x20','5466412PEZmgl','9LqsthM','accessKey','pulledAt','path','example','map','description','.\x20Changed\x20file:\x20','replace','Runtime\x20Skill\x20package\x20is\x20missing\x20','128451ajQEEk','5621432zgJWKH','skillCode','---','skillName','Managed\x20file\x20was\x20removed\x20locally:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','version','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','validation','hasOwn','stringify','status','contents','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','displayName','trim','17627420FUJaVA','entries','---\x0a','110ysgsUK','test','toString','match','name:\x20','6dgiUlU','paths','errors','contentHash','utf8','fileHashes','slice','20173pyYpql','env','isFile','1724985SbsjIm','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','set','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','appCode'];a161_0x1cf7=function(){return _0xb26351;};return a161_0x1cf7();}function removeStaleManagedFiles(_0x551b4b,_0x401ff6,_0x1b00d5){const _0x2aab8b=a161_0x3ed1;if(!_0x401ff6)return;const _0x347476=new Set(normalizeLocalFiles(_0x1b00d5)[_0x2aab8b(0x199)](_0x12c2c7=>_0x12c2c7['path']));for(const _0x23e4a2 of Object[_0x2aab8b(0x1c8)](_0x401ff6)){if(_0x347476[_0x2aab8b(0x1d1)](_0x23e4a2))continue;const _0x5ea8cc=resolveManagedFilePath(_0x551b4b,_0x23e4a2);existsSync(_0x5ea8cc)&&lstatSync(_0x5ea8cc)[_0x2aab8b(0x1c0)]()&&rmSync(_0x5ea8cc,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x16f315,_0x8fc4fe){const _0x39391e=a162_0x5013,_0x1a04ce=_0x16f315();while(!![]){try{const _0x27c103=-parseInt(_0x39391e(0x20b))/0x1+parseInt(_0x39391e(0x20c))/0x2*(parseInt(_0x39391e(0x1fb))/0x3)+parseInt(_0x39391e(0x20d))/0x4*(-parseInt(_0x39391e(0x209))/0x5)+parseInt(_0x39391e(0x208))/0x6*(parseInt(_0x39391e(0x214))/0x7)+-parseInt(_0x39391e(0x200))/0x8*(-parseInt(_0x39391e(0x217))/0x9)+parseInt(_0x39391e(0x201))/0xa*(-parseInt(_0x39391e(0x20a))/0xb)+-parseInt(_0x39391e(0x1f8))/0xc;if(_0x27c103===_0x8fc4fe)break;else _0x1a04ce['push'](_0x1a04ce['shift']());}catch(_0x327f7e){_0x1a04ce['push'](_0x1a04ce['shift']());}}}(a162_0x2cc7,0x989f0));function a162_0x5013(_0xdda70c,_0x177c48){_0xdda70c=_0xdda70c-0x1f3;const _0x2cc7bd=a162_0x2cc7();let _0x501380=_0x2cc7bd[_0xdda70c];return _0x501380;}import{existsSync,readFileSync}from'node:fs';function a162_0x2cc7(){const _0x2e1797=['version','Runtime\x20Skill\x20is\x20missing\x20skillCode.','3939876lBRGdq','170NwxXfQ','11kVtyvi','579315yNUEDN','8QCeLDs','23648SpdCtV','files','personal','readonly','status','isArray','hasUpstreamUpdate','7DxkoNg','example','utf8','18GgBnNA','skillName','tags','length','description','trim','path','map','4087764CcUiCZ','sourceSessionId','object','268431ekJACc','validation','forkedFromVersion','fromEntries','manifest','4391560CLJNuY','3663380IEzYZT','userId','forkedFromSkillId','string','tenantCode'];a162_0x2cc7=function(){return _0x2e1797;};return a162_0x2cc7();}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(_0x27b56c,_0x1d94df,_0x23ebd4,_0x100844,_0x77fc40,_0x165343,_0x54b32f){const _0x2a077d=a162_0x5013,_0x3c073c=_0x165343?normalizeLocalFiles(_0x165343):[],_0xaf4360=!_0x54b32f&&_0x3c073c[_0x2a077d(0x1f3)]>0x0?buildSkillPackage(_0x3c073c):undefined,_0x5315a2=_0x54b32f?bufferSha256(_0x54b32f):_0xaf4360?.[_0x2a077d(0x1ff)]['zipSha256'],_0x173a93=_0x54b32f?.['length']??_0xaf4360?.[_0x2a077d(0x1ff)]['zipSize'],_0x28f344=_0x3c073c['length']>0x0?Object[_0x2a077d(0x1fe)](_0x3c073c[_0x2a077d(0x1f7)](_0x31a94e=>[_0x31a94e[_0x2a077d(0x1f6)],fileHash(_0x31a94e)])):undefined;return{'schemaVersion':_0x3c073c[_0x2a077d(0x1f3)]>0x0?0x2:0x1,'id':_0x27b56c['id'],'appCode':_0x23ebd4,'skillCode':requireSkillCode(_0x27b56c),'skillName':_0x27b56c[_0x2a077d(0x218)],'description':_0x27b56c[_0x2a077d(0x1f4)],'example':_0x27b56c[_0x2a077d(0x215)],'scope':_0x1d94df,'readonly':_0x1d94df!==_0x2a077d(0x20f)||_0x27b56c[_0x2a077d(0x210)]===!![],'tenantCode':_0x27b56c[_0x2a077d(0x205)],'userId':_0x27b56c[_0x2a077d(0x202)],'version':_0x27b56c[_0x2a077d(0x206)],'status':_0x27b56c[_0x2a077d(0x211)],'tags':Array['isArray'](_0x27b56c[_0x2a077d(0x219)])?_0x27b56c[_0x2a077d(0x219)]:[],'hasUpstreamUpdate':_0x27b56c[_0x2a077d(0x213)],'forkedFromSkillId':_0x27b56c[_0x2a077d(0x203)],'forkedFromVersion':_0x27b56c[_0x2a077d(0x1fd)],'sourceSessionId':_0x27b56c[_0x2a077d(0x1f9)],'contentHash':_0x100844,'fileHashes':_0x28f344,'treeHash':_0x3c073c[_0x2a077d(0x1f3)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x3c073c)):undefined,'ossPath':remoteManifestOssPath(_0x27b56c[_0x2a077d(0x20e)]),'zipSha256':_0x5315a2,'zipSize':_0x173a93,'files':_0x3c073c[_0x2a077d(0x1f3)]>0x0?_0x3c073c['map'](_0x5b6331=>({'path':_0x5b6331[_0x2a077d(0x1f6)],'hash':fileHash(_0x5b6331),'size':fileContent(_0x5b6331)['length']})):undefined,'pulledAt':_0x77fc40??new Date()['toISOString']()};}export function requireSkillCode(_0x11f4a8){const _0x2f3ef5=a162_0x5013,_0x4af65a=_0x11f4a8['skillCode']?.[_0x2f3ef5(0x1f5)]();if(!_0x4af65a)throw CliErrors[_0x2f3ef5(0x1fc)](_0x2f3ef5(0x207));return _0x4af65a;}export function readMetadataIfPresent(_0x3fc6f5){const _0x4c1cf7=a162_0x5013;if(!existsSync(_0x3fc6f5))return undefined;try{const _0x5e9f2d=JSON['parse'](readFileSync(_0x3fc6f5,_0x4c1cf7(0x216)));return _0x5e9f2d;}catch{throw CliErrors[_0x4c1cf7(0x1fc)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x3fc6f5);}}function remoteManifestOssPath(_0x23c37b){const _0x333712=a162_0x5013;if(!_0x23c37b||typeof _0x23c37b!==_0x333712(0x1fa)||Array[_0x333712(0x212)](_0x23c37b))return undefined;const _0x40f24f=_0x23c37b['ossPath'];return typeof _0x40f24f===_0x333712(0x204)&&_0x40f24f[_0x333712(0x1f5)]()?_0x40f24f[_0x333712(0x1f5)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a163_0x2799(_0x5de928,_0x55986b){_0x5de928=_0x5de928-0x15b;const _0x578df6=a163_0x578d();let _0x279975=_0x578df6[_0x5de928];return _0x279975;}const a163_0x4e8324=a163_0x2799;(function(_0x2578c7,_0x2f06f3){const _0x315972=a163_0x2799,_0x3bfb3d=_0x2578c7();while(!![]){try{const _0x330227=-parseInt(_0x315972(0x15f))/0x1+-parseInt(_0x315972(0x161))/0x2*(parseInt(_0x315972(0x171))/0x3)+-parseInt(_0x315972(0x173))/0x4*(-parseInt(_0x315972(0x165))/0x5)+parseInt(_0x315972(0x15d))/0x6+parseInt(_0x315972(0x166))/0x7+-parseInt(_0x315972(0x160))/0x8*(-parseInt(_0x315972(0x162))/0x9)+-parseInt(_0x315972(0x16c))/0xa;if(_0x330227===_0x2f06f3)break;else _0x3bfb3d['push'](_0x3bfb3d['shift']());}catch(_0x203ac2){_0x3bfb3d['push'](_0x3bfb3d['shift']());}}}(a163_0x578d,0xa07c7));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 a163_0x578d(){const _0x1235d7=['homeDirName','agentsSkillsDir','validation','2975694vVdsiA','.claude','64576WcUDIt','16HzmEIK','12YrdaAS','1965015hiAhyN','cacheRoot','filter','1437715Civmpg','3617271oJEHac','CLAUDE_SKILL_ROOT','includes','skills','.agents','path\x20segment','784710eEseoh','appCode','Unsafe\x20','trim','skillCode','612030iYBwCF','\x20for\x20local\x20path:\x20','8QyrCom','workbuddySkillsDir'];a163_0x578d=function(){return _0x1235d7;};return a163_0x578d();}export function resolveSkillSyncPaths(_0x29641d={}){const _0x6e297b=a163_0x2799,_0x526712=_0x29641d['homeDir']??homedir(),_0x410519=resolve(_0x526712,PRODUCT_CONFIG['homeDirName'],'cache'),_0x47cce0=trimmedEnv('SKILL_ROOT'),_0x1767ba=trimmedEnv(_0x6e297b(0x167)),_0xd3597=resolve(_0x526712,'.workbuddy'),_0xf8882a=_0x29641d[_0x6e297b(0x174)]??(existsSync(_0xd3597)?resolve(_0xd3597,_0x6e297b(0x169)):undefined);return{'homeDir':_0x526712,'cacheRoot':_0x410519,'managedRoot':resolve(_0x526712,PRODUCT_CONFIG[_0x6e297b(0x175)]),'agentsSkillsDir':_0x29641d[_0x6e297b(0x15b)]??_0x47cce0??resolve(_0x526712,_0x6e297b(0x16a),_0x6e297b(0x169)),'claudeSkillsDir':_0x29641d['claudeSkillsDir']??_0x1767ba??resolve(_0x526712,_0x6e297b(0x15e),'skills'),'workbuddySkillsDir':_0xf8882a};}export function runtimeAgentSkillRoots(_0x4a4858){const _0x14e143=a163_0x2799;return[_0x4a4858[_0x14e143(0x15b)],_0x4a4858['claudeSkillsDir'],_0x4a4858[_0x14e143(0x174)]][_0x14e143(0x164)](_0x1f31f7=>Boolean(_0x1f31f7));}export function getRuntimeSkillCacheRoot(_0x308734,_0x16eeed,_0xf5269b={}){const _0x473c0a=a163_0x2799,_0x3f54f8=resolveSkillSyncPaths(_0xf5269b);return resolve(_0x3f54f8[_0x473c0a(0x163)],_0x308734,fingerprintAccessKey(_0x16eeed),_0x473c0a(0x169));}export function getRuntimeSkillDir(_0x539721,_0x2cdc3c,_0x4444f5,_0x58f310,_0x2e3284,_0x3099f2={}){const _0x573f8f=a163_0x2799;return resolve(getRuntimeSkillCacheRoot(_0x539721,_0x2cdc3c,_0x3099f2),safePathSegment(_0x4444f5,_0x573f8f(0x16d)),_0x58f310,safePathSegment(_0x2e3284,_0x573f8f(0x170)));}export function safePathSegment(_0x20b130,_0xd2d7df=a163_0x4e8324(0x16b)){const _0x2da4ee=a163_0x4e8324;if(!_0x20b130||_0x20b130[_0x2da4ee(0x168)]('/')||_0x20b130[_0x2da4ee(0x168)]('\x5c')||_0x20b130['includes']('..'))throw CliErrors[_0x2da4ee(0x15c)](_0x2da4ee(0x16e)+_0xd2d7df+_0x2da4ee(0x172)+_0x20b130);return _0x20b130;}function trimmedEnv(_0x16e2ee){const _0x3c7c4b=a163_0x4e8324,_0x59bf66=productEnv(_0x16e2ee)?.[_0x3c7c4b(0x16f)]();return _0x59bf66?_0x59bf66:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xf48eb6,_0x5c96ca){const _0x15a0e2=a164_0x55b4,_0x7312a8=_0xf48eb6();while(!![]){try{const _0x5e0057=parseInt(_0x15a0e2(0xda))/0x1+-parseInt(_0x15a0e2(0xe3))/0x2*(-parseInt(_0x15a0e2(0xed))/0x3)+parseInt(_0x15a0e2(0xf8))/0x4+parseInt(_0x15a0e2(0xca))/0x5*(-parseInt(_0x15a0e2(0xde))/0x6)+parseInt(_0x15a0e2(0xbf))/0x7+parseInt(_0x15a0e2(0xc2))/0x8*(parseInt(_0x15a0e2(0xd1))/0x9)+-parseInt(_0x15a0e2(0xd7))/0xa;if(_0x5e0057===_0x5c96ca)break;else _0x7312a8['push'](_0x7312a8['shift']());}catch(_0x17823e){_0x7312a8['push'](_0x7312a8['shift']());}}}(a164_0x536d,0x94940));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a164_0x31dccc}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(_0x5e528b,_0x4baba2,_0xa9dbd={}){const _0x437431=a164_0x55b4,_0x2d4f32=resolvePushDirectoryRoot(_0x5e528b),_0x4fe26e=readPushMetadataIfPresent(resolve(_0x2d4f32,METADATA_FILE),{'ignoreInvalidMetadata':_0xa9dbd[_0x437431(0xc3)]});if(_0x4fe26e?.[_0x437431(0xd6)]&&_0x4fe26e[_0x437431(0xd6)]!==_0x4baba2&&!_0xa9dbd[_0x437431(0xf5)]&&!_0xa9dbd[_0x437431(0xbe)])throw CliErrors['validation'](_0x437431(0xd3)+_0x4fe26e['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4baba2+'\x22.');const _0x527832=resolvePushSkillCode(_0x2d4f32,_0x4baba2,_0x4fe26e,_0xa9dbd);if(!_0x527832)throw CliErrors[_0x437431(0xbb)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x437431(0xe0));return{'dir':_0x2d4f32,'skillCode':_0x527832,'metadata':_0x4fe26e};}export function readPushDirectory(_0x4c0b49,_0x373803,_0x18295d={}){const _0x33fce9=a164_0x55b4,_0x4d9998=resolvePushDirectoryIdentity(_0x4c0b49,_0x373803,_0x18295d),_0x434908=_0x4d9998[_0x33fce9(0xe8)],_0x3f7ff8=resolve(_0x434908,SKILL_FILE);if(!existsSync(_0x3f7ff8)||!lstatSync(_0x3f7ff8)[_0x33fce9(0xcf)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0x3f7ff8);const _0x3e65ab=_0x4d9998[_0x33fce9(0xc9)],_0x2215d1=_0x18295d[_0x33fce9(0xe1)]??'personal';if(!_0x18295d[_0x33fce9(0xd0)]&&_0x3e65ab?.['scope']==='builtin')throw CliErrors[_0x33fce9(0xbb)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x3e65ab[_0x33fce9(0xc6)]+'\x22.');if(!_0x18295d['ignoreMetadataScope']&&_0x2215d1===_0x33fce9(0xe5)&&_0x3e65ab?.[_0x33fce9(0xc6)]&&_0x3e65ab[_0x33fce9(0xc6)]!==_0x33fce9(0xe5))throw CliErrors['validation'](_0x33fce9(0xd9)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x3e65ab[_0x33fce9(0xc6)]+'\x22.',_0x33fce9(0xf7)+_0x434908+_0x33fce9(0xea));const _0x53ef90=scanSkillDirectory(_0x434908,{'excludedFilePaths':_0x18295d[_0x33fce9(0xe2)]}),_0x1dff94=buildSkillPackage(_0x53ef90),_0x3de186=readFileSync(_0x3f7ff8,'utf8'),_0x2eb778=_0x4d9998[_0x33fce9(0xcd)],_0x3bb449=_0x18295d[_0x33fce9(0xeb)]?undefined:_0x3e65ab,_0x561653=readSkillDisplayName(_0x3de186);return{'skillCode':_0x2eb778,'metadata':_0x3e65ab,'frontmatterDisplayName':_0x561653,'input':{'skillCode':_0x2eb778,'skillName':_0x561653??_0x3bb449?.[_0x33fce9(0xf4)],'description':_0x3bb449?.[_0x33fce9(0xb7)],'content':_0x3de186,'files':_0x1dff94['manifest'],'packageBase64':_0x1dff94[_0x33fce9(0xd5)],'tags':_0x3bb449?.[_0x33fce9(0xef)],'version':_0x3bb449?.[_0x33fce9(0xf3)],'sourceSessionId':_0x3bb449?.[_0x33fce9(0xb9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3ad614,_0x4a9029,_0x562e5f,_0x1fd052={}){const _0xe2c561=a164_0x55b4,_0x1ec89a=resolvePushDirectoryRoot(_0x3ad614),_0x3a4bcb=readPushMetadataIfPresent(resolve(_0x1ec89a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x1ce5bf=requireRemoteScope(_0x4a9029),_0x2f7488=readLocalSkillContent(_0x1ec89a),_0x4adef4={..._0x4a9029,'appCode':_0x4a9029[_0xe2c561(0xd6)]??_0x562e5f,'skillName':_0x4a9029['skillName']??_0x3a4bcb?.['skillName'],'description':_0x4a9029[_0xe2c561(0xb7)]??_0x3a4bcb?.['description'],'example':_0x4a9029[_0xe2c561(0xc7)]??_0x3a4bcb?.[_0xe2c561(0xc7)],'tags':Array[_0xe2c561(0xe9)](_0x4a9029[_0xe2c561(0xef)])?_0x4a9029[_0xe2c561(0xef)]:_0x3a4bcb?.['tags'],'sourceSessionId':_0x4a9029['sourceSessionId']??_0x3a4bcb?.[_0xe2c561(0xb9)],'content':_0x4a9029[_0xe2c561(0xcc)]??_0x2f7488},_0x1ae23e=buildMetadata(_0x4adef4,_0x1ce5bf,_0x562e5f,contentHash(_0x2f7488),_0x1fd052[_0xe2c561(0xbd)]);writeJsonAtomic(resolve(_0x1ec89a,METADATA_FILE),_0x1ae23e);}export function recordPushedRuntimeSkill(_0x33b3c4,_0x13b32e,_0x57468c,_0x386615={}){const _0x3a4c0c=a164_0x55b4,_0x2661ef=resolvePushDirectoryRoot(_0x33b3c4),_0x439de9=scanSkillDirectory(_0x2661ef),_0x11d5e3=_0x439de9[_0x3a4c0c(0xe6)](_0x2c531e=>_0x2c531e[_0x3a4c0c(0xba)]===SKILL_FILE),_0x529eb0=_0x11d5e3?fileText(_0x11d5e3):'',_0x574de0=tryNormalizePackageManifest(_0x13b32e[_0x3a4c0c(0xc4)]),_0x8a8a0a={..._0x13b32e,'content':_0x13b32e[_0x3a4c0c(0xcc)]??_0x529eb0,'files':_0x574de0},_0xa3c9c8=_0x574de0?normalizeLocalFiles(_0x439de9)[_0x3a4c0c(0xcb)](_0x4d74b0=>_0x574de0[_0x3a4c0c(0xc4)][_0x3a4c0c(0xe7)](_0x4e0821=>_0x4e0821['path']===_0x4d74b0[_0x3a4c0c(0xba)])):undefined,_0x754dda=buildMetadata(_0x8a8a0a,_0x386615[_0x3a4c0c(0xc6)]??_0x3a4c0c(0xe5),_0x57468c,contentHash(_0x8a8a0a['content']??''),_0x386615[_0x3a4c0c(0xdc)],_0xa3c9c8);writeJsonAtomic(resolve(_0x2661ef,METADATA_FILE),_0x754dda);}function a164_0x55b4(_0x2b2b93,_0x329e36){_0x2b2b93=_0x2b2b93-0xb7;const _0x536d8c=a164_0x536d();let _0x55b4ff=_0x536d8c[_0x2b2b93];return _0x55b4ff;}export function deriveSkillCodeFromDirectory(_0x5af4d3,_0x4308e4){const _0x1dd363=a164_0x55b4,_0x2e03bb=basename(resolve(_0x5af4d3)),_0x25becf=_0x4308e4+'--';return _0x2e03bb[_0x1dd363(0xce)](_0x25becf)?_0x2e03bb[_0x1dd363(0xd2)](_0x25becf[_0x1dd363(0xbc)]):_0x2e03bb;}function resolvePushSkillCode(_0x32b4e6,_0x38f9fd,_0x310f27,_0x68f9b9){const _0xfb13a5=a164_0x55b4,_0x101526=deriveSkillCodeFromSkillFile(_0x32b4e6)||deriveSkillCodeFromDirectory(_0x32b4e6,_0x38f9fd);if(_0x68f9b9[_0xfb13a5(0xd4)])return _0x101526;return _0x310f27?.[_0xfb13a5(0xcd)]?.[_0xfb13a5(0xc1)]()||_0x101526;}function deriveSkillCodeFromSkillFile(_0x20580e){const _0x285b11=a164_0x55b4,_0x4c23d8=resolve(_0x20580e,SKILL_FILE);if(!existsSync(_0x4c23d8)||!lstatSync(_0x4c23d8)[_0x285b11(0xcf)]())return undefined;const _0x4a3f46=readFileSync(_0x4c23d8,_0x285b11(0xf0)),_0x42b7f5=_0x4a3f46[_0x285b11(0xf9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x42b7f5)return undefined;const _0x23fe1b=parseFrontmatterObject(_0x42b7f5[0x1]??''),_0x45ac68=scalarToString(_0x23fe1b?.['name']);return _0x45ac68?slugifySkillName(_0x45ac68):undefined;}function readSkillDisplayName(_0x5343ee){const _0x728b0e=a164_0x55b4,_0x423b3d=_0x5343ee[_0x728b0e(0xf9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x423b3d)return undefined;const _0x3fe5e5=parseFrontmatterObject(_0x423b3d[0x1]??'');return scalarToString(_0x3fe5e5?.['displayName']);}function slugifySkillName(_0x114751){const _0x1dfffe=a164_0x55b4,_0xfd5b93=_0x114751[_0x1dfffe(0xc1)]()[_0x1dfffe(0xc5)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x1dfffe(0xec)](/^-+/,'')['replace'](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0xfd5b93)throw CliErrors[_0x1dfffe(0xbb)](_0x1dfffe(0xc0)+SKILL_FILE+_0x1dfffe(0xe4));return _0xfd5b93;}function parseFrontmatterObject(_0x2707e3){const _0x5abc93=a164_0x55b4;try{const _0x1e3940=a164_0x31dccc(_0x2707e3);return _0x1e3940&&typeof _0x1e3940===_0x5abc93(0xf6)&&!Array[_0x5abc93(0xe9)](_0x1e3940)?_0x1e3940:undefined;}catch{return undefined;}}function scalarToString(_0x2e9cc8){const _0x438983=a164_0x55b4;if(typeof _0x2e9cc8===_0x438983(0xf1))return _0x2e9cc8[_0x438983(0xc1)]();if(typeof _0x2e9cc8===_0x438983(0xf2)||typeof _0x2e9cc8===_0x438983(0xdb))return String(_0x2e9cc8);return undefined;}function resolvePushDirectoryRoot(_0xad1fa9){const _0x2ed7c3=a164_0x55b4,_0x5df5f2=resolve(_0xad1fa9);if(!existsSync(_0x5df5f2))throw CliErrors[_0x2ed7c3(0xbb)](_0x2ed7c3(0xc8)+_0xad1fa9);const _0x4c3484=lstatSync(_0x5df5f2);if(_0x4c3484[_0x2ed7c3(0xd8)]())return _0x5df5f2;if(_0x4c3484[_0x2ed7c3(0xee)]()){const _0x487c65=realpathSync(_0x5df5f2);if(lstatSync(_0x487c65)[_0x2ed7c3(0xd8)]())return _0x487c65;}throw CliErrors[_0x2ed7c3(0xbb)](_0x2ed7c3(0xc8)+_0xad1fa9);}function a164_0x536d(){const _0x1f33d3=['skillName','allowAppCodeRetarget','object','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','1333108NDRZzD','match','description','\x20has\x20unsupported\x20scope\x20\x22','sourceSessionId','path','validation','length','refreshedAt','ignoreMetadataAppCodeMismatch','2615998GlrMOh','Invalid\x20','trim','192048hXKIPf','ignoreInvalidMetadata','files','toLowerCase','scope','example','Skill\x20directory\x20not\x20found:\x20','metadata','128700NBdxxa','filter','content','skillCode','startsWith','isFile','ignoreMetadataScope','207ixpBxR','slice','Skill\x20metadata\x20appCode\x20\x22','ignoreMetadataSkillCode','packageBase64','appCode','11364380BbjWnR','isDirectory','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','366318crxPfH','boolean','pushedAt','company','132ScYwOV','builtin',',\x20or\x20directory\x20name.','targetScope','excludedFilePaths','9206TmncCk','\x20name\x20for\x20SkillHub\x20slug\x20generation.','personal','find','some','dir','isArray','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','ignoreMetadataForPayload','replace','447bZxqen','isSymbolicLink','tags','utf8','string','number','version'];a164_0x536d=function(){return _0x1f33d3;};return a164_0x536d();}function requireRemoteScope(_0x16a0f8){const _0x3d0e52=a164_0x55b4;if(_0x16a0f8[_0x3d0e52(0xc6)]===_0x3d0e52(0xe5)||_0x16a0f8[_0x3d0e52(0xc6)]===_0x3d0e52(0xdd)||_0x16a0f8[_0x3d0e52(0xc6)]===_0x3d0e52(0xdf))return _0x16a0f8[_0x3d0e52(0xc6)];throw CliErrors[_0x3d0e52(0xbb)]('Remote\x20Skill\x20'+(_0x16a0f8['skillCode']||'(unknown)')+_0x3d0e52(0xb8)+(_0x16a0f8[_0x3d0e52(0xc6)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x2f7ba0){const _0x2db0cf=a164_0x55b4,_0x9e34f1=resolve(_0x2f7ba0,SKILL_FILE);return existsSync(_0x9e34f1)&&lstatSync(_0x9e34f1)[_0x2db0cf(0xcf)]()?readFileSync(_0x9e34f1,_0x2db0cf(0xf0)):'';}function readPushMetadataIfPresent(_0x40581a,_0x1d1ac4={}){try{return readMetadataIfPresent(_0x40581a);}catch(_0xd3636b){if(_0x1d1ac4['ignoreInvalidMetadata'])return undefined;throw _0xd3636b;}}
|
|
1
|
+
(function(_0x499886,_0x4933db){const _0x11d20c=a164_0x49f1,_0x5f0523=_0x499886();while(!![]){try{const _0x5bb67d=-parseInt(_0x11d20c(0x13c))/0x1*(-parseInt(_0x11d20c(0x12a))/0x2)+parseInt(_0x11d20c(0x13f))/0x3+-parseInt(_0x11d20c(0x131))/0x4*(-parseInt(_0x11d20c(0x15a))/0x5)+-parseInt(_0x11d20c(0x145))/0x6+parseInt(_0x11d20c(0x137))/0x7*(-parseInt(_0x11d20c(0x138))/0x8)+parseInt(_0x11d20c(0x141))/0x9*(-parseInt(_0x11d20c(0x165))/0xa)+parseInt(_0x11d20c(0x162))/0xb;if(_0x5bb67d===_0x4933db)break;else _0x5f0523['push'](_0x5f0523['shift']());}catch(_0xbcaf3d){_0x5f0523['push'](_0x5f0523['shift']());}}}(a164_0x3161,0xd0541));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a164_0x307041}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(_0x485e28,_0x3307a5,_0x218ee1={}){const _0x579e6c=a164_0x49f1,_0x1c1f6a=resolvePushDirectoryRoot(_0x485e28),_0x4cd4d8=readPushMetadataIfPresent(resolve(_0x1c1f6a,METADATA_FILE),{'ignoreInvalidMetadata':_0x218ee1[_0x579e6c(0x144)]});if(_0x4cd4d8?.[_0x579e6c(0x149)]&&_0x4cd4d8[_0x579e6c(0x149)]!==_0x3307a5&&!_0x218ee1[_0x579e6c(0x13d)]&&!_0x218ee1[_0x579e6c(0x133)])throw CliErrors[_0x579e6c(0x127)]('Skill\x20metadata\x20appCode\x20\x22'+_0x4cd4d8['appCode']+_0x579e6c(0x143)+_0x3307a5+'\x22.');const _0xd42bf7=resolvePushSkillCode(_0x1c1f6a,_0x3307a5,_0x4cd4d8,_0x218ee1);if(!_0xd42bf7)throw CliErrors['validation'](_0x579e6c(0x152)+SKILL_FILE+',\x20'+METADATA_FILE+_0x579e6c(0x12e));return{'dir':_0x1c1f6a,'skillCode':_0xd42bf7,'metadata':_0x4cd4d8};}function a164_0x3161(){const _0x174d1e=['targetScope','16121830vNSMzo','string','company','validation','path','slice','382lEwWbW','name','description','\x20name\x20for\x20SkillHub\x20slug\x20generation.',',\x20or\x20directory\x20name.','metadata','ignoreMetadataSkillCode','4BLgdqB','files','ignoreMetadataAppCodeMismatch','ignoreMetadataScope','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','excludedFilePaths','35nLiCxZ','570072CPYdSD','utf8','refreshedAt','skillCode','1787vnNNmA','allowAppCodeRetarget','personal','2966547kFciBX','dir','9fraVQR','isArray','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','ignoreInvalidMetadata','3889512xHAAzs','match','some','scope','appCode','packageBase64','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','builtin','replace','example','unknown','isSymbolicLink','\x20has\x20scope=\x22','Unable\x20to\x20resolve\x20skillCode\x20from\x20','isFile','isDirectory','find','trim','sourceSessionId','Invalid\x20','pushedAt','6148570KNjVdd','tags','startsWith','content','toLowerCase','ignoreMetadataForPayload','version','skillName','10011793ONmaPR','Skill\x20directory\x20not\x20found:\x20'];a164_0x3161=function(){return _0x174d1e;};return a164_0x3161();}export function readPushDirectory(_0x2ef02f,_0x5f1152,_0x1a35e6={}){const _0x2056b9=a164_0x49f1,_0x35f5de=resolvePushDirectoryIdentity(_0x2ef02f,_0x5f1152,_0x1a35e6),_0x39fde7=_0x35f5de[_0x2056b9(0x140)],_0x20759a=resolve(_0x39fde7,SKILL_FILE);if(!existsSync(_0x20759a)||!lstatSync(_0x20759a)[_0x2056b9(0x153)]())throw CliErrors[_0x2056b9(0x127)]('Missing\x20'+SKILL_FILE+':\x20'+_0x20759a);const _0x11b485=_0x35f5de[_0x2056b9(0x12f)],_0x104318=_0x1a35e6[_0x2056b9(0x164)]??_0x2056b9(0x13e);if(!_0x1a35e6[_0x2056b9(0x134)]&&_0x11b485?.[_0x2056b9(0x148)]===_0x2056b9(0x14c))throw CliErrors[_0x2056b9(0x127)](_0x2056b9(0x135)+METADATA_FILE+_0x2056b9(0x151)+_0x11b485[_0x2056b9(0x148)]+'\x22.');if(!_0x1a35e6[_0x2056b9(0x134)]&&_0x104318===_0x2056b9(0x13e)&&_0x11b485?.[_0x2056b9(0x148)]&&_0x11b485[_0x2056b9(0x148)]!=='personal')throw CliErrors[_0x2056b9(0x127)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x2056b9(0x151)+_0x11b485[_0x2056b9(0x148)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x39fde7+_0x2056b9(0x14b));const _0x3549ca=scanSkillDirectory(_0x39fde7,{'excludedFilePaths':_0x1a35e6[_0x2056b9(0x136)]}),_0x19d702=buildSkillPackage(_0x3549ca),_0x2e3a51=readFileSync(_0x20759a,_0x2056b9(0x139)),_0x333672=_0x35f5de[_0x2056b9(0x13b)],_0x3c7da2=_0x1a35e6[_0x2056b9(0x15f)]?undefined:_0x11b485,_0x50d3e0=readSkillDisplayName(_0x2e3a51);return{'skillCode':_0x333672,'metadata':_0x11b485,'frontmatterDisplayName':_0x50d3e0,'input':{'skillCode':_0x333672,'skillName':_0x50d3e0??_0x3c7da2?.[_0x2056b9(0x161)],'description':_0x3c7da2?.[_0x2056b9(0x12c)],'content':_0x2e3a51,'files':_0x19d702['manifest'],'packageBase64':_0x19d702[_0x2056b9(0x14a)],'tags':_0x3c7da2?.[_0x2056b9(0x15b)],'version':_0x3c7da2?.[_0x2056b9(0x160)],'sourceSessionId':_0x3c7da2?.[_0x2056b9(0x157)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x12d64b,_0x2497eb,_0x5dbb74,_0x55f023={}){const _0x3c0c3f=a164_0x49f1,_0x34bf75=resolvePushDirectoryRoot(_0x12d64b),_0x373def=readPushMetadataIfPresent(resolve(_0x34bf75,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4e17ff=requireRemoteScope(_0x2497eb),_0x5820cc=readLocalSkillContent(_0x34bf75),_0x43fba3={..._0x2497eb,'appCode':_0x2497eb[_0x3c0c3f(0x149)]??_0x5dbb74,'skillName':_0x2497eb['skillName']??_0x373def?.[_0x3c0c3f(0x161)],'description':_0x2497eb['description']??_0x373def?.[_0x3c0c3f(0x12c)],'example':_0x2497eb['example']??_0x373def?.[_0x3c0c3f(0x14e)],'tags':Array[_0x3c0c3f(0x142)](_0x2497eb['tags'])?_0x2497eb[_0x3c0c3f(0x15b)]:_0x373def?.[_0x3c0c3f(0x15b)],'sourceSessionId':_0x2497eb[_0x3c0c3f(0x157)]??_0x373def?.['sourceSessionId'],'content':_0x2497eb[_0x3c0c3f(0x15d)]??_0x5820cc},_0x5c58b4=buildMetadata(_0x43fba3,_0x4e17ff,_0x5dbb74,contentHash(_0x5820cc),_0x55f023[_0x3c0c3f(0x13a)]);writeJsonAtomic(resolve(_0x34bf75,METADATA_FILE),_0x5c58b4);}export function recordPushedRuntimeSkill(_0x2d0cf7,_0x2b290d,_0x4b00f7,_0x226983={}){const _0x3a0d82=a164_0x49f1,_0xa77bfc=resolvePushDirectoryRoot(_0x2d0cf7),_0x2a43a4=scanSkillDirectory(_0xa77bfc),_0x404d33=_0x2a43a4[_0x3a0d82(0x155)](_0x220bbc=>_0x220bbc[_0x3a0d82(0x128)]===SKILL_FILE),_0x18f979=_0x404d33?fileText(_0x404d33):'',_0x98d8b6=tryNormalizePackageManifest(_0x2b290d[_0x3a0d82(0x132)]),_0x47d96d={..._0x2b290d,'content':_0x2b290d[_0x3a0d82(0x15d)]??_0x18f979,'files':_0x98d8b6},_0x40ad7e=_0x98d8b6?normalizeLocalFiles(_0x2a43a4)['filter'](_0x187fd8=>_0x98d8b6[_0x3a0d82(0x132)][_0x3a0d82(0x147)](_0x45efb4=>_0x45efb4['path']===_0x187fd8[_0x3a0d82(0x128)])):undefined,_0x5b8279=buildMetadata(_0x47d96d,_0x226983[_0x3a0d82(0x148)]??_0x3a0d82(0x13e),_0x4b00f7,contentHash(_0x47d96d['content']??''),_0x226983[_0x3a0d82(0x159)],_0x40ad7e);writeJsonAtomic(resolve(_0xa77bfc,METADATA_FILE),_0x5b8279);}export function deriveSkillCodeFromDirectory(_0x77dbe4,_0x4fd55e){const _0x149f49=a164_0x49f1,_0x42738e=basename(resolve(_0x77dbe4)),_0x109ee2=_0x4fd55e+'--';return _0x42738e[_0x149f49(0x15c)](_0x109ee2)?_0x42738e[_0x149f49(0x129)](_0x109ee2['length']):_0x42738e;}function resolvePushSkillCode(_0x5cc35b,_0x1fe26f,_0x5cd007,_0x1b23cd){const _0x90a40a=a164_0x49f1,_0x369f93=deriveSkillCodeFromSkillFile(_0x5cc35b)||deriveSkillCodeFromDirectory(_0x5cc35b,_0x1fe26f);if(_0x1b23cd[_0x90a40a(0x130)])return _0x369f93;return _0x5cd007?.['skillCode']?.[_0x90a40a(0x156)]()||_0x369f93;}function deriveSkillCodeFromSkillFile(_0x139495){const _0x45b688=a164_0x49f1,_0x423ab1=resolve(_0x139495,SKILL_FILE);if(!existsSync(_0x423ab1)||!lstatSync(_0x423ab1)['isFile']())return undefined;const _0x2f8717=readFileSync(_0x423ab1,_0x45b688(0x139)),_0x3cc614=_0x2f8717[_0x45b688(0x146)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3cc614)return undefined;const _0x3d49d8=parseFrontmatterObject(_0x3cc614[0x1]??''),_0x3cef92=scalarToString(_0x3d49d8?.[_0x45b688(0x12b)]);return _0x3cef92?slugifySkillName(_0x3cef92):undefined;}function a164_0x49f1(_0xab9aa4,_0x523c07){_0xab9aa4=_0xab9aa4-0x127;const _0x3161f9=a164_0x3161();let _0x49f13b=_0x3161f9[_0xab9aa4];return _0x49f13b;}function readSkillDisplayName(_0x343732){const _0x4d1e27=a164_0x49f1,_0x14f5ab=_0x343732[_0x4d1e27(0x146)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x14f5ab)return undefined;const _0x13359b=parseFrontmatterObject(_0x14f5ab[0x1]??'');return scalarToString(_0x13359b?.['displayName']);}function slugifySkillName(_0x1035d4){const _0x4d59de=a164_0x49f1,_0x177714=_0x1035d4[_0x4d59de(0x156)]()[_0x4d59de(0x15e)]()[_0x4d59de(0x14d)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4d59de(0x14d)](/^-+/,'')['replace'](/-+$/,'')[_0x4d59de(0x14d)](/-{2,}/g,'-');if(!_0x177714)throw CliErrors[_0x4d59de(0x127)](_0x4d59de(0x158)+SKILL_FILE+_0x4d59de(0x12d));return _0x177714;}function parseFrontmatterObject(_0x245546){const _0x2fff61=a164_0x49f1;try{const _0x4f0609=a164_0x307041(_0x245546);return _0x4f0609&&typeof _0x4f0609==='object'&&!Array[_0x2fff61(0x142)](_0x4f0609)?_0x4f0609:undefined;}catch{return undefined;}}function scalarToString(_0x3de76b){const _0x21e985=a164_0x49f1;if(typeof _0x3de76b===_0x21e985(0x166))return _0x3de76b[_0x21e985(0x156)]();if(typeof _0x3de76b==='number'||typeof _0x3de76b==='boolean')return String(_0x3de76b);return undefined;}function resolvePushDirectoryRoot(_0x43f1b4){const _0x184a72=a164_0x49f1,_0x254a5a=resolve(_0x43f1b4);if(!existsSync(_0x254a5a))throw CliErrors[_0x184a72(0x127)](_0x184a72(0x163)+_0x43f1b4);const _0x2a98eb=lstatSync(_0x254a5a);if(_0x2a98eb[_0x184a72(0x154)]())return _0x254a5a;if(_0x2a98eb[_0x184a72(0x150)]()){const _0x46d066=realpathSync(_0x254a5a);if(lstatSync(_0x46d066)['isDirectory']())return _0x46d066;}throw CliErrors['validation'](_0x184a72(0x163)+_0x43f1b4);}function requireRemoteScope(_0x4443ec){const _0x4079b2=a164_0x49f1;if(_0x4443ec[_0x4079b2(0x148)]===_0x4079b2(0x13e)||_0x4443ec['scope']===_0x4079b2(0x167)||_0x4443ec[_0x4079b2(0x148)]===_0x4079b2(0x14c))return _0x4443ec['scope'];throw CliErrors[_0x4079b2(0x127)]('Remote\x20Skill\x20'+(_0x4443ec[_0x4079b2(0x13b)]||'(unknown)')+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x4443ec[_0x4079b2(0x148)]??_0x4079b2(0x14f))+'\x22.');}function readLocalSkillContent(_0x283907){const _0x4f24ee=a164_0x49f1,_0x2e317a=resolve(_0x283907,SKILL_FILE);return existsSync(_0x2e317a)&&lstatSync(_0x2e317a)[_0x4f24ee(0x153)]()?readFileSync(_0x2e317a,_0x4f24ee(0x139)):'';}function readPushMetadataIfPresent(_0x2ea7da,_0x440026={}){const _0x2297c6=a164_0x49f1;try{return readMetadataIfPresent(_0x2ea7da);}catch(_0x17c16b){if(_0x440026[_0x2297c6(0x144)])return undefined;throw _0x17c16b;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x560ab2,_0xef2d2b){const _0x34dc44=a165_0x7d23,_0x48b58e=_0x560ab2();while(!![]){try{const _0x555539=-parseInt(_0x34dc44(0xea))/0x1+-parseInt(_0x34dc44(0xed))/0x2+parseInt(_0x34dc44(0xf7))/0x3*(-parseInt(_0x34dc44(0xf8))/0x4)+parseInt(_0x34dc44(0xec))/0x5+parseInt(_0x34dc44(0xef))/0x6*(-parseInt(_0x34dc44(0xf3))/0x7)+parseInt(_0x34dc44(0xf9))/0x8+parseInt(_0x34dc44(0xf2))/0x9*(parseInt(_0x34dc44(0xf6))/0xa);if(_0x555539===_0xef2d2b)break;else _0x48b58e['push'](_0x48b58e['shift']());}catch(_0x2b395d){_0x48b58e['push'](_0x48b58e['shift']());}}}(a165_0x3c8c,0x9b706));import{CliErrors}from'../../errors.js';function a165_0x7d23(_0xbfca9e,_0x2ee26b){_0xbfca9e=_0xbfca9e-0xe9;const _0x3c8cc7=a165_0x3c8c();let _0x7d23f3=_0x3c8cc7[_0xbfca9e];return _0x7d23f3;}export function normalizeRuntimeSkillScopes(_0x346728){const _0x576d35=a165_0x7d23,_0x34bf0e=_0x346728&&_0x346728[_0x576d35(0xf5)]>0x0?_0x346728:['personal',_0x576d35(0xe9),_0x576d35(0xee)],_0x503a2e=[];for(const _0xed84b2 of _0x34bf0e){if(!isRuntimeSkillScope(_0xed84b2))throw CliErrors[_0x576d35(0xf0)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0xed84b2);!_0x503a2e[_0x576d35(0xeb)](_0xed84b2)&&_0x503a2e[_0x576d35(0xf4)](_0xed84b2);}return _0x503a2e;}export function isRuntimeSkillScope(_0x5e1351){const _0xe2a155=a165_0x7d23;return _0x5e1351===_0xe2a155(0xf1)||_0x5e1351==='company'||_0x5e1351===_0xe2a155(0xee);}function a165_0x3c8c(){const _0x4e3d84=['30xjRDyV','validation','personal','14499279QDmeJa','1434041bELLsx','push','length','10WWwSiX','853020dNepid','4qMmZwQ','7950328NvJfcc','company','514098JLjRrF','includes','3253420jWJHyI','1592150FayVYu','builtin'];a165_0x3c8c=function(){return _0x4e3d84;};return a165_0x3c8c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a167_0x57fa41=a167_0x2fb9;function a167_0x27fa(){const _0x123919=['code','name','from','1467rkOnmk','sort','5188ViDvyG','path','312MnJPJR','4022JxfSfY','495yOefJk','1980-01-01T00:00:00.000Z','464470FTItWv','validation','103ffQBGh','5958804MjVJWu','217287jHCLJE','8333136JElMEj','length','endsWith','1290350Svjgdn'];a167_0x27fa=function(){return _0x123919;};return a167_0x27fa();}(function(_0x1ed81a,_0x52d238){const _0x440db3=a167_0x2fb9,_0x52fb16=_0x1ed81a();while(!![]){try{const _0x3bba24=parseInt(_0x440db3(0x1ea))/0x1*(-parseInt(_0x440db3(0x1e5))/0x2)+parseInt(_0x440db3(0x1f4))/0x3*(-parseInt(_0x440db3(0x1f6))/0x4)+parseInt(_0x440db3(0x1f0))/0x5+-parseInt(_0x440db3(0x1eb))/0x6+parseInt(_0x440db3(0x1ec))/0x7*(parseInt(_0x440db3(0x1e4))/0x8)+-parseInt(_0x440db3(0x1ed))/0x9+-parseInt(_0x440db3(0x1e8))/0xa*(-parseInt(_0x440db3(0x1e6))/0xb);if(_0x3bba24===_0x52d238)break;else _0x52fb16['push'](_0x52fb16['shift']());}catch(_0x45c061){_0x52fb16['push'](_0x52fb16['shift']());}}}(a167_0x27fa,0xc2eac));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a167_0x57fa41(0x1e7));export function createDeterministicZipPackage(_0x5685f3){const _0x187e49=a167_0x57fa41,_0x57a964={};for(const _0x7c75c9 of normalizeLocalFiles(_0x5685f3)){_0x57a964[_0x7c75c9[_0x187e49(0x1f7)]]=fileContent(_0x7c75c9);}return Buffer['from'](zipSync(_0x57a964,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x42ae8a){const _0x200755=a167_0x57fa41;if(_0x42ae8a[_0x200755(0x1ee)]<0x16)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x15e511;try{_0x15e511=unzipSync(_0x42ae8a,{'filter'(_0x43ba4d){const _0x47b3f2=_0x200755,_0x4e64a2=normalizeSkillRelativePath(_0x43ba4d[_0x47b3f2(0x1f2)]);if(_0x4e64a2[_0x47b3f2(0x1ef)]('/'))throw CliErrors[_0x47b3f2(0x1e9)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x4e64a2);return!![];}});}catch(_0x64f3af){if(isRuntimeSkillValidationError(_0x64f3af))throw _0x64f3af;throw CliErrors[_0x200755(0x1e9)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x15e511)['map'](([_0x4b73a1,_0x3c0e49])=>({'path':normalizeSkillRelativePath(_0x4b73a1),'bytes':Buffer[_0x200755(0x1f3)](_0x3c0e49)}))[_0x200755(0x1f5)](compareSkillFiles);}function a167_0x2fb9(_0x4ed9ca,_0x519e23){_0x4ed9ca=_0x4ed9ca-0x1e4;const _0x27fa53=a167_0x27fa();let _0x2fb98e=_0x27fa53[_0x4ed9ca];return _0x2fb98e;}function isRuntimeSkillValidationError(_0xe3cdd6){const _0x2fcea5=a167_0x57fa41;return typeof _0xe3cdd6==='object'&&_0xe3cdd6!==null&&'code'in _0xe3cdd6&&_0xe3cdd6[_0x2fcea5(0x1f1)]==='validation_error';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x58ab99,_0x33d7ee){const _0x1a7d97=a168_0x8f34,_0x313b97=_0x58ab99();while(!![]){try{const _0x120353=-parseInt(_0x1a7d97(0x146))/0x1+-parseInt(_0x1a7d97(0x149))/0x2*(-parseInt(_0x1a7d97(0x14c))/0x3)+parseInt(_0x1a7d97(0x15a))/0x4+-parseInt(_0x1a7d97(0x15f))/0x5+-parseInt(_0x1a7d97(0x161))/0x6+-parseInt(_0x1a7d97(0x13c))/0x7*(parseInt(_0x1a7d97(0x164))/0x8)+parseInt(_0x1a7d97(0x13d))/0x9*(parseInt(_0x1a7d97(0x139))/0xa);if(_0x120353===_0x33d7ee)break;else _0x313b97['push'](_0x313b97['shift']());}catch(_0x1cfe21){_0x313b97['push'](_0x313b97['shift']());}}}(a168_0x359f,0x47069));import{CliErrors}from'../../errors.js';function a168_0x8f34(_0x3b7090,_0x225a1c){_0x3b7090=_0x3b7090-0x139;const _0x359f93=a168_0x359f();let _0x8f34e6=_0x359f93[_0x3b7090];return _0x8f34e6;}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(_0x11d134){const _0x16904b=a168_0x8f34,_0x4b1735=normalizeLocalFiles(_0x11d134);if(!_0x4b1735[_0x16904b(0x15e)](_0x458b02=>_0x458b02[_0x16904b(0x13f)]===SKILL_FILE))throw CliErrors[_0x16904b(0x13b)](_0x16904b(0x15c)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x4b2a40=localFilesToManifestFiles(_0x4b1735),_0x4915db=createDeterministicZipPackage(_0x4b1735);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x4b2a40),'zipSha256':bufferSha256(_0x4915db),'zipSize':_0x4915db[_0x16904b(0x158)],'files':_0x4b2a40},'packageBytes':_0x4915db,'packageBase64':_0x4915db[_0x16904b(0x142)](_0x16904b(0x162))};}export function verifyRuntimeSkillPackage(_0x22f703,_0x5b0f9e){const _0x10f8a0=a168_0x8f34,_0x2a454e=normalizePackageManifest(_0x22f703,{'requireOssPath':![]});if(!_0x2a454e)throw CliErrors[_0x10f8a0(0x13b)](_0x10f8a0(0x141));return extractAndVerifyPackage(_0x2a454e,_0x5b0f9e);}export function verifyRuntimeSkillBundle(_0x54fae1,_0x2e8f03){const _0x348a72=a168_0x8f34,_0x488571=normalizePackageManifest(_0x54fae1,{'requireOssPath':![]});if(!_0x488571)throw CliErrors[_0x348a72(0x13b)](_0x348a72(0x141));return extractAndVerifyPackageFiles(_0x488571,_0x2e8f03);}export function tryNormalizePackageManifest(_0x269fd8){return normalizePackageManifest(_0x269fd8,{'requireOssPath':![]});}export function requirePackageBytes(_0x5a1237,_0x1e8fd6){const _0x47978e=a168_0x8f34;if(!_0x1e8fd6||_0x1e8fd6[_0x47978e(0x158)]===0x0)throw CliErrors['validation'](_0x47978e(0x14b)+_0x5a1237);return _0x1e8fd6;}export function extractDownloadedPackage(_0x5ba770){const _0x5183e1=a168_0x8f34,_0x535abf=parseZipPackage(_0x5ba770)['map'](_0x43bb10=>({'path':_0x43bb10[_0x5183e1(0x13f)],'bytes':_0x43bb10[_0x5183e1(0x145)]}));if(!_0x535abf[_0x5183e1(0x15e)](_0x576065=>_0x576065[_0x5183e1(0x13f)]===SKILL_FILE))throw CliErrors[_0x5183e1(0x13b)](_0x5183e1(0x13a)+SKILL_FILE+'.');return normalizeLocalFiles(_0x535abf);}export function localFilesToManifestFiles(_0x437358){const _0x3f9ed1=a168_0x8f34;return normalizeLocalFiles(_0x437358)[_0x3f9ed1(0x143)](_0x42e04b=>({'path':_0x42e04b['path'],'sha256':fileHash(_0x42e04b),'size':fileContent(_0x42e04b)[_0x3f9ed1(0x158)]}));}function normalizePackageManifest(_0x5c556d,_0x48a425){const _0x3e71d8=a168_0x8f34;if(!_0x5c556d||typeof _0x5c556d!==_0x3e71d8(0x13e)||Array[_0x3e71d8(0x14d)](_0x5c556d))return undefined;const _0x3783f6=_0x5c556d,_0x4c80c9=typeof _0x3783f6[_0x3e71d8(0x166)]===_0x3e71d8(0x165)?_0x3783f6[_0x3e71d8(0x166)][_0x3e71d8(0x156)]():undefined;if(_0x48a425['requireOssPath']&&!_0x4c80c9)return undefined;if(!Array[_0x3e71d8(0x14d)](_0x3783f6[_0x3e71d8(0x15d)])||_0x3783f6[_0x3e71d8(0x15d)][_0x3e71d8(0x158)]===0x0)return undefined;if(!isSha256Hex(_0x3783f6[_0x3e71d8(0x144)]))throw CliErrors[_0x3e71d8(0x13b)](_0x3e71d8(0x153));if(!isSha256Hex(_0x3783f6[_0x3e71d8(0x151)]))throw CliErrors[_0x3e71d8(0x13b)](_0x3e71d8(0x159));if(!Number[_0x3e71d8(0x154)](_0x3783f6['zipSize'])||_0x3783f6[_0x3e71d8(0x157)]<0x0)throw CliErrors[_0x3e71d8(0x13b)](_0x3e71d8(0x167));const _0x2559a9=normalizeManifestFiles(_0x3783f6['files']);if(!_0x2559a9[_0x3e71d8(0x15e)](_0x39cb0c=>_0x39cb0c['path']===SKILL_FILE))throw CliErrors[_0x3e71d8(0x13b)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x5bbc7b=fileTreeHash(_0x2559a9);if(_0x5bbc7b!==_0x3783f6[_0x3e71d8(0x144)][_0x3e71d8(0x14e)]())throw CliErrors['validation'](_0x3e71d8(0x140));return{'schemaVersion':Number[_0x3e71d8(0x154)](_0x3783f6[_0x3e71d8(0x160)])?_0x3783f6[_0x3e71d8(0x160)]:0x2,'ossPath':_0x4c80c9,'treeSha256':_0x5bbc7b,'zipSha256':_0x3783f6['zipSha256'][_0x3e71d8(0x14e)](),'zipSize':_0x3783f6['zipSize'],'files':_0x2559a9};}function extractAndVerifyPackage(_0x45b57d,_0xfd1f07){const _0x5641a8=a168_0x8f34,_0x3db27c=normalizePackageManifest(_0x45b57d,{'requireOssPath':![]});if(!_0x3db27c)throw CliErrors[_0x5641a8(0x13b)](_0x5641a8(0x141));if(_0xfd1f07[_0x5641a8(0x158)]!==_0x3db27c['zipSize'])throw CliErrors[_0x5641a8(0x13b)](_0x5641a8(0x147));const _0x1b2382=bufferSha256(_0xfd1f07);if(_0x1b2382!==_0x3db27c['zipSha256'])throw CliErrors[_0x5641a8(0x13b)](_0x5641a8(0x148));return extractAndVerifyPackageFiles(_0x3db27c,_0xfd1f07);}function extractAndVerifyPackageFiles(_0x24c047,_0x48da91){const _0x283cfe=a168_0x8f34,_0x7eca36=parseZipPackage(_0x48da91);if(_0x7eca36[_0x283cfe(0x158)]!==_0x24c047[_0x283cfe(0x15d)][_0x283cfe(0x158)])throw CliErrors[_0x283cfe(0x13b)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x3dcf8d=new Map();for(const _0x29906a of _0x7eca36){if(_0x3dcf8d[_0x283cfe(0x15b)](_0x29906a['path']))throw CliErrors['validation'](_0x283cfe(0x168)+_0x29906a[_0x283cfe(0x13f)]);_0x3dcf8d[_0x283cfe(0x163)](_0x29906a[_0x283cfe(0x13f)],_0x29906a);}const _0x4d388f=[];for(const _0x5921f4 of _0x24c047[_0x283cfe(0x15d)]){const _0x224fe1=_0x3dcf8d['get'](_0x5921f4['path']);if(!_0x224fe1)throw CliErrors[_0x283cfe(0x13b)](_0x283cfe(0x150)+_0x5921f4[_0x283cfe(0x13f)]);if(_0x224fe1[_0x283cfe(0x145)][_0x283cfe(0x158)]!==_0x5921f4[_0x283cfe(0x155)])throw CliErrors[_0x283cfe(0x13b)](_0x283cfe(0x14a)+_0x5921f4['path']);const _0x2b74f3=bufferSha256(_0x224fe1[_0x283cfe(0x145)]);if(_0x2b74f3!==_0x5921f4[_0x283cfe(0x152)])throw CliErrors[_0x283cfe(0x13b)](_0x283cfe(0x14f)+_0x5921f4[_0x283cfe(0x13f)]);_0x4d388f['push']({'path':_0x5921f4[_0x283cfe(0x13f)],'bytes':_0x224fe1[_0x283cfe(0x145)]});}return normalizeLocalFiles(_0x4d388f);}function a168_0x359f(){const _0xfd51b=['schemaVersion','1529220lVpXAZ','base64','set','81952ITXNML','string','ossPath','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Duplicate\x20Skill\x20package\x20entry:\x20','3020kPbxTQ','Runtime\x20Skill\x20package\x20is\x20missing\x20','validation','266pSmzTB','26658WwoPwc','object','path','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','toString','map','treeSha256','bytes','413248VEXPZw','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','3706WRaZSr','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','441JyiUrw','isArray','toLowerCase','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','zipSha256','sha256','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','isSafeInteger','size','trim','zipSize','length','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','2245740TEEoNj','has','Missing\x20','files','some','1900195acBjIg'];a168_0x359f=function(){return _0xfd51b;};return a168_0x359f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d6f2a,_0xa3ec63){var _0x136cc4=a169_0x5bab,_0x1a1c13=_0x2d6f2a();while(!![]){try{var _0x128bdd=-parseInt(_0x136cc4(0x150))/0x1*(-parseInt(_0x136cc4(0x153))/0x2)+parseInt(_0x136cc4(0x152))/0x3+-parseInt(_0x136cc4(0x14d))/0x4*(-parseInt(_0x136cc4(0x14b))/0x5)+parseInt(_0x136cc4(0x155))/0x6+parseInt(_0x136cc4(0x14c))/0x7*(-parseInt(_0x136cc4(0x154))/0x8)+-parseInt(_0x136cc4(0x14f))/0x9*(-parseInt(_0x136cc4(0x151))/0xa)+parseInt(_0x136cc4(0x14e))/0xb*(-parseInt(_0x136cc4(0x156))/0xc);if(_0x128bdd===_0xa3ec63)break;else _0x1a1c13['push'](_0x1a1c13['shift']());}catch(_0x1e10e3){_0x1a1c13['push'](_0x1a1c13['shift']());}}}(a169_0x4a44,0x7691f));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a169_0x4a44(){var _0x5ba123=['305rycpxB','10iojCgd','2037294KYlwwQ','586lIMfGB','8rlXSpr','1988592AvfbWi','5924988qiyIzm','25ByrfUP','6610429LDiZlM','471776ebnBnJ','22ilCxSt','6551037ccOFgX'];a169_0x4a44=function(){return _0x5ba123;};return a169_0x4a44();}function a169_0x5bab(_0x936f20,_0xfb02db){_0x936f20=_0x936f20-0x14b;var _0x4a449d=a169_0x4a44();var _0x5bab09=_0x4a449d[_0x936f20];return _0x5bab09;}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 a170_0x37730c=a170_0x208a;(function(_0x1000e7,_0x1528e0){const _0x4873bd=a170_0x208a,_0x4e5070=_0x1000e7();while(!![]){try{const _0x3a054a=-parseInt(_0x4873bd(0x1d0))/0x1+parseInt(_0x4873bd(0x1d3))/0x2*(-parseInt(_0x4873bd(0x1d2))/0x3)+parseInt(_0x4873bd(0x1eb))/0x4+-parseInt(_0x4873bd(0x1e9))/0x5+-parseInt(_0x4873bd(0x1cc))/0x6*(parseInt(_0x4873bd(0x1e1))/0x7)+parseInt(_0x4873bd(0x1d6))/0x8*(-parseInt(_0x4873bd(0x1d9))/0x9)+parseInt(_0x4873bd(0x1ed))/0xa;if(_0x3a054a===_0x1528e0)break;else _0x4e5070['push'](_0x4e5070['shift']());}catch(_0x3f35f3){_0x4e5070['push'](_0x4e5070['shift']());}}}(a170_0xb572,0xe6aa0));function a170_0x208a(_0x38ed1b,_0x3a89dd){_0x38ed1b=_0x38ed1b-0x1cc;const _0xb57222=a170_0xb572();let _0x208a36=_0xb57222[_0x38ed1b];return _0x208a36;}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a170_0x37730c(0x1e6));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a170_0x37730c(0x1d7),a170_0x37730c(0x1d4)),join(a170_0x37730c(0x1e3),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x5d80ab,_0x5e465a){const _0x211ccd=a170_0x37730c;if(!existsSync(_0x5d80ab))return{'kind':'not-recorded'};let _0xfc32c7;try{_0xfc32c7=JSON[_0x211ccd(0x1d1)](readFileSync(_0x5d80ab,'utf8'));}catch(_0x3d37a0){return{'kind':_0x211ccd(0x1d8),'reason':_0x5d80ab+'\x20is\x20unreadable:\x20'+_0x3d37a0[_0x211ccd(0x1ee)]};}const _0x237674=_0xfc32c7;if(typeof _0x237674?.[_0x211ccd(0x1da)]!==_0x211ccd(0x1ce)||!SUPPORTED_LOCK_VERSIONS['includes'](_0x237674[_0x211ccd(0x1da)]))return{'kind':_0x211ccd(0x1d8),'reason':_0x5d80ab+'\x20uses\x20unsupported\x20version\x20'+String(_0x237674?.[_0x211ccd(0x1da)])};if(!_0x237674[_0x211ccd(0x1d4)]||typeof _0x237674[_0x211ccd(0x1d4)]!=='object')return{'kind':'unusable','reason':_0x5d80ab+_0x211ccd(0x1e7)};return _0x237674[_0x211ccd(0x1d4)][_0x5e465a]?{'kind':'recorded'}:{'kind':_0x211ccd(0x1e5)};}export function resolveInstalledSkill(_0x15e0b7,_0x1278d8){const _0x1f086d=a170_0x37730c,_0x3ad1a7=_0x1278d8?.[_0x1f086d(0x1de)]??homedir(),_0x27a0c8=_0x1278d8?.[_0x1f086d(0x1dc)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x1f086d(0x1ea)](_0x5e56c4=>join(_0x3ad1a7,_0x5e56c4)),_0x1595d6=_0x1278d8?.[_0x1f086d(0x1ec)]??join(_0x3ad1a7,SKILL_LOCK_RELATIVE_PATH),_0x42ae69=_0x27a0c8[_0x1f086d(0x1ea)](_0x385f78=>join(_0x385f78,_0x15e0b7,_0x1f086d(0x1db))),_0x18cdd0=_0x42ae69[_0x1f086d(0x1d5)](_0x2713e5=>existsSync(_0x2713e5));if(_0x18cdd0)return{'state':_0x1f086d(0x1cf),'path':_0x18cdd0};const _0x2abf0a=readLockLookup(_0x1595d6,_0x15e0b7);if(_0x2abf0a[_0x1f086d(0x1e0)]===_0x1f086d(0x1d8))return{'state':_0x1f086d(0x1dd),'reason':_0x2abf0a['reason']};if(_0x2abf0a[_0x1f086d(0x1e0)]===_0x1f086d(0x1cd))return{'state':_0x1f086d(0x1dd),'reason':_0x1595d6+_0x1f086d(0x1e8)+_0x15e0b7+_0x1f086d(0x1e2)+('('+_0x42ae69[_0x1f086d(0x1df)](',\x20')+')')};return{'state':_0x1f086d(0x1e4),'checked':_0x42ae69};}function a170_0xb572(){const _0x4fe652=['4607946OCgehy','version','SKILL.md','globalSkillsDirs','unverifiable','home','join','kind','402521wccklw','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','.claude','absent','not-recorded','.skill-lock.json','\x20has\x20no\x20skills\x20map','\x20records\x20\x22','4932230vvzJmm','map','2592944WGrMZj','lockFile','58118780rPrVYs','message','150FbpFFv','recorded','number','present','1888970QfeKaD','parse','107001aULCLO','10ihFIZW','skills','find','16exnrqX','.agents','unusable'];a170_0xb572=function(){return _0x4fe652;};return a170_0xb572();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a171_0x337478=a171_0x36b3;function a171_0x5275(){const _0x25a143=['map','2371200krgNzZ','string','991472LBDIIE','prototype','hasOwnProperty','apps','slice','length','fromEntries','9040bhryVz','repeat','38734HQQuGq','5TbEPdb','accessKey','call','<redacted>','1035Vlbylq','1095972oxRqSF','isArray','test','799290IZZADe','7wgeQhP','object','1204021vWhThd'];a171_0x5275=function(){return _0x25a143;};return a171_0x5275();}(function(_0x2daa91,_0x548570){const _0x52bfa7=a171_0x36b3,_0x449767=_0x2daa91();while(!![]){try{const _0x120181=parseInt(_0x52bfa7(0x12b))/0x1*(parseInt(_0x52bfa7(0x13a))/0x2)+parseInt(_0x52bfa7(0x12a))/0x3+-parseInt(_0x52bfa7(0x131))/0x4+-parseInt(_0x52bfa7(0x13b))/0x5*(-parseInt(_0x52bfa7(0x127))/0x6)+parseInt(_0x52bfa7(0x12d))/0x7+parseInt(_0x52bfa7(0x138))/0x8*(-parseInt(_0x52bfa7(0x13f))/0x9)+-parseInt(_0x52bfa7(0x12f))/0xa;if(_0x120181===_0x548570)break;else _0x449767['push'](_0x449767['shift']());}catch(_0x584538){_0x449767['push'](_0x449767['shift']());}}}(a171_0x5275,0x2299e));const REDACTED_ACCESS_KEY=a171_0x337478(0x13e);export function maskCliAccessKey(_0x41941f){const _0x18ca17=a171_0x337478;if(typeof _0x41941f!==_0x18ca17(0x130)||_0x41941f[_0x18ca17(0x136)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x41941f[_0x18ca17(0x135)](0x0,0x8)+'*'[_0x18ca17(0x139)](_0x41941f[_0x18ca17(0x136)]-0x8);}export function redactCliConfigCredentials(_0x3e42ee){const _0x1b96d6=a171_0x337478,_0x3c96aa={..._0x3e42ee};return Object[_0x1b96d6(0x132)][_0x1b96d6(0x133)][_0x1b96d6(0x13d)](_0x3c96aa,_0x1b96d6(0x13c))&&(_0x3c96aa[_0x1b96d6(0x13c)]=maskCliAccessKey(_0x3c96aa['accessKey'])),_0x3c96aa[_0x1b96d6(0x134)]&&typeof _0x3c96aa['apps']===_0x1b96d6(0x12c)&&!Array[_0x1b96d6(0x128)](_0x3c96aa[_0x1b96d6(0x134)])&&(_0x3c96aa[_0x1b96d6(0x134)]=redactLegacyAppCredentials(_0x3c96aa[_0x1b96d6(0x134)])),_0x3c96aa;}export function redactCliConfigValue(_0x58f1bf,_0x39970b){const _0x20f767=a171_0x337478;if(_0x58f1bf===_0x20f767(0x13c)||/^apps\.[^.]+\.accessKey$/[_0x20f767(0x129)](_0x58f1bf))return maskCliAccessKey(_0x39970b);if(_0x58f1bf==='apps'&&_0x39970b&&typeof _0x39970b===_0x20f767(0x12c)&&!Array[_0x20f767(0x128)](_0x39970b))return redactLegacyAppCredentials(_0x39970b);if(/^apps\.[^.]+$/[_0x20f767(0x129)](_0x58f1bf)&&_0x39970b&&typeof _0x39970b==='object'&&!Array[_0x20f767(0x128)](_0x39970b)){const _0x499a53=_0x39970b;return Object[_0x20f767(0x132)][_0x20f767(0x133)]['call'](_0x499a53,'accessKey')?{..._0x499a53,'accessKey':maskCliAccessKey(_0x499a53[_0x20f767(0x13c)])}:_0x39970b;}return _0x39970b;}function a171_0x36b3(_0x200442,_0xe2ee3e){_0x200442=_0x200442-0x127;const _0x5275d3=a171_0x5275();let _0x36b3f0=_0x5275d3[_0x200442];return _0x36b3f0;}function redactLegacyAppCredentials(_0x410f86){const _0x220789=a171_0x337478;return Object[_0x220789(0x137)](Object['entries'](_0x410f86)[_0x220789(0x12e)](([_0x43d663,_0x49cb1b])=>{const _0x25cf8c=_0x220789;if(!_0x49cb1b||typeof _0x49cb1b!==_0x25cf8c(0x12c)||Array['isArray'](_0x49cb1b))return[_0x43d663,_0x49cb1b];const _0x1e14ac={..._0x49cb1b};return Object[_0x25cf8c(0x132)][_0x25cf8c(0x133)][_0x25cf8c(0x13d)](_0x1e14ac,'accessKey')&&(_0x1e14ac[_0x25cf8c(0x13c)]=maskCliAccessKey(_0x1e14ac[_0x25cf8c(0x13c)])),[_0x43d663,_0x1e14ac];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x433548,_0x2ca519){const _0x28fe68=a172_0x1830,_0x5eb477=_0x433548();while(!![]){try{const _0x209760=parseInt(_0x28fe68(0x1ed))/0x1*(parseInt(_0x28fe68(0x1ea))/0x2)+-parseInt(_0x28fe68(0x1ef))/0x3+parseInt(_0x28fe68(0x1f0))/0x4+-parseInt(_0x28fe68(0x1e8))/0x5+-parseInt(_0x28fe68(0x1e7))/0x6+-parseInt(_0x28fe68(0x1eb))/0x7*(-parseInt(_0x28fe68(0x1ee))/0x8)+parseInt(_0x28fe68(0x1ec))/0x9*(parseInt(_0x28fe68(0x1e9))/0xa);if(_0x209760===_0x2ca519)break;else _0x5eb477['push'](_0x5eb477['shift']());}catch(_0x1a634f){_0x5eb477['push'](_0x5eb477['shift']());}}}(a172_0xa50d,0x4c8d7));function a172_0xa50d(){const _0xa3381e=['548010pGbfRT','1918MMImBr','142713Biitgu','1VElFdv','1448VXXcwV','1001031GPdsFQ','691820UtjHNv','3158502MjHekD','1292320FqjXQq','590rDBnnF'];a172_0xa50d=function(){return _0xa3381e;};return a172_0xa50d();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a172_0x1830(_0x2e600b,_0x109095){_0x2e600b=_0x2e600b-0x1e7;const _0xa50d6a=a172_0xa50d();let _0x18308a=_0xa50d6a[_0x2e600b];return _0x18308a;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3f7e4f,_0x4f8e49){const _0x457520=a173_0x55c1,_0xb3a309=_0x3f7e4f();while(!![]){try{const _0x122415=parseInt(_0x457520(0xd5))/0x1*(-parseInt(_0x457520(0xd1))/0x2)+-parseInt(_0x457520(0xcd))/0x3*(parseInt(_0x457520(0xd3))/0x4)+parseInt(_0x457520(0xc1))/0x5+-parseInt(_0x457520(0xcc))/0x6+-parseInt(_0x457520(0xcb))/0x7*(parseInt(_0x457520(0xc8))/0x8)+-parseInt(_0x457520(0xd0))/0x9*(parseInt(_0x457520(0xcf))/0xa)+parseInt(_0x457520(0xce))/0xb;if(_0x122415===_0x4f8e49)break;else _0xb3a309['push'](_0xb3a309['shift']());}catch(_0x31daa0){_0xb3a309['push'](_0xb3a309['shift']());}}}(a173_0x33c3,0xe9507));function a173_0x55c1(_0x19230d,_0x58ebf1){_0x19230d=_0x19230d-0xc1;const _0x33c3cc=a173_0x33c3();let _0x55c162=_0x33c3cc[_0x19230d];return _0x55c162;}function a173_0x33c3(){const _0x3469bc=['join','1524gJSXyB','filter','49zhRXqW','latest','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','minimumVersion','7877080aWSzfW','valid','stableVersion','validation','minimumVersionMessage','unavailable','Current\x20version:\x20','40POmTmS','Recommended\x20stable:\x20','Minimum\x20supported:\x20','784301HWxcXA','8343462AZRNDl','12039lBmzsu','40426826BVjvQk','4229370wpYqKu','9gGXdEH','16010QmaAkC'];a173_0x33c3=function(){return _0x3469bc;};return a173_0x33c3();}import a173_0x3514fb from'semver';import{LOVRABET_NPM_PACKAGE_NAME}from'../constant/distribution.js';import{CliErrors}from'../errors.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';export function evaluateCliVersionPolicy(_0x48fea0,_0x24cfe0){const _0x55f5b5=a173_0x55c1,_0x4489cd=a173_0x3514fb[_0x55f5b5(0xc2)](_0x48fea0)===_0x48fea0,_0x3dd1c3=_0x24cfe0?.['stableVersion']??null,_0x444fad=_0x24cfe0?.[_0x55f5b5(0xd8)]??null,_0x444603=Boolean(_0x4489cd&&_0x3dd1c3&&a173_0x3514fb['lt'](_0x48fea0,_0x3dd1c3)),_0x1fda96=Boolean(_0x4489cd&&_0x444fad&&a173_0x3514fb['lt'](_0x48fea0,_0x444fad));return{'currentVersion':_0x48fea0,'stableVersion':_0x3dd1c3,'minimumVersion':_0x444fad,'needsUpgrade':_0x444603||_0x1fda96,'belowMinimum':_0x1fda96,'upgradeMessage':_0x24cfe0?.['upgradeMessage'],'minimumVersionMessage':_0x24cfe0?.[_0x55f5b5(0xc5)]};}export async function checkCliVersion(){return evaluateCliVersionPolicy(getCliVersion(),await getCliVersionPolicy());}export function getCliUpgradeCommand(_0x1e7fbc){const _0x1ab99a=a173_0x55c1;return'npm\x20install\x20-g\x20'+LOVRABET_NPM_PACKAGE_NAME+'@'+(_0x1e7fbc[_0x1ab99a(0xc3)]??_0x1ab99a(0xd6));}export function assertCliVersionSupported(_0x7acdd0){const _0x527abb=a173_0x55c1;if(!_0x7acdd0['belowMinimum'])return;const _0x44a2b4=[_0x7acdd0[_0x527abb(0xc5)],_0x527abb(0xc7)+_0x7acdd0['currentVersion'],_0x527abb(0xca)+_0x7acdd0['minimumVersion'],_0x527abb(0xc9)+(_0x7acdd0[_0x527abb(0xc3)]??_0x527abb(0xc6)),'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x7acdd0)][_0x527abb(0xd4)](Boolean)[_0x527abb(0xd2)]('\x0a');throw CliErrors[_0x527abb(0xc4)](_0x527abb(0xd7),_0x44a2b4);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e6541,_0x1d1638){const _0x1485b5=a174_0x4b3e,_0x3b8fb5=_0x3e6541();while(!![]){try{const _0x109de0=-parseInt(_0x1485b5(0x193))/0x1*(-parseInt(_0x1485b5(0x199))/0x2)+parseInt(_0x1485b5(0x198))/0x3*(-parseInt(_0x1485b5(0x19a))/0x4)+parseInt(_0x1485b5(0x187))/0x5*(parseInt(_0x1485b5(0x189))/0x6)+-parseInt(_0x1485b5(0x196))/0x7*(-parseInt(_0x1485b5(0x188))/0x8)+parseInt(_0x1485b5(0x182))/0x9+parseInt(_0x1485b5(0x184))/0xa+-parseInt(_0x1485b5(0x18a))/0xb;if(_0x109de0===_0x1d1638)break;else _0x3b8fb5['push'](_0x3b8fb5['shift']());}catch(_0x19a5a3){_0x3b8fb5['push'](_0x3b8fb5['shift']());}}}(a174_0x519d,0x22893));import a174_0x1acbc8 from'semver';import{LOVRABET_CLI_VERSION_POLICY_URL}from'../constant/distribution.js';const SUCCESS_CACHE_TTL_MS=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL_MS=0x3c*0x3e8,FETCH_TIMEOUT_MS=0x5dc;function pickString(_0x16c5a8){const _0x47242e=a174_0x4b3e;return typeof _0x16c5a8===_0x47242e(0x181)&&_0x16c5a8[_0x47242e(0x18b)]()?_0x16c5a8[_0x47242e(0x18b)]():null;}function pickStrictSemver(_0x71da3){const _0x126af6=a174_0x4b3e,_0x1824fe=pickString(_0x71da3);return _0x1824fe&&a174_0x1acbc8[_0x126af6(0x194)](_0x1824fe)===_0x1824fe?_0x1824fe:null;}export function normalizeCliVersionPolicy(_0x6fd724){const _0x39ff92=a174_0x4b3e;if(!_0x6fd724||typeof _0x6fd724!==_0x39ff92(0x183))return null;const _0x220dfd=_0x6fd724,_0x452696=_0x220dfd['cli']&&typeof _0x220dfd[_0x39ff92(0x191)]===_0x39ff92(0x183)?_0x220dfd[_0x39ff92(0x191)]:_0x220dfd,_0x275fd9=pickStrictSemver(_0x452696['stableVersion']??_0x452696[_0x39ff92(0x192)]??_0x452696[_0x39ff92(0x197)]),_0x265598=pickStrictSemver(_0x452696[_0x39ff92(0x18f)]??_0x452696[_0x39ff92(0x186)]);if(!_0x275fd9&&!_0x265598)return null;if(_0x275fd9&&_0x265598&&a174_0x1acbc8['gt'](_0x265598,_0x275fd9))return null;return{'stableVersion':_0x275fd9,'minimumVersion':_0x265598,'upgradeMessage':pickString(_0x452696[_0x39ff92(0x18e)])??undefined,'minimumVersionMessage':pickString(_0x452696[_0x39ff92(0x185)])??undefined};}function a174_0x519d(){const _0x1817af=['object','342020hXQGau','minimumVersionMessage','minVersion','475goEZHf','88rCkgkZ','9264ozbwNU','3526963sApfgS','trim','timeout','finally','upgradeMessage','minimumVersion','application/json','cli','latestVersion','8LhFuqe','valid','now','154203XobOjD','recommendedVersion','6SXthdT','8326RnpKez','370732SFijKJ','then','string','1718577udSWuO'];a174_0x519d=function(){return _0x1817af;};return a174_0x519d();}export async function fetchCliVersionPolicy(){const _0x56daa9=a174_0x4b3e;try{const _0x247639=await fetch(LOVRABET_CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x56daa9(0x190)},'signal':AbortSignal[_0x56daa9(0x18c)](FETCH_TIMEOUT_MS)});if(!_0x247639['ok'])return null;return normalizeCliVersionPolicy(await _0x247639['json']());}catch{return null;}}function a174_0x4b3e(_0x15156c,_0x13b791){_0x15156c=_0x15156c-0x181;const _0x519d46=a174_0x519d();let _0x4b3e79=_0x519d46[_0x15156c];return _0x4b3e79;}let cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;export async function getCliVersionPolicy(){const _0x128802=a174_0x4b3e,_0x1412f9=Date[_0x128802(0x195)]();if(hasCachedPolicy){const _0x478893=cachedPolicy?SUCCESS_CACHE_TTL_MS:FAILURE_CACHE_TTL_MS;if(_0x1412f9-cachedAt<_0x478893)return cachedPolicy;}if(pendingPolicy)return pendingPolicy;return pendingPolicy=fetchCliVersionPolicy()[_0x128802(0x19b)](_0x2548e4=>{const _0x433436=_0x128802;return cachedPolicy=_0x2548e4,cachedAt=Date[_0x433436(0x195)](),hasCachedPolicy=!![],_0x2548e4;})[_0x128802(0x18d)](()=>{pendingPolicy=null;}),pendingPolicy;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cachedAt=0x0,hasCachedPolicy=![],pendingPolicy=null;}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a175_0x5b5daf=a175_0x512f;function a175_0x512f(_0x3fec73,_0x249043){_0x3fec73=_0x3fec73-0xcb;const _0x4a5e14=a175_0x4a5e();let _0x512f15=_0x4a5e14[_0x3fec73];return _0x512f15;}(function(_0x1b2cf8,_0x30dbde){const _0x4caa0d=a175_0x512f,_0x5e9059=_0x1b2cf8();while(!![]){try{const _0x361ee8=-parseInt(_0x4caa0d(0xea))/0x1+parseInt(_0x4caa0d(0xf1))/0x2+parseInt(_0x4caa0d(0xd3))/0x3*(parseInt(_0x4caa0d(0xeb))/0x4)+-parseInt(_0x4caa0d(0xf9))/0x5*(parseInt(_0x4caa0d(0xf3))/0x6)+-parseInt(_0x4caa0d(0xd7))/0x7*(parseInt(_0x4caa0d(0xd2))/0x8)+parseInt(_0x4caa0d(0xd0))/0x9*(-parseInt(_0x4caa0d(0xdc))/0xa)+parseInt(_0x4caa0d(0xf0))/0xb;if(_0x361ee8===_0x30dbde)break;else _0x5e9059['push'](_0x5e9059['shift']());}catch(_0x2e5327){_0x5e9059['push'](_0x5e9059['shift']());}}}(a175_0x4a5e,0x7341b));import a175_0xf3812f from'winston';import a175_0x19b1e1 from'node:fs';import a175_0x55c9ba from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{[a175_0x5b5daf(0xec)];[a175_0x5b5daf(0xd6)]='';[a175_0x5b5daf(0xd4)]='';constructor(){}[a175_0x5b5daf(0xe8)](_0x240c0c){const _0x577f38=a175_0x5b5daf;this[_0x577f38(0xd4)]=_0x240c0c;}['setLogPath'](_0x51b591){const _0x182431=a175_0x5b5daf;this['logFilePath']=a175_0x55c9ba[_0x182431(0xdf)](_0x51b591,PRODUCT_CONFIG[_0x182431(0xce)]),this[_0x182431(0xec)]&&this['winstonLogger'][_0x182431(0xfc)](),this[_0x182431(0xf5)]();}[a175_0x5b5daf(0xf5)](){const _0x3ec9cf=a175_0x5b5daf,_0x3c32c6=a175_0x55c9ba[_0x3ec9cf(0xe2)](this[_0x3ec9cf(0xd6)]);!a175_0x19b1e1[_0x3ec9cf(0xef)](_0x3c32c6)&&a175_0x19b1e1[_0x3ec9cf(0xe0)](_0x3c32c6,{'recursive':!![]});const _0x3b718e=a175_0xf3812f[_0x3ec9cf(0xd9)]['combine'](a175_0xf3812f[_0x3ec9cf(0xd9)][_0x3ec9cf(0xda)](),a175_0xf3812f['format'][_0x3ec9cf(0xfa)]({'stack':!![]}),a175_0xf3812f[_0x3ec9cf(0xd9)][_0x3ec9cf(0xfb)](_0x322512=>{const _0x5f48ed=_0x3ec9cf,_0x1bc559={'timestamp':_0x322512['timestamp']||new Date()['toISOString'](),'level':_0x322512[_0x5f48ed(0xe4)]||_0x5f48ed(0xfe),'command':_0x322512['command']||_0x5f48ed(0xcb),'rawCommand':_0x322512[_0x5f48ed(0x101)]||this[_0x5f48ed(0xd4)]||undefined,'message':_0x322512[_0x5f48ed(0xe7)]||'','duration':_0x322512[_0x5f48ed(0xf4)]||undefined,'details':_0x322512[_0x5f48ed(0xdd)]||undefined};return JSON['stringify'](_0x1bc559);}));this[_0x3ec9cf(0xec)]=a175_0xf3812f[_0x3ec9cf(0xe1)]({'level':_0x3ec9cf(0xfe),'format':_0x3b718e,'transports':[new a175_0xf3812f[(_0x3ec9cf(0x100))][(_0x3ec9cf(0xdb))]({'filename':this[_0x3ec9cf(0xd6)],'level':_0x3ec9cf(0xfe)})],'silent':![]}),a175_0xf3812f[_0x3ec9cf(0x104)]({'success':'green','error':'red','warn':_0x3ec9cf(0xf2),'info':_0x3ec9cf(0xfd)});}[a175_0x5b5daf(0xfe)](_0x3ad252,_0x45994b,_0x4f415c){const _0x5bdd13=a175_0x5b5daf;if(!this[_0x5bdd13(0xd6)]||!this[_0x5bdd13(0xec)])return;this[_0x5bdd13(0xec)][_0x5bdd13(0xfe)](_0x45994b,{'command':_0x3ad252,'details':_0x4f415c});}[a175_0x5b5daf(0xe6)](_0x3ec3d1,_0x47e077,_0x3b774a,_0xaf0b3e){const _0x45e377=a175_0x5b5daf;if(!this[_0x45e377(0xd6)]||!this['winstonLogger'])return;this['winstonLogger'][_0x45e377(0xd1)](_0x45e377(0xfe),_0x47e077,{'level':_0x45e377(0xe6),'command':_0x3ec3d1,'duration':_0x3b774a,'details':_0xaf0b3e});}['error'](_0xfdc460,_0x5914cf,_0x208e05){const _0x35f8b1=a175_0x5b5daf;if(!this[_0x35f8b1(0xd6)]||!this[_0x35f8b1(0xec)])return;this['winstonLogger'][_0x35f8b1(0x103)](_0x5914cf,{'command':_0xfdc460,'details':_0x208e05});}[a175_0x5b5daf(0xff)](_0x49e5a5,_0x2a3291,_0x30f5f6){const _0x4d16a9=a175_0x5b5daf;if(!this[_0x4d16a9(0xd6)]||!this[_0x4d16a9(0xec)])return;this[_0x4d16a9(0xec)][_0x4d16a9(0xff)](_0x2a3291,{'command':_0x49e5a5,'details':_0x30f5f6});}async[a175_0x5b5daf(0xd5)](_0x4b0376,_0xf5e46a,_0x2446d4){const _0x3efe4d=a175_0x5b5daf,_0x4c7c5a=Date['now']();this['info'](_0x4b0376,_0x3efe4d(0xee)+_0xf5e46a);try{const _0x408a5f=await _0x2446d4(),_0x4c55da=Date[_0x3efe4d(0xde)]()-_0x4c7c5a;return this['success'](_0x4b0376,_0x3efe4d(0xcf)+_0xf5e46a,_0x4c55da),_0x408a5f;}catch(_0x445343){const _0xc0aa17=Date[_0x3efe4d(0xde)]()-_0x4c7c5a;this['error'](_0x4b0376,_0x3efe4d(0xd8)+_0xf5e46a,{'error':_0x445343 instanceof Error?_0x445343[_0x3efe4d(0xe7)]:String(_0x445343),'duration':_0xc0aa17});throw _0x445343;}}[a175_0x5b5daf(0xf6)](){const _0x357881=a175_0x5b5daf;try{if(!a175_0x19b1e1[_0x357881(0xef)](this[_0x357881(0xd6)]))return[];const _0x391dee=a175_0x19b1e1[_0x357881(0xe9)](this['logFilePath'],_0x357881(0xf7));return _0x391dee['split'](/\r?\n/)[_0x357881(0xf8)](_0x2e265b=>_0x2e265b['trim']())[_0x357881(0x105)](_0xcd9dcd=>JSON[_0x357881(0xe3)](_0xcd9dcd));}catch(_0x2e7923){return console[_0x357881(0xff)](_0x357881(0xcc),_0x2e7923),[];}}[a175_0x5b5daf(0xcd)](){const _0x55659b=a175_0x5b5daf;try{a175_0x19b1e1[_0x55659b(0xef)](this[_0x55659b(0xd6)])&&a175_0x19b1e1[_0x55659b(0x102)](this[_0x55659b(0xd6)],'','utf8');}catch(_0xf36d57){console['warn'](_0x55659b(0xe5),_0xf36d57);}}[a175_0x5b5daf(0xed)](){const _0x452051=a175_0x5b5daf;return this[_0x452051(0xec)];}}function a175_0x4a5e(){const _0x837a90=['warn','transports','rawCommand','writeFileSync','error','addColors','map','unknown','Failed\x20to\x20read\x20logs:','clearLogs','logFileName','Completed:\x20','9tvMJNe','log','16tIizIL','3wGZDRt','currentRawCommand','logTask','logFilePath','917546Fxhcxb','Failed:\x20','format','timestamp','File','5639870ASmLEm','details','now','join','mkdirSync','createLogger','dirname','parse','level','Failed\x20to\x20clear\x20logs:','success','message','setRawCommand','readFileSync','291181lIxFpw','729860qSeovb','winstonLogger','getWinstonInstance','Starting:\x20','existsSync','19735694etpkyH','310364Ymdteb','yellow','12FjfVht','duration','initWinstonLogger','readLogs','utf8','filter','1355965VMzEwT','errors','printf','clear','blue','info'];a175_0x4a5e=function(){return _0x837a90;};return a175_0x4a5e();}export const logger=new Logger();
|