@lovrabet/lovrabet-cli 2.2.5-beta.1 → 2.2.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/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/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/rate-limit.js +1 -1
- package/lib/framework/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a135_0x5e7187=a135_0x218e;(function(_0x34bce0,_0x280657){const _0xa9fd6d=a135_0x218e,_0x4b4b03=_0x34bce0();while(!![]){try{const _0x29ee50=parseInt(_0xa9fd6d(0x12a))/0x1+-parseInt(_0xa9fd6d(0x12d))/0x2*(parseInt(_0xa9fd6d(0x145))/0x3)+parseInt(_0xa9fd6d(0x15b))/0x4*(-parseInt(_0xa9fd6d(0x147))/0x5)+parseInt(_0xa9fd6d(0x13d))/0x6*(-parseInt(_0xa9fd6d(0x130))/0x7)+-parseInt(_0xa9fd6d(0x13b))/0x8+parseInt(_0xa9fd6d(0x13f))/0x9+parseInt(_0xa9fd6d(0x13a))/0xa;if(_0x29ee50===_0x280657)break;else _0x4b4b03['push'](_0x4b4b03['shift']());}catch(_0x50495){_0x4b4b03['push'](_0x4b4b03['shift']());}}}(a135_0x1fb0,0x3dd94));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x686360 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a135_0x686360,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x5e7187(0x139),a135_0x5e7187(0x129),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x5c197e,_0x13575b){const _0x3c5836=a135_0x5e7187,_0x4648cf=new Map();for(const _0x2b2450 of _0x5c197e){const _0x8750f=_0x2b2450[_0x3c5836(0x134)][_0x3c5836(0x12b)];if(!_0x8750f)continue;const _0x3dd299=_0x4648cf[_0x3c5836(0x156)](_0x8750f);(!_0x3dd299||_0x2b2450[_0x3c5836(0x128)]===_0x3c5836(0x148))&&_0x4648cf[_0x3c5836(0x14b)](_0x8750f,_0x2b2450);}const _0x1451e3=[];for(const _0xe4af5 of _0x4648cf[_0x3c5836(0x14e)]()){const _0x51249a=requireSkillCode(_0xe4af5[_0x3c5836(0x134)]),_0x258428=readMetadataIfPresent(_0xe4af5[_0x3c5836(0x13c)]);if(_0x258428?.[_0x3c5836(0x151)]!==_0x13575b['appCode']||_0x258428[_0x3c5836(0x12b)]!==_0x51249a)throw CliErrors[_0x3c5836(0x144)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x13575b[_0x3c5836(0x151)]+':\x20'+_0xe4af5[_0x3c5836(0x13c)]);const _0x49358c=runtimeSkillLinkName(_0x13575b,_0x51249a);for(const _0xbb02d1 of _0x13575b['skillRoots']){_0x1451e3[_0x3c5836(0x149)](ensureManagedSymlink(resolve(_0xbb02d1,_0x49358c),_0xe4af5[_0x3c5836(0x146)],_0x13575b,_0x51249a));}}return _0x1451e3;}export function pruneStaleRuntimeSkillLinks(_0x386ea6,_0x5b2940,_0x16a6cc){const _0x46cfcd=a135_0x5e7187,_0x454656=new Set([..._0x5b2940][_0x46cfcd(0x15a)](_0x134408=>_0x134408[_0x46cfcd(0x15c)]())[_0x46cfcd(0x154)](Boolean)),_0x587e8b=_0x16a6cc?new Set([..._0x16a6cc][_0x46cfcd(0x15a)](_0x475dff=>_0x475dff['trim']())['filter'](Boolean)):undefined,_0x368336=[];for(const _0x29584e of _0x386ea6[_0x46cfcd(0x14a)]){for(const _0x2d257e of managedTargetSkillLinkPaths(_0x29584e,_0x386ea6)){const _0x4b9eab=runtimeSkillCodeFromLink(_0x386ea6,_0x2d257e);if(_0x587e8b&&!_0x587e8b[_0x46cfcd(0x133)](_0x4b9eab))continue;if(_0x454656['has'](_0x4b9eab))continue;_0x368336[_0x46cfcd(0x149)](removeManagedSkillLink(_0x2d257e,_0x386ea6,_0x4b9eab));}}return _0x368336;}function a135_0x1fb0(){const _0x47efdf=['appCode','skipped','env','filter','isDirectory','get','managedRoot','scopes','updated','map','4QTBJkm','trim','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','linked-from-protected-root','accessKey','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','created','protectedLinkRoots','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','scope','runtime-observe','80149gEefgT','skillCode','startsWith','9242CZQfXS','length','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','14nMvhlp','project','name','has','skill','isSymbolicLink','removed','contentHash','company','lovrabet','6446740fEBpAP','46856kocHkG','metadataPath','854130GTSojc','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','555624XUUgPd','unchanged','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','validation','9CjpbsQ','dir','1143985wyzDBl','personal','push','skillRoots','set','metadata-mismatch','builtin','values','activeSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'];a135_0x1fb0=function(){return _0x47efdf;};return a135_0x1fb0();}export function pruneStaleRuntimeSkillCache(_0x74a69c,_0x345880={}){const _0x477199=a135_0x5e7187,_0x4da99f=new Set([..._0x74a69c[_0x477199(0x14f)]][_0x477199(0x15a)](_0x535c51=>_0x535c51['trim']())['filter'](Boolean)),_0x525082=_0x74a69c['pruneSkillCodes']?new Set([..._0x74a69c['pruneSkillCodes']][_0x477199(0x15a)](_0x1c25df=>_0x1c25df[_0x477199(0x15c)]())[_0x477199(0x154)](Boolean)):undefined,_0x152bfb=_0x74a69c[_0x477199(0x158)]??['personal',_0x477199(0x138)],_0x1bc035=resolve(getRuntimeSkillCacheRoot(_0x74a69c[_0x477199(0x153)],_0x74a69c[_0x477199(0x15f)],_0x345880),safePathSegment(_0x74a69c[_0x477199(0x151)],_0x477199(0x151))),_0x259c73=[];for(const _0x24d54b of _0x152bfb){const _0x41fcf0=resolve(_0x1bc035,_0x24d54b);if(!existsSync(_0x41fcf0))continue;for(const _0x5286fc of readdirSync(_0x41fcf0,{'withFileTypes':!![]})){if(!_0x5286fc[_0x477199(0x155)]())continue;const _0x26d621=_0x5286fc['name'];if(_0x525082&&!_0x525082[_0x477199(0x133)](_0x26d621))continue;if(_0x4da99f['has'](_0x26d621))continue;const _0x367ea0=resolve(_0x41fcf0,_0x26d621),_0x318763=readMetadataIfPresent(resolve(_0x367ea0,METADATA_FILE));if(_0x318763?.[_0x477199(0x151)]!==_0x74a69c[_0x477199(0x151)]||_0x318763['scope']!==_0x24d54b||_0x318763[_0x477199(0x12b)]!==_0x26d621){_0x259c73[_0x477199(0x149)]({'path':_0x367ea0,'action':'skipped','reason':_0x477199(0x14c)});continue;}if(isLinkedFromAnyRoot(_0x367ea0,_0x74a69c[_0x477199(0x126)]??[])){_0x259c73['push']({'path':_0x367ea0,'action':_0x477199(0x152),'reason':_0x477199(0x15e)});continue;}removeSync(_0x367ea0),_0x259c73[_0x477199(0x149)]({'path':_0x367ea0,'action':'removed'});}}return _0x259c73;}function a135_0x218e(_0x41aaf7,_0x348e51){_0x41aaf7=_0x41aaf7-0x124;const _0x1fb00b=a135_0x1fb0();let _0x218e29=_0x1fb00b[_0x41aaf7];return _0x218e29;}export function linkGlobalRuntimeSkills(_0x49433d,_0x265134={}){const _0xb000d6=a135_0x5e7187,_0x50bfb8=resolveSkillSyncPaths(_0x265134),_0x33c26e=[];for(const _0x14ed78 of _0x49433d){if(_0x14ed78[_0xb000d6(0x128)]!==_0xb000d6(0x14d))throw CliErrors[_0xb000d6(0x144)](_0xb000d6(0x142)+_0x14ed78[_0xb000d6(0x128)]);const _0x36e701=requireSkillCode(_0x14ed78['skill']),_0x3a2d03=copyManagedSkillDirectory(_0x14ed78[_0xb000d6(0x146)],resolve(_0x50bfb8['agentsSkillsDir'],_0x36e701));_0x33c26e[_0xb000d6(0x149)]({..._0x3a2d03,'contentHash':_0x14ed78[_0xb000d6(0x137)]});}return _0x33c26e;}function ensureManagedSymlink(_0x44db1d,_0xc59045,_0x30016b,_0x10174f){const _0x1e9bd7=a135_0x5e7187;mkdirSync(dirname(_0x44db1d),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x44db1d)||isDanglingSymlink(_0x44db1d)){const _0x3f0004=lstatSync(_0x44db1d);if(!_0x3f0004[_0x1e9bd7(0x135)]())throw CliErrors[_0x1e9bd7(0x144)](_0x1e9bd7(0x13e)+_0x44db1d);const _0x32e51b=resolveSymlinkTarget(_0x44db1d);if(!isPathInside(realOrResolved(_0x32e51b),realOrResolved(_0x30016b[_0x1e9bd7(0x157)])))throw CliErrors[_0x1e9bd7(0x144)](_0x1e9bd7(0x12f)+_0x44db1d);if(realOrResolved(_0x32e51b)===realOrResolved(_0xc59045))return{'path':_0x44db1d,'target':_0xc59045,'action':'unchanged'};const _0x5d4340=readMetadataIfPresent(resolve(_0x32e51b,METADATA_FILE));if(_0x30016b[_0x1e9bd7(0x128)]===_0x1e9bd7(0x131)&&(_0x5d4340?.['appCode']!==_0x30016b[_0x1e9bd7(0x151)]||_0x5d4340[_0x1e9bd7(0x12b)]!==_0x10174f))throw CliErrors[_0x1e9bd7(0x144)](_0x1e9bd7(0x15d)+_0x44db1d);return unlinkSync(_0x44db1d),symlinkSync(_0xc59045,_0x44db1d,_0x1e9bd7(0x146)),{'path':_0x44db1d,'target':_0xc59045,'action':_0x1e9bd7(0x159)};}return symlinkSync(_0xc59045,_0x44db1d,_0x1e9bd7(0x146)),{'path':_0x44db1d,'target':_0xc59045,'action':_0x1e9bd7(0x125)};}function managedTargetSkillLinkPaths(_0x5b86f8,_0x3911d4){const _0x2d8679=a135_0x5e7187;if(!existsSync(_0x5b86f8))return[];const _0x3ae699=_0x3911d4[_0x2d8679(0x151)]+'--';return readdirSync(_0x5b86f8,{'withFileTypes':!![]})[_0x2d8679(0x154)](_0x3e5a45=>_0x3911d4[_0x2d8679(0x128)]==='project'||_0x3e5a45[_0x2d8679(0x132)][_0x2d8679(0x12c)](_0x3ae699))[_0x2d8679(0x15a)](_0x5a08f0=>resolve(_0x5b86f8,_0x5a08f0[_0x2d8679(0x132)]));}function removeManagedSkillLink(_0xdb0ac9,_0x4031a5,_0x266d5a){const _0x40e021=a135_0x5e7187,_0x2b41dd=lstatIfPresent(_0xdb0ac9);if(!_0x2b41dd?.[_0x40e021(0x135)]())return{'path':_0xdb0ac9,'action':_0x40e021(0x152),'reason':'not-managed-symlink'};const _0x9ee880=resolveSymlinkTarget(_0xdb0ac9);if(!isPathInside(realOrResolved(_0x9ee880),realOrResolved(_0x4031a5[_0x40e021(0x157)])))return{'path':_0xdb0ac9,'action':_0x40e021(0x152),'reason':'external-symlink'};const _0x4da84d=readMetadataIfPresent(resolve(_0x9ee880,METADATA_FILE));if(_0x4031a5[_0x40e021(0x128)]==='project'&&(_0x4da84d?.[_0x40e021(0x151)]!==_0x4031a5[_0x40e021(0x151)]||_0x4da84d['skillCode']!==_0x266d5a))return{'path':_0xdb0ac9,'action':'skipped','reason':_0x40e021(0x14c)};return unlinkSync(_0xdb0ac9),{'path':_0xdb0ac9,'action':_0x40e021(0x136)};}function isLinkedFromAnyRoot(_0x33cd6b,_0x5bf4a9){const _0x428337=a135_0x5e7187,_0x266505=realOrResolved(_0x33cd6b);for(const _0x297554 of _0x5bf4a9){if(!existsSync(_0x297554))continue;for(const _0x153c84 of readdirSync(_0x297554,{'withFileTypes':!![]})){if(!_0x153c84[_0x428337(0x135)]())continue;const _0x307999=resolve(_0x297554,_0x153c84[_0x428337(0x132)]);if(realOrResolved(resolveSymlinkTarget(_0x307999))===_0x266505)return!![];}}return![];}function runtimeSkillLinkName(_0x49ceea,_0x5990f5){const _0x432404=a135_0x5e7187,_0x2f34ee=safePathSegment(_0x5990f5,_0x432404(0x12b));if(_0x49ceea[_0x432404(0x128)]===_0x432404(0x131)&&RESERVED_PROJECT_SKILL_CODES[_0x432404(0x133)](_0x2f34ee))throw CliErrors[_0x432404(0x144)](_0x432404(0x127)+_0x2f34ee);return _0x49ceea[_0x432404(0x128)]===_0x432404(0x131)?_0x2f34ee:_0x49ceea[_0x432404(0x151)]+'--'+_0x2f34ee;}function runtimeSkillCodeFromLink(_0x57b135,_0x5c8512){const _0xd1546c=a135_0x5e7187,_0x2a0dab=basename(_0x5c8512);return _0x57b135[_0xd1546c(0x128)]===_0xd1546c(0x131)?_0x2a0dab:_0x2a0dab['slice']((_0x57b135[_0xd1546c(0x151)]+'--')[_0xd1546c(0x12e)]);}export function copyManagedSkillDirectory(_0x46cf4a,_0x479854){const _0x50b662=a135_0x5e7187,_0x2a9652=resolve(_0x479854,METADATA_FILE),_0x56612d=existsSync(_0x479854);if(_0x56612d){const _0x38cdc4=lstatSync(_0x479854);if(_0x38cdc4[_0x50b662(0x135)]())throw CliErrors['validation'](_0x50b662(0x124)+_0x479854);if(!_0x38cdc4['isDirectory']())throw CliErrors[_0x50b662(0x144)](_0x50b662(0x141)+_0x479854);const _0x1369e9=readMetadataIfPresent(_0x2a9652);if(_0x1369e9?.[_0x50b662(0x128)]!==_0x50b662(0x14d))throw CliErrors[_0x50b662(0x144)](_0x50b662(0x150)+_0x479854);}ensureDirSync(dirname(_0x479854));const _0x39e0ba=_0x56612d?readMetadataIfPresent(_0x2a9652)?.[_0x50b662(0x137)]:undefined,_0x3c5933=readMetadataIfPresent(resolve(_0x46cf4a,METADATA_FILE))?.[_0x50b662(0x137)];return _0x56612d&&removeSync(_0x479854),copySkillDirectory(_0x46cf4a,_0x479854),{'path':_0x479854,'target':_0x46cf4a,'action':!_0x56612d?_0x50b662(0x125):_0x39e0ba===_0x3c5933?_0x50b662(0x140):_0x50b662(0x159)};}function copySkillDirectory(_0x34cda4,_0x2904a0){copySync(_0x34cda4,_0x2904a0,{'dereference':![],'overwrite':!![],'filter'(_0x547ddb){const _0x5406a6=a135_0x218e;if(lstatSync(_0x547ddb)[_0x5406a6(0x135)]())throw CliErrors[_0x5406a6(0x144)](_0x5406a6(0x143)+_0x547ddb);return!![];}});}
|
|
1
|
+
const a135_0x12ff76=a135_0x4bfa;(function(_0x5917bc,_0x343b92){const _0x5398a9=a135_0x4bfa,_0x444364=_0x5917bc();while(!![]){try{const _0x5bbafc=-parseInt(_0x5398a9(0x1b6))/0x1*(parseInt(_0x5398a9(0x1c4))/0x2)+-parseInt(_0x5398a9(0x1a8))/0x3*(parseInt(_0x5398a9(0x1ce))/0x4)+-parseInt(_0x5398a9(0x1b4))/0x5+-parseInt(_0x5398a9(0x1aa))/0x6*(parseInt(_0x5398a9(0x1af))/0x7)+parseInt(_0x5398a9(0x1cc))/0x8+parseInt(_0x5398a9(0x1ac))/0x9+parseInt(_0x5398a9(0x1bf))/0xa*(parseInt(_0x5398a9(0x1b7))/0xb);if(_0x5bbafc===_0x343b92)break;else _0x444364['push'](_0x444364['shift']());}catch(_0x366413){_0x444364['push'](_0x444364['shift']());}}}(a135_0x26fc,0x8853c));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x29292e from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a135_0x26fc(){const _0x578b23=['3946176sEApHz','lovrabet','736deWlcs','builtin','has','scopes','updated','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','secret-retriever','trim','skillRoots','created','scope','metadataPath','linked-from-protected-root','skill','appCode','pruneSkillCodes','not-managed-symlink','name','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','isSymbolicLink','skipped','map','14502XFdwLW','validation','1038144xxdYEM','accessKey','2968056ctokio','contentHash','metadata-mismatch','14tCqsij','unchanged','protectedLinkRoots','activeSkillCodes','length','4977395NaGDYq','personal','70997Kjuyth','27096322pfmlTF','dir','isDirectory','slice','filter','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','get','10zlVeJa','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','project','startsWith','company','14QLzHWS','agentsSkillsDir','push','skillCode','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'];a135_0x26fc=function(){return _0x578b23;};return a135_0x26fc();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a135_0x29292e,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x12ff76(0x1cd),'runtime-observe',a135_0x12ff76(0x1d4)]);export function linkEffectiveRuntimeSkills(_0x291562,_0xafa199){const _0x221c8a=a135_0x12ff76,_0x21b72a=new Map();for(const _0x2d047a of _0x291562){const _0x138a26=_0x2d047a[_0x221c8a(0x19f)]['skillCode'];if(!_0x138a26)continue;const _0x423d42=_0x21b72a[_0x221c8a(0x1be)](_0x138a26);(!_0x423d42||_0x2d047a[_0x221c8a(0x1d8)]===_0x221c8a(0x1b5))&&_0x21b72a['set'](_0x138a26,_0x2d047a);}const _0x29dcc4=[];for(const _0x483006 of _0x21b72a['values']()){const _0x1e9f68=requireSkillCode(_0x483006[_0x221c8a(0x19f)]),_0x451fe9=readMetadataIfPresent(_0x483006[_0x221c8a(0x19d)]);if(_0x451fe9?.[_0x221c8a(0x1a0)]!==_0xafa199[_0x221c8a(0x1a0)]||_0x451fe9[_0x221c8a(0x1c7)]!==_0x1e9f68)throw CliErrors[_0x221c8a(0x1a9)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0xafa199[_0x221c8a(0x1a0)]+':\x20'+_0x483006[_0x221c8a(0x19d)]);const _0x58637f=runtimeSkillLinkName(_0xafa199,_0x1e9f68);for(const _0x225b57 of _0xafa199['skillRoots']){_0x29dcc4[_0x221c8a(0x1c6)](ensureManagedSymlink(resolve(_0x225b57,_0x58637f),_0x483006[_0x221c8a(0x1b8)],_0xafa199,_0x1e9f68));}}return _0x29dcc4;}export function pruneStaleRuntimeSkillLinks(_0x385cdf,_0xa6df57,_0x9ba978){const _0x19d96c=a135_0x12ff76,_0x105d46=new Set([..._0xa6df57][_0x19d96c(0x1a7)](_0x41fe86=>_0x41fe86[_0x19d96c(0x1d5)]())[_0x19d96c(0x1bb)](Boolean)),_0x503a77=_0x9ba978?new Set([..._0x9ba978][_0x19d96c(0x1a7)](_0x150890=>_0x150890[_0x19d96c(0x1d5)]())[_0x19d96c(0x1bb)](Boolean)):undefined,_0x12097d=[];for(const _0x2a5b59 of _0x385cdf[_0x19d96c(0x1d6)]){for(const _0x4efe5a of managedTargetSkillLinkPaths(_0x2a5b59,_0x385cdf)){const _0xcf0db8=runtimeSkillCodeFromLink(_0x385cdf,_0x4efe5a);if(_0x503a77&&!_0x503a77['has'](_0xcf0db8))continue;if(_0x105d46['has'](_0xcf0db8))continue;_0x12097d['push'](removeManagedSkillLink(_0x4efe5a,_0x385cdf,_0xcf0db8));}}return _0x12097d;}export function pruneStaleRuntimeSkillCache(_0x4acb81,_0x2dd32c={}){const _0x2701e7=a135_0x12ff76,_0x531235=new Set([..._0x4acb81[_0x2701e7(0x1b2)]][_0x2701e7(0x1a7)](_0x5f484d=>_0x5f484d[_0x2701e7(0x1d5)]())['filter'](Boolean)),_0x202119=_0x4acb81['pruneSkillCodes']?new Set([..._0x4acb81[_0x2701e7(0x1a1)]][_0x2701e7(0x1a7)](_0x50e33e=>_0x50e33e[_0x2701e7(0x1d5)]())['filter'](Boolean)):undefined,_0x53c24b=_0x4acb81[_0x2701e7(0x1d1)]??[_0x2701e7(0x1b5),_0x2701e7(0x1c3)],_0x1e7518=resolve(getRuntimeSkillCacheRoot(_0x4acb81['env'],_0x4acb81[_0x2701e7(0x1ab)],_0x2dd32c),safePathSegment(_0x4acb81[_0x2701e7(0x1a0)],_0x2701e7(0x1a0))),_0x4cdfa9=[];for(const _0x114bf1 of _0x53c24b){const _0x3f887e=resolve(_0x1e7518,_0x114bf1);if(!existsSync(_0x3f887e))continue;for(const _0x5e6aeb of readdirSync(_0x3f887e,{'withFileTypes':!![]})){if(!_0x5e6aeb[_0x2701e7(0x1b9)]())continue;const _0x5f1c1b=_0x5e6aeb[_0x2701e7(0x1a3)];if(_0x202119&&!_0x202119['has'](_0x5f1c1b))continue;if(_0x531235[_0x2701e7(0x1d0)](_0x5f1c1b))continue;const _0x9b253d=resolve(_0x3f887e,_0x5f1c1b),_0x43e586=readMetadataIfPresent(resolve(_0x9b253d,METADATA_FILE));if(_0x43e586?.[_0x2701e7(0x1a0)]!==_0x4acb81['appCode']||_0x43e586[_0x2701e7(0x1d8)]!==_0x114bf1||_0x43e586[_0x2701e7(0x1c7)]!==_0x5f1c1b){_0x4cdfa9[_0x2701e7(0x1c6)]({'path':_0x9b253d,'action':_0x2701e7(0x1a6),'reason':_0x2701e7(0x1ae)});continue;}if(isLinkedFromAnyRoot(_0x9b253d,_0x4acb81[_0x2701e7(0x1b1)]??[])){_0x4cdfa9['push']({'path':_0x9b253d,'action':_0x2701e7(0x1a6),'reason':_0x2701e7(0x19e)});continue;}removeSync(_0x9b253d),_0x4cdfa9['push']({'path':_0x9b253d,'action':_0x2701e7(0x1c9)});}}return _0x4cdfa9;}export function linkGlobalRuntimeSkills(_0x1ee5d8,_0x55783a={}){const _0x562eed=a135_0x12ff76,_0x4f6281=resolveSkillSyncPaths(_0x55783a),_0x1bf3b9=[];for(const _0xb31918 of _0x1ee5d8){if(_0xb31918['scope']!==_0x562eed(0x1cf))throw CliErrors['validation'](_0x562eed(0x1bc)+_0xb31918[_0x562eed(0x1d8)]);const _0x302d67=requireSkillCode(_0xb31918[_0x562eed(0x19f)]),_0x2ad019=copyManagedSkillDirectory(_0xb31918[_0x562eed(0x1b8)],resolve(_0x4f6281[_0x562eed(0x1c5)],_0x302d67));_0x1bf3b9[_0x562eed(0x1c6)]({..._0x2ad019,'contentHash':_0xb31918[_0x562eed(0x1ad)]});}return _0x1bf3b9;}function ensureManagedSymlink(_0x2d4d95,_0x3894c1,_0x26db12,_0x1cb78d){const _0x4f9f77=a135_0x12ff76;mkdirSync(dirname(_0x2d4d95),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2d4d95)||isDanglingSymlink(_0x2d4d95)){const _0x142067=lstatSync(_0x2d4d95);if(!_0x142067['isSymbolicLink']())throw CliErrors[_0x4f9f77(0x1a9)](_0x4f9f77(0x1bd)+_0x2d4d95);const _0x599c0b=resolveSymlinkTarget(_0x2d4d95);if(!isPathInside(realOrResolved(_0x599c0b),realOrResolved(_0x26db12['managedRoot'])))throw CliErrors[_0x4f9f77(0x1a9)](_0x4f9f77(0x1a4)+_0x2d4d95);if(realOrResolved(_0x599c0b)===realOrResolved(_0x3894c1))return{'path':_0x2d4d95,'target':_0x3894c1,'action':_0x4f9f77(0x1b0)};const _0x163bd8=readMetadataIfPresent(resolve(_0x599c0b,METADATA_FILE));if(_0x26db12[_0x4f9f77(0x1d8)]==='project'&&(_0x163bd8?.['appCode']!==_0x26db12['appCode']||_0x163bd8['skillCode']!==_0x1cb78d))throw CliErrors[_0x4f9f77(0x1a9)](_0x4f9f77(0x1d3)+_0x2d4d95);return unlinkSync(_0x2d4d95),symlinkSync(_0x3894c1,_0x2d4d95,_0x4f9f77(0x1b8)),{'path':_0x2d4d95,'target':_0x3894c1,'action':_0x4f9f77(0x1d2)};}return symlinkSync(_0x3894c1,_0x2d4d95,_0x4f9f77(0x1b8)),{'path':_0x2d4d95,'target':_0x3894c1,'action':_0x4f9f77(0x1d7)};}function managedTargetSkillLinkPaths(_0x2c6657,_0x23bbec){const _0x55f02b=a135_0x12ff76;if(!existsSync(_0x2c6657))return[];const _0x9cbc32=_0x23bbec['appCode']+'--';return readdirSync(_0x2c6657,{'withFileTypes':!![]})[_0x55f02b(0x1bb)](_0x3876e3=>_0x23bbec[_0x55f02b(0x1d8)]==='project'||_0x3876e3[_0x55f02b(0x1a3)][_0x55f02b(0x1c2)](_0x9cbc32))[_0x55f02b(0x1a7)](_0x26a843=>resolve(_0x2c6657,_0x26a843['name']));}function removeManagedSkillLink(_0x33a39c,_0x49c79b,_0x377b04){const _0x32f1d8=a135_0x12ff76,_0x17df6b=lstatIfPresent(_0x33a39c);if(!_0x17df6b?.[_0x32f1d8(0x1a5)]())return{'path':_0x33a39c,'action':_0x32f1d8(0x1a6),'reason':_0x32f1d8(0x1a2)};const _0x17fa7e=resolveSymlinkTarget(_0x33a39c);if(!isPathInside(realOrResolved(_0x17fa7e),realOrResolved(_0x49c79b['managedRoot'])))return{'path':_0x33a39c,'action':_0x32f1d8(0x1a6),'reason':'external-symlink'};const _0x132b00=readMetadataIfPresent(resolve(_0x17fa7e,METADATA_FILE));if(_0x49c79b[_0x32f1d8(0x1d8)]===_0x32f1d8(0x1c1)&&(_0x132b00?.['appCode']!==_0x49c79b[_0x32f1d8(0x1a0)]||_0x132b00[_0x32f1d8(0x1c7)]!==_0x377b04))return{'path':_0x33a39c,'action':_0x32f1d8(0x1a6),'reason':_0x32f1d8(0x1ae)};return unlinkSync(_0x33a39c),{'path':_0x33a39c,'action':_0x32f1d8(0x1c9)};}function isLinkedFromAnyRoot(_0x2a40eb,_0x35a8bd){const _0x26b615=a135_0x12ff76,_0x141fc9=realOrResolved(_0x2a40eb);for(const _0xc61906 of _0x35a8bd){if(!existsSync(_0xc61906))continue;for(const _0x12305c of readdirSync(_0xc61906,{'withFileTypes':!![]})){if(!_0x12305c[_0x26b615(0x1a5)]())continue;const _0x300845=resolve(_0xc61906,_0x12305c[_0x26b615(0x1a3)]);if(realOrResolved(resolveSymlinkTarget(_0x300845))===_0x141fc9)return!![];}}return![];}function runtimeSkillLinkName(_0xc4d49f,_0x43ad6f){const _0x4615f3=a135_0x12ff76,_0x2ed9ec=safePathSegment(_0x43ad6f,_0x4615f3(0x1c7));if(_0xc4d49f['scope']==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x4615f3(0x1d0)](_0x2ed9ec))throw CliErrors[_0x4615f3(0x1a9)](_0x4615f3(0x1cb)+_0x2ed9ec);return _0xc4d49f['scope']==='project'?_0x2ed9ec:_0xc4d49f[_0x4615f3(0x1a0)]+'--'+_0x2ed9ec;}function a135_0x4bfa(_0x4cf6e4,_0x1f5946){_0x4cf6e4=_0x4cf6e4-0x19d;const _0x26fc71=a135_0x26fc();let _0x4bfa47=_0x26fc71[_0x4cf6e4];return _0x4bfa47;}function runtimeSkillCodeFromLink(_0x4b19f7,_0xc5ac7e){const _0x1c9f81=a135_0x12ff76,_0x14a197=basename(_0xc5ac7e);return _0x4b19f7[_0x1c9f81(0x1d8)]===_0x1c9f81(0x1c1)?_0x14a197:_0x14a197[_0x1c9f81(0x1ba)]((_0x4b19f7[_0x1c9f81(0x1a0)]+'--')[_0x1c9f81(0x1b3)]);}export function copyManagedSkillDirectory(_0x510936,_0x56eb51){const _0x159d04=a135_0x12ff76,_0x107ddf=resolve(_0x56eb51,METADATA_FILE),_0x3b4047=existsSync(_0x56eb51);if(_0x3b4047){const _0x1fcad6=lstatSync(_0x56eb51);if(_0x1fcad6[_0x159d04(0x1a5)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x56eb51);if(!_0x1fcad6[_0x159d04(0x1b9)]())throw CliErrors[_0x159d04(0x1a9)](_0x159d04(0x1ca)+_0x56eb51);const _0x503351=readMetadataIfPresent(_0x107ddf);if(_0x503351?.[_0x159d04(0x1d8)]!==_0x159d04(0x1cf))throw CliErrors[_0x159d04(0x1a9)](_0x159d04(0x1c0)+_0x56eb51);}ensureDirSync(dirname(_0x56eb51));const _0x3dfc56=_0x3b4047?readMetadataIfPresent(_0x107ddf)?.[_0x159d04(0x1ad)]:undefined,_0x2d1b0a=readMetadataIfPresent(resolve(_0x510936,METADATA_FILE))?.['contentHash'];return _0x3b4047&&removeSync(_0x56eb51),copySkillDirectory(_0x510936,_0x56eb51),{'path':_0x56eb51,'target':_0x510936,'action':!_0x3b4047?_0x159d04(0x1d7):_0x3dfc56===_0x2d1b0a?'unchanged':_0x159d04(0x1d2)};}function copySkillDirectory(_0x4d62f0,_0x5478bb){copySync(_0x4d62f0,_0x5478bb,{'dereference':![],'overwrite':!![],'filter'(_0x3464b2){const _0x68b795=a135_0x4bfa;if(lstatSync(_0x3464b2)[_0x68b795(0x1a5)]())throw CliErrors[_0x68b795(0x1a9)](_0x68b795(0x1c8)+_0x3464b2);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf2068e,_0x4c5a0d){const _0x26a751=a136_0x4460,_0x584b64=_0xf2068e();while(!![]){try{const _0x28c1aa=-parseInt(_0x26a751(0x1c3))/0x1*(-parseInt(_0x26a751(0x1c4))/0x2)+parseInt(_0x26a751(0x1a3))/0x3*(parseInt(_0x26a751(0x1bb))/0x4)+parseInt(_0x26a751(0x1b8))/0x5*(parseInt(_0x26a751(0x1bf))/0x6)+parseInt(_0x26a751(0x1aa))/0x7+-parseInt(_0x26a751(0x1ad))/0x8*(-parseInt(_0x26a751(0x1c0))/0x9)+-parseInt(_0x26a751(0x1b3))/0xa+-parseInt(_0x26a751(0x1ba))/0xb*(parseInt(_0x26a751(0x19b))/0xc);if(_0x28c1aa===_0x4c5a0d)break;else _0x584b64['push'](_0x584b64['shift']());}catch(_0x567382){_0x584b64['push'](_0x584b64['shift']());}}}(a136_0xc5bd,0x76ae1));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a136_0x4460(_0x338a66,_0x3bf31e){_0x338a66=_0x338a66-0x199;const _0xc5bd24=a136_0xc5bd();let _0x4460a4=_0xc5bd24[_0x338a66];return _0x4460a4;}export function listLocalRuntimeSkills(_0x149d60,_0x3d8ce0,_0x15148b={}){const _0x26840c=a136_0x4460,_0x4b4ee7=safePathSegment(_0x149d60[_0x26840c(0x1ac)],'appCode');if(_0x3d8ce0[_0x26840c(0x1ac)]!==_0x4b4ee7)throw CliErrors[_0x26840c(0x1b7)](_0x26840c(0x1ab)+_0x3d8ce0[_0x26840c(0x1ac)]+_0x26840c(0x1ae)+_0x4b4ee7);const _0x3d5335=normalizeRuntimeSkillScopes(_0x149d60['scopes']),_0x3f945c=new Set(_0x3d5335),_0x198fac=_0x149d60[_0x26840c(0x1a2)]?.[_0x26840c(0x1c1)](),_0xb43791=new Map(),_0x2c29ae=resolve(getRuntimeSkillCacheRoot(_0x149d60['env'],_0x149d60['accessKey'],_0x15148b),_0x4b4ee7);for(const _0x153959 of _0x3d5335){for(const _0xf6c8c2 of localSkillEntryDirs(resolve(_0x2c29ae,_0x153959))){collectLocalRuntimeSkill(_0xb43791,_0xf6c8c2,{'appCode':_0x4b4ee7,'scopes':_0x3f945c,'code':_0x198fac,'source':'cache'});}}for(const _0x34f942 of _0x3d8ce0['skillRoots']){for(const _0x3f1952 of localSkillLinkCandidates(_0x34f942,_0x3d8ce0,_0x3f945c)){collectLocalRuntimeSkill(_0xb43791,_0x3f1952,{'appCode':_0x4b4ee7,'scopes':_0x3f945c,'code':_0x198fac,'source':_0x26840c(0x1be),'linkedPath':_0x3f1952});}}return Array[_0x26840c(0x19d)](_0xb43791['values']())[_0x26840c(0x1c2)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x202985){const _0x53ff42=a136_0x4460;if(!existsSync(_0x202985))return[];return readdirSync(_0x202985,{'withFileTypes':!![]})['filter'](_0x4a67ac=>_0x4a67ac['isDirectory']()||_0x4a67ac['isSymbolicLink']())[_0x53ff42(0x1af)](_0x5ddf34=>resolve(_0x202985,_0x5ddf34['name']));}function a136_0xc5bd(){const _0x28bcc5=['linkedPath','includes','276QKCBHs','isArray','from','get','cacheDir','skillMdPath','project','code','3AFxqFU','tags','name','has','dir','set','filter','3015481JVkYXk','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','appCode','8PwfOOD','\x20!=\x20','map','cache','linkedPaths','scope','1028210FDKTip','isSymbolicLink','builtin','startsWith','validation','322275igvdGn','isDirectory','676038UNTfxg','2310848CeyVpE','scopes','skillCode','link','36XjvpOp','1145799ljMZtJ','trim','sort','119983bNIjUQ','8TlnKvw','local'];a136_0xc5bd=function(){return _0x28bcc5;};return a136_0xc5bd();}function localSkillLinkCandidates(_0x2bb37d,_0x454f4a,_0x214f89){const _0x4e1271=a136_0x4460;if(!existsSync(_0x2bb37d))return[];const _0x300afa=_0x454f4a[_0x4e1271(0x1ac)]+'--';return readdirSync(_0x2bb37d,{'withFileTypes':!![]})['filter'](_0x1121d4=>_0x1121d4[_0x4e1271(0x1b9)]()||_0x1121d4[_0x4e1271(0x1b4)]())[_0x4e1271(0x1a9)](_0x315bc4=>_0x454f4a[_0x4e1271(0x1b2)]===_0x4e1271(0x1a1)||_0x315bc4[_0x4e1271(0x1a5)][_0x4e1271(0x1b6)](_0x300afa)||_0x214f89[_0x4e1271(0x1a6)](_0x4e1271(0x1b5)))['map'](_0x33d865=>resolve(_0x2bb37d,_0x33d865[_0x4e1271(0x1a5)]));}function collectLocalRuntimeSkill(_0x4f7359,_0xbb5f32,_0x19b2ea){const _0x2b05bb=a136_0x4460,_0x5dba9f=resolve(_0xbb5f32,METADATA_FILE),_0x5a937a=readMetadataIfPresent(_0x5dba9f);if(!_0x5a937a)return;if(_0x5a937a['appCode']!==_0x19b2ea[_0x2b05bb(0x1ac)])return;if(!isRuntimeSkillScope(_0x5a937a[_0x2b05bb(0x1b2)])||!_0x19b2ea[_0x2b05bb(0x1bc)][_0x2b05bb(0x1a6)](_0x5a937a[_0x2b05bb(0x1b2)]))return;const _0x5ca0d6=_0x5a937a[_0x2b05bb(0x1bd)]?.[_0x2b05bb(0x1c1)]();if(!_0x5ca0d6)return;if(_0x19b2ea[_0x2b05bb(0x1a2)]&&_0x5ca0d6!==_0x19b2ea[_0x2b05bb(0x1a2)])return;const _0x18b116=_0x5a937a[_0x2b05bb(0x1b2)]+':'+_0x5ca0d6,_0x2cc068=_0x19b2ea[_0x2b05bb(0x199)]?[_0x19b2ea['linkedPath']]:[],_0x3c8dfb=_0x4f7359[_0x2b05bb(0x19e)](_0x18b116);if(_0x3c8dfb){_0x19b2ea['source']===_0x2b05bb(0x1b0)&&(_0x3c8dfb[_0x2b05bb(0x1a7)]=_0xbb5f32,_0x3c8dfb[_0x2b05bb(0x19f)]=_0xbb5f32,_0x3c8dfb[_0x2b05bb(0x1a0)]=resolve(_0xbb5f32,SKILL_FILE),_0x3c8dfb['metadataPath']=_0x5dba9f);for(const _0x407773 of _0x2cc068){!_0x3c8dfb[_0x2b05bb(0x1b1)][_0x2b05bb(0x19a)](_0x407773)&&_0x3c8dfb[_0x2b05bb(0x1b1)]['push'](_0x407773);}_0x3c8dfb['linkedPaths']['sort']();return;}_0x4f7359[_0x2b05bb(0x1a8)](_0x18b116,{..._0x5a937a,'tags':Array[_0x2b05bb(0x19c)](_0x5a937a[_0x2b05bb(0x1a4)])?_0x5a937a[_0x2b05bb(0x1a4)]:[],'scope':_0x5a937a[_0x2b05bb(0x1b2)],'source':_0x2b05bb(0x1c5),'dir':_0xbb5f32,'cacheDir':_0x19b2ea['source']===_0x2b05bb(0x1b0)?_0xbb5f32:undefined,'skillMdPath':resolve(_0xbb5f32,SKILL_FILE),'metadataPath':_0x5dba9f,'linkedPaths':_0x2cc068});}function compareLocalRuntimeSkills(_0x72472f,_0x5cb8b6){const _0x3ba915=a136_0x4460,_0x47c9a0={'personal':0x0,'company':0x1,'builtin':0x2};return _0x47c9a0[_0x72472f['scope']]-_0x47c9a0[_0x5cb8b6[_0x3ba915(0x1b2)]]||_0x72472f[_0x3ba915(0x1bd)]['localeCompare'](_0x5cb8b6[_0x3ba915(0x1bd)])||_0x72472f['dir']['localeCompare'](_0x5cb8b6[_0x3ba915(0x1a7)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a2591,_0x15827f){const _0x7795c1=a137_0x5c65,_0x30c105=_0x2a2591();while(!![]){try{const _0x19529e=-parseInt(_0x7795c1(0x8f))/0x1+parseInt(_0x7795c1(0x9d))/0x2*(parseInt(_0x7795c1(0x92))/0x3)+parseInt(_0x7795c1(0xa3))/0x4+parseInt(_0x7795c1(0x9e))/0x5*(parseInt(_0x7795c1(0x85))/0x6)+parseInt(_0x7795c1(0x9c))/0x7+parseInt(_0x7795c1(0x9b))/0x8+-parseInt(_0x7795c1(0x96))/0x9*(parseInt(_0x7795c1(0x79))/0xa);if(_0x19529e===_0x15827f)break;else _0x30c105['push'](_0x30c105['shift']());}catch(_0xc812e4){_0x30c105['push'](_0x30c105['shift']());}}}(a137_0x485b,0x2a86f));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(_0x56a989){const _0x388f91=a137_0x5c65;return _0x56a989[_0x388f91(0x91)]??Buffer[_0x388f91(0x90)](_0x56a989[_0x388f91(0xa2)]??'',_0x388f91(0x95));}export function fileText(_0xaaa39f){const _0x5b93c8=a137_0x5c65;return fileContent(_0xaaa39f)[_0x5b93c8(0x89)](_0x5b93c8(0x95));}export function normalizeLocalFiles(_0x1a29a0){const _0x1d2070=a137_0x5c65;if(!Array[_0x1d2070(0x81)](_0x1a29a0)||_0x1a29a0[_0x1d2070(0x9f)]===0x0)return[];const _0x11c6ab=new Map();for(const _0xf40e40 of _0x1a29a0){if(!_0xf40e40||typeof _0xf40e40!=='object'||typeof _0xf40e40[_0x1d2070(0x80)]!==_0x1d2070(0x8a))throw CliErrors[_0x1d2070(0x7b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x439128=normalizeSkillRelativePath(_0xf40e40[_0x1d2070(0x80)]);if(_0x11c6ab[_0x1d2070(0x78)](_0x439128))throw CliErrors['validation'](_0x1d2070(0x97)+_0x439128);if(_0xf40e40['bytes']!==undefined&&!Buffer[_0x1d2070(0xa0)](_0xf40e40[_0x1d2070(0x91)]))throw CliErrors[_0x1d2070(0x7b)](_0x1d2070(0x7f)+_0x439128);if(_0xf40e40[_0x1d2070(0x91)]===undefined&&typeof _0xf40e40[_0x1d2070(0xa2)]!=='string')throw CliErrors['validation'](_0x1d2070(0x86)+_0x439128);const _0x3c5f67=fileContent(_0xf40e40);_0x11c6ab['set'](_0x439128,{'path':_0x439128,'bytes':_0x3c5f67});}return Array[_0x1d2070(0x90)](_0x11c6ab['values']())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0xb629c1){const _0xe881fa=a137_0x5c65;if(!Array['isArray'](_0xb629c1)||_0xb629c1['length']===0x0)return[];const _0x3fe9fc=new Map();for(const _0x4f3b45 of _0xb629c1){if(!_0x4f3b45||typeof _0x4f3b45!=='object'||typeof _0x4f3b45[_0xe881fa(0x80)]!==_0xe881fa(0x8a))throw CliErrors[_0xe881fa(0x7b)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x5c1598=normalizeSkillRelativePath(_0x4f3b45['path']);if(_0x3fe9fc[_0xe881fa(0x78)](_0x5c1598))throw CliErrors[_0xe881fa(0x7b)](_0xe881fa(0x97)+_0x5c1598);if(!isSha256Hex(_0x4f3b45[_0xe881fa(0x8c)]))throw CliErrors[_0xe881fa(0x7b)](_0xe881fa(0x82)+_0x5c1598);if(!Number[_0xe881fa(0x84)](_0x4f3b45[_0xe881fa(0x7a)])||_0x4f3b45['size']<0x0)throw CliErrors[_0xe881fa(0x7b)](_0xe881fa(0x99)+_0x5c1598);_0x3fe9fc[_0xe881fa(0x7c)](_0x5c1598,{'path':_0x5c1598,'sha256':_0x4f3b45[_0xe881fa(0x8c)][_0xe881fa(0xa4)](),'size':_0x4f3b45[_0xe881fa(0x7a)]});}return Array['from'](_0x3fe9fc[_0xe881fa(0xa1)]())[_0xe881fa(0x8b)](compareSkillFiles);}export function scanSkillDirectory(_0x4bd3aa,_0x476cae={}){const _0x1ea87a=a137_0x5c65,_0x326021=realpathSync(_0x4bd3aa),_0x3e45b3=canonicalExcludedFilePaths(_0x476cae[_0x1ea87a(0x83)]),_0x4abc80=[];function _0x38c34f(_0xee6462){const _0x2cecd1=_0x1ea87a,_0xb5ba94=readdirSync(_0xee6462,{'withFileTypes':!![]})['sort']((_0x4404e6,_0x2fc364)=>_0x4404e6[_0x2cecd1(0x93)]['localeCompare'](_0x2fc364[_0x2cecd1(0x93)]));for(const _0x10eedf of _0xb5ba94){if(_0x10eedf[_0x2cecd1(0x88)]()&&IGNORED_DIR_NAMES['has'](_0x10eedf[_0x2cecd1(0x93)]))continue;if(IGNORED_FILE_NAMES[_0x2cecd1(0x78)](_0x10eedf[_0x2cecd1(0x93)]))continue;const _0x244cd8=resolve(_0xee6462,_0x10eedf[_0x2cecd1(0x93)]);if(isExcludedFilePath(_0x244cd8,_0x3e45b3))continue;if(_0x10eedf[_0x2cecd1(0x7e)]())throw CliErrors[_0x2cecd1(0x7b)](_0x2cecd1(0x8d)+_0x244cd8);const _0x15f3f5=toPosixPath(relative(_0x326021,_0x244cd8));if(_0x10eedf[_0x2cecd1(0x88)]()){_0x38c34f(_0x244cd8);continue;}if(!_0x10eedf[_0x2cecd1(0x9a)]())continue;validateSkillRelativePath(_0x15f3f5);const _0x1a8ac7=readFileSync(_0x244cd8);_0x4abc80[_0x2cecd1(0x77)]({'path':_0x15f3f5,'bytes':_0x1a8ac7});}}return _0x38c34f(_0x326021),normalizeLocalFiles(_0x4abc80);}function a137_0x485b(){const _0x31be6a=['startsWith','push','has','168170XtGnyL','size','validation','set','includes','isSymbolicLink','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','path','isArray','Skill\x20file\x20sha256\x20is\x20invalid:\x20','excludedFilePaths','isSafeInteger','140628tNgZfk','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','split','isDirectory','toString','string','sort','sha256','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','test','323345XzljKX','from','bytes','11745NrbwHJ','name','add','utf8','144SzEtTy','Duplicate\x20Skill\x20file\x20path:\x20','trim','Skill\x20file\x20size\x20is\x20invalid:\x20','isFile','1708360QIjwcA','1142533aeXpfE','6odWqtp','20imwQZT','length','isBuffer','values','content','1137388SmDEpn','toLowerCase'];a137_0x485b=function(){return _0x31be6a;};return a137_0x485b();}function canonicalExcludedFilePaths(_0x59a00e){const _0x557a1f=a137_0x5c65,_0x343d03=new Set();for(const _0xe3661b of _0x59a00e??[]){const _0x17d3c7=resolve(_0xe3661b);_0x343d03['add'](_0x17d3c7);try{_0x343d03[_0x557a1f(0x94)](realpathSync(_0x17d3c7));}catch{}}return _0x343d03;}function a137_0x5c65(_0x2d94b2,_0x51a2d8){_0x2d94b2=_0x2d94b2-0x76;const _0x485bc9=a137_0x485b();let _0x5c653a=_0x485bc9[_0x2d94b2];return _0x5c653a;}function isExcludedFilePath(_0x1a53d2,_0x18ec19){const _0x5dd72c=a137_0x5c65;if(_0x18ec19[_0x5dd72c(0x78)](_0x1a53d2))return!![];if(_0x18ec19[_0x5dd72c(0x7a)]===0x0)return![];try{return _0x18ec19[_0x5dd72c(0x78)](realpathSync(_0x1a53d2));}catch{return![];}}export function compareSkillFiles(_0x49dcc6,_0x1d1970){const _0x4ee639=a137_0x5c65;if(_0x49dcc6[_0x4ee639(0x80)]===SKILL_FILE)return _0x1d1970[_0x4ee639(0x80)]===SKILL_FILE?0x0:-0x1;if(_0x1d1970[_0x4ee639(0x80)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer['from'](_0x49dcc6[_0x4ee639(0x80)],_0x4ee639(0x95)),Buffer[_0x4ee639(0x90)](_0x1d1970[_0x4ee639(0x80)],_0x4ee639(0x95)));}export function normalizeSkillRelativePath(_0x114408){const _0x2081d4=a137_0x5c65,_0x4abb69=toPosixPath(_0x114408[_0x2081d4(0x98)]());return validateSkillRelativePath(_0x4abb69),_0x4abb69;}export function validateSkillRelativePath(_0x54a287){const _0x2df6bc=a137_0x5c65;if(!_0x54a287||_0x54a287[_0x2df6bc(0x76)]('/')||_0x54a287[_0x2df6bc(0x7d)]('//'))throw CliErrors[_0x2df6bc(0x7b)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x54a287);for(const _0x256c7e of _0x54a287[_0x2df6bc(0x87)]('/')){if(!_0x256c7e||_0x256c7e==='.'||_0x256c7e==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x54a287);}}export function toPosixPath(_0x7e312a){return _0x7e312a['replace'](/\\/g,'/');}export function isSha256Hex(_0x418725){const _0x216c86=a137_0x5c65;return typeof _0x418725===_0x216c86(0x8a)&&/^[a-fA-F0-9]{64}$/[_0x216c86(0x8e)](_0x418725);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x36f089,_0x2b523c){const _0x26cb93=a138_0xa0f9,_0x25f06f=_0x36f089();while(!![]){try{const _0x4dda50=parseInt(_0x26cb93(0x9f))/0x1*(-parseInt(_0x26cb93(0x84))/0x2)+parseInt(_0x26cb93(0x8b))/0x3+-parseInt(_0x26cb93(0x8f))/0x4*(parseInt(_0x26cb93(0xb5))/0x5)+parseInt(_0x26cb93(0x7e))/0x6*(parseInt(_0x26cb93(0x8e))/0x7)+parseInt(_0x26cb93(0x9e))/0x8+-parseInt(_0x26cb93(0x82))/0x9*(-parseInt(_0x26cb93(0xb3))/0xa)+-parseInt(_0x26cb93(0x8c))/0xb;if(_0x4dda50===_0x2b523c)break;else _0x25f06f['push'](_0x25f06f['shift']());}catch(_0x470dd6){_0x25f06f['push'](_0x25f06f['shift']());}}}(a138_0x44cb,0x812db));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a138_0x44cb(){const _0x1c84c2=['---\x0a','length','name','2436048IyPFNc','3hXFYfU','---','pulledAt','test','path','displayName','stringify','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','name:\x20','validation','find','utf8','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','\x0a---\x0a\x0a','.\x20Changed\x20file:\x20','example','skillName','map','fileHashes','packageBytes','640DiYPxl','delete','117295wCGTWz','replace','trim','version','scope','6PyHPxW','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description','Runtime\x20Skill\x20package\x20is\x20missing\x20','100413yeqKXd','appCode','51406fkrAlY','slice','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','flow','skillCode','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','2705763IYqOpG','22654885PxQEBH','status','6038053pJUOQC','20tFacjW','isFile','has','displayName:\x20','contentHash','env','filter','keys','entries','join','errors','contents'];a138_0x44cb=function(){return _0x1c84c2;};return a138_0x44cb();}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(_0x433778,_0x430bf6,_0x3e7ef9){const _0x53b913=a138_0xa0f9,_0x33ef28=requireSkillCode(_0x433778),_0x51e11d=requirePackageBytes(_0x33ef28,_0x3e7ef9[_0x53b913(0xb2)]),_0x2bd6f6=extractDownloadedPackage(_0x51e11d),_0xd7c580=_0x2bd6f6[_0x53b913(0xa9)](_0x129a5=>_0x129a5[_0x53b913(0xa3)]===SKILL_FILE);if(!_0xd7c580)throw CliErrors['validation'](_0x53b913(0x81)+SKILL_FILE+':\x20'+_0x33ef28);const _0x229387=withMaterializedSkillFrontmatter(_0x2bd6f6,_0x433778,_0x33ef28),_0x14c972=_0x229387[_0x53b913(0xa9)](_0x53dabf=>_0x53dabf[_0x53b913(0xa3)]===SKILL_FILE),_0x39c824=fileText(_0x14c972),_0x34be8e=getRuntimeSkillDir(_0x3e7ef9[_0x53b913(0x94)],_0x3e7ef9['accessKey'],_0x3e7ef9[_0x53b913(0x83)],_0x430bf6,_0x33ef28,_0x3e7ef9['paths']),_0x50ff5f=resolve(_0x34be8e,SKILL_FILE),_0x144a6c=resolve(_0x34be8e,METADATA_FILE),_0x56c3a0=contentHash(_0x39c824),_0x867032=readMetadataIfPresent(_0x144a6c)?.[_0x53b913(0xb1)];ensurePulledFilesCanBeOverwritten(_0x34be8e,_0x144a6c,_0x229387,_0x3e7ef9['force']===!![]),mkdirSync(_0x34be8e,{'recursive':!![],'mode':0x1c0});const _0x3113cf=existsSync(_0x50ff5f)?readFileSync(_0x50ff5f,'utf8'):undefined;return materializeFiles(_0x34be8e,_0x229387),removeStaleManagedFiles(_0x34be8e,_0x867032,_0x229387),writeJsonAtomic(_0x144a6c,buildMetadata(_0x433778,_0x430bf6,_0x3e7ef9[_0x53b913(0x83)],_0x56c3a0,_0x3e7ef9[_0x53b913(0xa1)],_0x229387,_0x51e11d)),{'skill':_0x433778,'scope':_0x430bf6,'dir':_0x34be8e,'skillMdPath':_0x50ff5f,'metadataPath':_0x144a6c,'contentHash':_0x56c3a0,'changed':_0x3113cf!==_0x39c824};}export function reuseMaterializedRuntimeSkill(_0x257427,_0x349a49,_0x543b6b){const _0xe07244=a138_0xa0f9,_0x470d14=_0x257427[_0xe07244(0x7c)]?.[_0xe07244(0xb7)]();if(!_0x470d14)return undefined;const _0x3f6205=requireSkillCode(_0x257427),_0x5255f4=getRuntimeSkillDir(_0x543b6b['env'],_0x543b6b['accessKey'],_0x543b6b[_0xe07244(0x83)],_0x349a49,_0x3f6205,_0x543b6b['paths']),_0x450985=resolve(_0x5255f4,SKILL_FILE),_0x222bfd=resolve(_0x5255f4,METADATA_FILE),_0x3872f7=readMetadataIfPresent(_0x222bfd);if(!_0x3872f7||_0x3872f7['schemaVersion']!==0x2||_0x3872f7[_0xe07244(0x83)]!==_0x543b6b['appCode']||_0x3872f7[_0xe07244(0x7d)]!==_0x349a49||_0x3872f7[_0xe07244(0x89)]!==_0x3f6205||_0x3872f7['version']!==_0x470d14||_0x3872f7['id']!==_0x257427['id']||_0x3872f7[_0xe07244(0xaf)]!==_0x257427[_0xe07244(0xaf)]||_0x3872f7[_0xe07244(0x80)]!==_0x257427[_0xe07244(0x80)]||_0x3872f7[_0xe07244(0xae)]!==_0x257427['example']||_0x3872f7[_0xe07244(0x8d)]!==_0x257427[_0xe07244(0x8d)]||!_0x3872f7['contentHash']||!_0x3872f7[_0xe07244(0xb1)]||!Object['hasOwn'](_0x3872f7[_0xe07244(0xb1)],SKILL_FILE))return undefined;for(const [_0x1e142d,_0x11e144]of Object['entries'](_0x3872f7[_0xe07244(0xb1)])){if(!/^[a-f0-9]{64}$/[_0xe07244(0xa2)](_0x11e144))return undefined;const _0x3d9d05=resolveManagedFilePath(_0x5255f4,_0x1e142d);if(!existsSync(_0x3d9d05)||!lstatSync(_0x3d9d05)['isFile']())return undefined;if(bufferSha256(readFileSync(_0x3d9d05))!==_0x11e144)return undefined;}return{'skill':_0x257427,'scope':_0x349a49,'dir':_0x5255f4,'skillMdPath':_0x450985,'metadataPath':_0x222bfd,'contentHash':_0x3872f7[_0xe07244(0x93)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x16add1,_0x17dd0b,_0x4d4aa0){const _0x4d3d78=a138_0xa0f9,_0x5c0958=skillDisplayName(_0x17dd0b,_0x4d4aa0),_0x4e253c=_0x17dd0b['description']?.['trim']()||_0x5c0958||_0x4d4aa0;return normalizeLocalFiles(_0x16add1)[_0x4d3d78(0xb0)](_0x5a83dc=>{const _0x2d0459=_0x4d3d78,_0x38cc81=fileText(_0x5a83dc);if(_0x5a83dc[_0x2d0459(0xa3)]!==SKILL_FILE)return _0x5a83dc;if(hasYamlFrontmatter(_0x38cc81))return{'path':_0x5a83dc['path'],'content':withSyncedDisplayName(_0x38cc81,_0x5c0958)};return{'path':_0x5a83dc[_0x2d0459(0xa3)],'content':prependSkillFrontmatter(_0x38cc81,{'name':_0x4d4aa0,'displayName':_0x5c0958,'description':_0x4e253c})};});}function hasYamlFrontmatter(_0x264ddd){const _0x302f51=a138_0xa0f9;return/^\uFEFF?---\s*\r?\n/[_0x302f51(0xa2)](_0x264ddd);}function prependSkillFrontmatter(_0x140fd6,_0x24902d){const _0x11c2f9=a138_0xa0f9,_0x19a154=_0x140fd6[_0x11c2f9(0xb6)](/^\uFEFF/,'');return[_0x11c2f9(0xa0),_0x11c2f9(0xa7)+yamlString(_0x24902d[_0x11c2f9(0x9d)]),_0x24902d[_0x11c2f9(0xa4)]?_0x11c2f9(0x92)+yamlString(_0x24902d['displayName']):undefined,'description:\x20'+yamlString(_0x24902d[_0x11c2f9(0x80)]),'---','',_0x19a154][_0x11c2f9(0x95)](_0x54d0ee=>_0x54d0ee!==undefined)[_0x11c2f9(0x98)]('\x0a');}function yamlString(_0x695202){const _0x2665c4=a138_0xa0f9;return JSON[_0x2665c4(0xa5)](_0x695202[_0x2665c4(0xb6)](/\r/g,'')[_0x2665c4(0xb7)]());}function a138_0xa0f9(_0x21c318,_0x50e49f){_0x21c318=_0x21c318-0x7c;const _0x44cb84=a138_0x44cb();let _0xa0f94b=_0x44cb84[_0x21c318];return _0xa0f94b;}function skillDisplayName(_0xbc1db3,_0x40a6c5){const _0x3b993e=a138_0xa0f9,_0x43f1d1=_0xbc1db3[_0x3b993e(0xaf)]?.[_0x3b993e(0xb7)]();return _0x43f1d1||_0x40a6c5;}function withSyncedDisplayName(_0x4c5021,_0x5cfe7c){const _0x1a13b0=a138_0xa0f9,_0x651f20=_0x4c5021['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x651f20)return _0x4c5021;const _0x4bd9c3=_0x651f20[0x1]??'',_0x2cf9fc=_0x651f20[0x2]??'',_0x3d32a7=parseDocument(_0x2cf9fc);if(_0x3d32a7[_0x1a13b0(0x99)][_0x1a13b0(0x9c)]>0x0||!isMap(_0x3d32a7['contents']))return _0x4c5021;if(_0x5cfe7c)_0x3d32a7['set'](_0x1a13b0(0xa4),_0x5cfe7c);else{if(_0x3d32a7['has'](_0x1a13b0(0xa4)))_0x3d32a7[_0x1a13b0(0xb4)](_0x1a13b0(0xa4));else return _0x4c5021;}forceBlockCollections(_0x3d32a7[_0x1a13b0(0x9a)]);const _0x2f156e=_0x3d32a7['toString']({'lineWidth':0x0})['trimEnd'](),_0x1f3f58=_0x4c5021[_0x1a13b0(0x85)](_0x651f20[0x0][_0x1a13b0(0x9c)])['replace'](/^\r?\n/,'');return _0x4bd9c3+_0x1a13b0(0x9b)+_0x2f156e+_0x1a13b0(0xac)+_0x1f3f58;}function forceBlockCollections(_0xce7e3d){if(!isNode(_0xce7e3d))return;visit(_0xce7e3d,(_0x23e153,_0x5d5a39)=>{const _0x4bcf15=a138_0xa0f9;isCollection(_0x5d5a39)&&(_0x5d5a39[_0x4bcf15(0x88)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2fd1ac,_0x139512,_0x143289,_0x5dc10a){const _0x16fc4b=a138_0xa0f9;if(_0x5dc10a||!existsSync(_0x139512))return;const _0x34577e=readMetadataIfPresent(_0x139512);if(!_0x34577e)return;const _0x3c515a=_0x34577e[_0x16fc4b(0xb1)]&&Object[_0x16fc4b(0x96)](_0x34577e[_0x16fc4b(0xb1)])[_0x16fc4b(0x9c)]>0x0?_0x34577e['fileHashes']:undefined;if(_0x3c515a)for(const [_0x72e35f,_0x360702]of Object[_0x16fc4b(0x97)](_0x3c515a)){const _0x45e840=resolveManagedFilePath(_0x2fd1ac,_0x72e35f);if(!existsSync(_0x45e840))throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0xab)+_0x2fd1ac,_0x16fc4b(0x87)+_0x72e35f);const _0x236e54=lstatSync(_0x45e840);if(!_0x236e54[_0x16fc4b(0x90)]())throw CliErrors['validation'](_0x16fc4b(0xab)+_0x2fd1ac,_0x16fc4b(0x7f)+_0x72e35f);const _0x23417f=bufferSha256(readFileSync(_0x45e840));if(_0x23417f!==_0x360702)throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0xab)+_0x2fd1ac+_0x16fc4b(0xad)+_0x72e35f,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x72e35f);}else{const _0x7c6d77=resolve(_0x2fd1ac,SKILL_FILE);if(existsSync(_0x7c6d77)&&_0x34577e[_0x16fc4b(0x93)]){const _0x35edc3=contentHash(readFileSync(_0x7c6d77,_0x16fc4b(0xaa)));if(_0x35edc3!==_0x34577e[_0x16fc4b(0x93)])throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0x8a)+_0x7c6d77,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x46f351 of normalizeLocalFiles(_0x143289)){if(_0x3c515a?.[_0x46f351[_0x16fc4b(0xa3)]])continue;if(!_0x3c515a&&_0x46f351[_0x16fc4b(0xa3)]===SKILL_FILE)continue;const _0x3bacf1=resolveManagedFilePath(_0x2fd1ac,_0x46f351[_0x16fc4b(0xa3)]);if(!existsSync(_0x3bacf1))continue;const _0x1d262d=lstatSync(_0x3bacf1);if(!_0x1d262d['isFile']())throw CliErrors[_0x16fc4b(0xa8)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x2fd1ac,_0x16fc4b(0xa6)+_0x46f351[_0x16fc4b(0xa3)]);const _0x31582e=bufferSha256(readFileSync(_0x3bacf1));if(_0x31582e!==fileHash(_0x46f351))throw CliErrors[_0x16fc4b(0xa8)](_0x16fc4b(0xab)+_0x2fd1ac,_0x16fc4b(0x86)+_0x46f351[_0x16fc4b(0xa3)]);}}function materializeFiles(_0xb73f0d,_0x455c98){const _0x5b6bb0=a138_0xa0f9;for(const _0x3caa20 of normalizeLocalFiles(_0x455c98)){const _0x171685=resolveManagedFilePath(_0xb73f0d,_0x3caa20[_0x5b6bb0(0xa3)]);mkdirSync(dirname(_0x171685),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x171685,fileContent(_0x3caa20),0x180);}}function removeStaleManagedFiles(_0x4472f2,_0x6b8354,_0x454305){const _0x59fe41=a138_0xa0f9;if(!_0x6b8354)return;const _0x5e70aa=new Set(normalizeLocalFiles(_0x454305)['map'](_0x3abc86=>_0x3abc86[_0x59fe41(0xa3)]));for(const _0x255f9c of Object['keys'](_0x6b8354)){if(_0x5e70aa[_0x59fe41(0x91)](_0x255f9c))continue;const _0x12003d=resolveManagedFilePath(_0x4472f2,_0x255f9c);existsSync(_0x12003d)&&lstatSync(_0x12003d)[_0x59fe41(0x90)]()&&rmSync(_0x12003d,{'force':!![]});}}
|
|
1
|
+
(function(_0x1d52cd,_0x1bfd21){const _0x2f8671=a138_0x349d,_0x46c439=_0x1d52cd();while(!![]){try{const _0x3ff3ec=-parseInt(_0x2f8671(0x122))/0x1*(parseInt(_0x2f8671(0x145))/0x2)+-parseInt(_0x2f8671(0x11d))/0x3*(-parseInt(_0x2f8671(0x125))/0x4)+parseInt(_0x2f8671(0x130))/0x5*(-parseInt(_0x2f8671(0x155))/0x6)+-parseInt(_0x2f8671(0x13e))/0x7*(parseInt(_0x2f8671(0x153))/0x8)+parseInt(_0x2f8671(0x138))/0x9+-parseInt(_0x2f8671(0x127))/0xa+parseInt(_0x2f8671(0x123))/0xb;if(_0x3ff3ec===_0x1bfd21)break;else _0x46c439['push'](_0x46c439['shift']());}catch(_0x20271a){_0x46c439['push'](_0x46c439['shift']());}}}(a138_0x54ff,0x2a854));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';function a138_0x54ff(){const _0xc6f583=['description:\x20','flow','displayName','trim','contentHash','find','16bmXYIY','filter','6SxIfpw','keys','skillName','length','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','toString','delete','201XdYXTX','set','match','entries','Runtime\x20Skill\x20package\x20is\x20missing\x20','157SXcGUa','6306080ooKgig','---\x0a','2516eUsJPL','---','1481740dEUZdW','validation','packageBytes','map','isFile','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','status','name','967790hrrQQN','accessKey','example','slice','\x0a---\x0a\x0a','fileHashes','utf8','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','863010NrwNeY','.\x20Changed\x20file:\x20','paths','version','test','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','453719LjTBxt','replace','appCode','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','displayName:\x20','env','pulledAt','838mlLrwN','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','path','schemaVersion','skillCode','scope','force','description'];a138_0x54ff=function(){return _0xc6f583;};return a138_0x54ff();}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';function a138_0x349d(_0x2b3ea8,_0x3a1708){_0x2b3ea8=_0x2b3ea8-0x119;const _0x54ff92=a138_0x54ff();let _0x349d85=_0x54ff92[_0x2b3ea8];return _0x349d85;}export function materializeRuntimeSkill(_0x2b89df,_0x3368c0,_0x24156a){const _0x176859=a138_0x349d,_0x5d6d25=requireSkillCode(_0x2b89df),_0x4e5dc7=requirePackageBytes(_0x5d6d25,_0x24156a[_0x176859(0x129)]),_0x58cf0e=extractDownloadedPackage(_0x4e5dc7),_0x188bdc=_0x58cf0e[_0x176859(0x152)](_0x1a37b6=>_0x1a37b6['path']===SKILL_FILE);if(!_0x188bdc)throw CliErrors['validation'](_0x176859(0x121)+SKILL_FILE+':\x20'+_0x5d6d25);const _0x2ba848=withMaterializedSkillFrontmatter(_0x58cf0e,_0x2b89df,_0x5d6d25),_0x3467d2=_0x2ba848[_0x176859(0x152)](_0x19c072=>_0x19c072[_0x176859(0x147)]===SKILL_FILE),_0x3d6773=fileText(_0x3467d2),_0xbd1ac3=getRuntimeSkillDir(_0x24156a[_0x176859(0x143)],_0x24156a[_0x176859(0x131)],_0x24156a[_0x176859(0x140)],_0x3368c0,_0x5d6d25,_0x24156a[_0x176859(0x13a)]),_0x12376e=resolve(_0xbd1ac3,SKILL_FILE),_0x27759f=resolve(_0xbd1ac3,METADATA_FILE),_0x4af0e1=contentHash(_0x3d6773),_0x281be3=readMetadataIfPresent(_0x27759f)?.[_0x176859(0x135)];ensurePulledFilesCanBeOverwritten(_0xbd1ac3,_0x27759f,_0x2ba848,_0x24156a[_0x176859(0x14b)]===!![]),mkdirSync(_0xbd1ac3,{'recursive':!![],'mode':0x1c0});const _0x3fa871=existsSync(_0x12376e)?readFileSync(_0x12376e,_0x176859(0x136)):undefined;return materializeFiles(_0xbd1ac3,_0x2ba848),removeStaleManagedFiles(_0xbd1ac3,_0x281be3,_0x2ba848),writeJsonAtomic(_0x27759f,buildMetadata(_0x2b89df,_0x3368c0,_0x24156a['appCode'],_0x4af0e1,_0x24156a[_0x176859(0x144)],_0x2ba848,_0x4e5dc7)),{'skill':_0x2b89df,'scope':_0x3368c0,'dir':_0xbd1ac3,'skillMdPath':_0x12376e,'metadataPath':_0x27759f,'contentHash':_0x4af0e1,'changed':_0x3fa871!==_0x3d6773};}export function reuseMaterializedRuntimeSkill(_0xe3dcd0,_0x2d24e7,_0x168db4){const _0x2fbe20=a138_0x349d,_0x2cda94=_0xe3dcd0[_0x2fbe20(0x13b)]?.['trim']();if(!_0x2cda94)return undefined;const _0x3a26b3=requireSkillCode(_0xe3dcd0),_0x230f08=getRuntimeSkillDir(_0x168db4['env'],_0x168db4[_0x2fbe20(0x131)],_0x168db4[_0x2fbe20(0x140)],_0x2d24e7,_0x3a26b3,_0x168db4[_0x2fbe20(0x13a)]),_0x2aeb11=resolve(_0x230f08,SKILL_FILE),_0x47f98d=resolve(_0x230f08,METADATA_FILE),_0x13700c=readMetadataIfPresent(_0x47f98d);if(!_0x13700c||_0x13700c[_0x2fbe20(0x148)]!==0x2||_0x13700c['appCode']!==_0x168db4[_0x2fbe20(0x140)]||_0x13700c[_0x2fbe20(0x14a)]!==_0x2d24e7||_0x13700c[_0x2fbe20(0x149)]!==_0x3a26b3||_0x13700c[_0x2fbe20(0x13b)]!==_0x2cda94||_0x13700c['id']!==_0xe3dcd0['id']||_0x13700c['skillName']!==_0xe3dcd0[_0x2fbe20(0x157)]||_0x13700c[_0x2fbe20(0x14c)]!==_0xe3dcd0[_0x2fbe20(0x14c)]||_0x13700c[_0x2fbe20(0x132)]!==_0xe3dcd0[_0x2fbe20(0x132)]||_0x13700c[_0x2fbe20(0x12e)]!==_0xe3dcd0['status']||!_0x13700c['contentHash']||!_0x13700c[_0x2fbe20(0x135)]||!Object['hasOwn'](_0x13700c['fileHashes'],SKILL_FILE))return undefined;for(const [_0x50a12f,_0xfafc59]of Object[_0x2fbe20(0x120)](_0x13700c['fileHashes'])){if(!/^[a-f0-9]{64}$/['test'](_0xfafc59))return undefined;const _0x1c6d15=resolveManagedFilePath(_0x230f08,_0x50a12f);if(!existsSync(_0x1c6d15)||!lstatSync(_0x1c6d15)[_0x2fbe20(0x12b)]())return undefined;if(bufferSha256(readFileSync(_0x1c6d15))!==_0xfafc59)return undefined;}return{'skill':_0xe3dcd0,'scope':_0x2d24e7,'dir':_0x230f08,'skillMdPath':_0x2aeb11,'metadataPath':_0x47f98d,'contentHash':_0x13700c[_0x2fbe20(0x151)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x243d3d,_0x5aa4a3,_0x4ae812){const _0x356810=a138_0x349d,_0x3c2ab7=skillDisplayName(_0x5aa4a3,_0x4ae812),_0x1fe41f=_0x5aa4a3[_0x356810(0x14c)]?.[_0x356810(0x150)]()||_0x3c2ab7||_0x4ae812;return normalizeLocalFiles(_0x243d3d)[_0x356810(0x12a)](_0x50b9cd=>{const _0x22800d=_0x356810,_0x1b6f44=fileText(_0x50b9cd);if(_0x50b9cd[_0x22800d(0x147)]!==SKILL_FILE)return _0x50b9cd;if(hasYamlFrontmatter(_0x1b6f44))return{'path':_0x50b9cd[_0x22800d(0x147)],'content':withSyncedDisplayName(_0x1b6f44,_0x3c2ab7)};return{'path':_0x50b9cd[_0x22800d(0x147)],'content':prependSkillFrontmatter(_0x1b6f44,{'name':_0x4ae812,'displayName':_0x3c2ab7,'description':_0x1fe41f})};});}function hasYamlFrontmatter(_0xec4541){const _0x3852b1=a138_0x349d;return/^\uFEFF?---\s*\r?\n/[_0x3852b1(0x13c)](_0xec4541);}function prependSkillFrontmatter(_0x3247ff,_0x1cb547){const _0x3620b9=a138_0x349d,_0x5e710a=_0x3247ff[_0x3620b9(0x13f)](/^\uFEFF/,'');return[_0x3620b9(0x126),'name:\x20'+yamlString(_0x1cb547[_0x3620b9(0x12f)]),_0x1cb547[_0x3620b9(0x14f)]?_0x3620b9(0x142)+yamlString(_0x1cb547[_0x3620b9(0x14f)]):undefined,_0x3620b9(0x14d)+yamlString(_0x1cb547[_0x3620b9(0x14c)]),_0x3620b9(0x126),'',_0x5e710a][_0x3620b9(0x154)](_0x3bcd5a=>_0x3bcd5a!==undefined)['join']('\x0a');}function yamlString(_0xc3f512){const _0x20dca2=a138_0x349d;return JSON['stringify'](_0xc3f512['replace'](/\r/g,'')[_0x20dca2(0x150)]());}function skillDisplayName(_0x13322a,_0x2a6946){const _0x3f56de=a138_0x349d,_0x566f39=_0x13322a[_0x3f56de(0x157)]?.[_0x3f56de(0x150)]();return _0x566f39||_0x2a6946;}function withSyncedDisplayName(_0x5aec3e,_0x1efc36){const _0x24d0dd=a138_0x349d,_0x99e677=_0x5aec3e[_0x24d0dd(0x11f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x99e677)return _0x5aec3e;const _0x3e1f27=_0x99e677[0x1]??'',_0xb1da06=_0x99e677[0x2]??'',_0x3c7a33=parseDocument(_0xb1da06);if(_0x3c7a33['errors'][_0x24d0dd(0x119)]>0x0||!isMap(_0x3c7a33['contents']))return _0x5aec3e;if(_0x1efc36)_0x3c7a33[_0x24d0dd(0x11e)]('displayName',_0x1efc36);else{if(_0x3c7a33['has']('displayName'))_0x3c7a33[_0x24d0dd(0x11c)](_0x24d0dd(0x14f));else return _0x5aec3e;}forceBlockCollections(_0x3c7a33['contents']);const _0x1b5748=_0x3c7a33[_0x24d0dd(0x11b)]({'lineWidth':0x0})['trimEnd'](),_0x257bce=_0x5aec3e[_0x24d0dd(0x133)](_0x99e677[0x0][_0x24d0dd(0x119)])[_0x24d0dd(0x13f)](/^\r?\n/,'');return _0x3e1f27+_0x24d0dd(0x124)+_0x1b5748+_0x24d0dd(0x134)+_0x257bce;}function forceBlockCollections(_0x416069){if(!isNode(_0x416069))return;visit(_0x416069,(_0x168b16,_0x27ca0c)=>{const _0x17ad0a=a138_0x349d;isCollection(_0x27ca0c)&&(_0x27ca0c[_0x17ad0a(0x14e)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x568cea,_0x580867,_0x24904a,_0x39b042){const _0x5d2aa6=a138_0x349d;if(_0x39b042||!existsSync(_0x580867))return;const _0x40e9e4=readMetadataIfPresent(_0x580867);if(!_0x40e9e4)return;const _0x4f13cc=_0x40e9e4[_0x5d2aa6(0x135)]&&Object[_0x5d2aa6(0x156)](_0x40e9e4[_0x5d2aa6(0x135)])[_0x5d2aa6(0x119)]>0x0?_0x40e9e4[_0x5d2aa6(0x135)]:undefined;if(_0x4f13cc)for(const [_0x939591,_0x35fc49]of Object[_0x5d2aa6(0x120)](_0x4f13cc)){const _0x564e4f=resolveManagedFilePath(_0x568cea,_0x939591);if(!existsSync(_0x564e4f))throw CliErrors[_0x5d2aa6(0x128)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x568cea,_0x5d2aa6(0x12d)+_0x939591);const _0x320593=lstatSync(_0x564e4f);if(!_0x320593[_0x5d2aa6(0x12b)]())throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x12c)+_0x568cea,_0x5d2aa6(0x13d)+_0x939591);const _0x39dc12=bufferSha256(readFileSync(_0x564e4f));if(_0x39dc12!==_0x35fc49)throw CliErrors[_0x5d2aa6(0x128)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x568cea+_0x5d2aa6(0x139)+_0x939591,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x939591);}else{const _0x55bbe9=resolve(_0x568cea,SKILL_FILE);if(existsSync(_0x55bbe9)&&_0x40e9e4[_0x5d2aa6(0x151)]){const _0x28e2d1=contentHash(readFileSync(_0x55bbe9,_0x5d2aa6(0x136)));if(_0x28e2d1!==_0x40e9e4['contentHash'])throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x146)+_0x55bbe9,_0x5d2aa6(0x11a));}}for(const _0x3269f8 of normalizeLocalFiles(_0x24904a)){if(_0x4f13cc?.[_0x3269f8['path']])continue;if(!_0x4f13cc&&_0x3269f8[_0x5d2aa6(0x147)]===SKILL_FILE)continue;const _0x13c69e=resolveManagedFilePath(_0x568cea,_0x3269f8[_0x5d2aa6(0x147)]);if(!existsSync(_0x13c69e))continue;const _0x171de4=lstatSync(_0x13c69e);if(!_0x171de4[_0x5d2aa6(0x12b)]())throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x12c)+_0x568cea,_0x5d2aa6(0x137)+_0x3269f8[_0x5d2aa6(0x147)]);const _0x42496e=bufferSha256(readFileSync(_0x13c69e));if(_0x42496e!==fileHash(_0x3269f8))throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x12c)+_0x568cea,_0x5d2aa6(0x141)+_0x3269f8[_0x5d2aa6(0x147)]);}}function materializeFiles(_0x1cb3b1,_0x1a5938){const _0x373bee=a138_0x349d;for(const _0x5eb459 of normalizeLocalFiles(_0x1a5938)){const _0x2388c4=resolveManagedFilePath(_0x1cb3b1,_0x5eb459[_0x373bee(0x147)]);mkdirSync(dirname(_0x2388c4),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2388c4,fileContent(_0x5eb459),0x180);}}function removeStaleManagedFiles(_0x604e05,_0x270e2e,_0x48f5c6){const _0x282ae4=a138_0x349d;if(!_0x270e2e)return;const _0x594839=new Set(normalizeLocalFiles(_0x48f5c6)[_0x282ae4(0x12a)](_0x32162d=>_0x32162d[_0x282ae4(0x147)]));for(const _0x491c03 of Object[_0x282ae4(0x156)](_0x270e2e)){if(_0x594839['has'](_0x491c03))continue;const _0xeec74e=resolveManagedFilePath(_0x604e05,_0x491c03);existsSync(_0xeec74e)&&lstatSync(_0xeec74e)[_0x282ae4(0x12b)]()&&rmSync(_0xeec74e,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23e6f9,_0x5cbe3d){const _0xdb50a9=a139_0x211f,_0x4699bb=_0x23e6f9();while(!![]){try{const _0x240040=-parseInt(_0xdb50a9(0x121))/0x1*(-parseInt(_0xdb50a9(0x120))/0x2)+parseInt(_0xdb50a9(0x127))/0x3+parseInt(_0xdb50a9(0x11a))/0x4+parseInt(_0xdb50a9(0x126))/0x5*(parseInt(_0xdb50a9(0x130))/0x6)+-parseInt(_0xdb50a9(0x118))/0x7+-parseInt(_0xdb50a9(0x11f))/0x8*(-parseInt(_0xdb50a9(0x136))/0x9)+-parseInt(_0xdb50a9(0x114))/0xa;if(_0x240040===_0x5cbe3d)break;else _0x4699bb['push'](_0x4699bb['shift']());}catch(_0x302a7c){_0x4699bb['push'](_0x4699bb['shift']());}}}(a139_0x4075,0xd0938));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';function a139_0x211f(_0x40d859,_0x27d951){_0x40d859=_0x40d859-0x113;const _0x407566=a139_0x4075();let _0x211ff8=_0x407566[_0x40d859];return _0x211ff8;}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x30f04b,_0x37828d,_0x4f1a1a,_0x42a33a,_0x16536f,_0x5e6665,_0x295f51){const _0x53bc91=a139_0x211f,_0x465716=_0x5e6665?normalizeLocalFiles(_0x5e6665):[],_0x3e1b37=!_0x295f51&&_0x465716[_0x53bc91(0x125)]>0x0?buildSkillPackage(_0x465716):undefined,_0x49e9a2=_0x295f51?bufferSha256(_0x295f51):_0x3e1b37?.[_0x53bc91(0x128)][_0x53bc91(0x113)],_0x33a97a=_0x295f51?.[_0x53bc91(0x125)]??_0x3e1b37?.[_0x53bc91(0x128)]['zipSize'],_0x576134=_0x465716[_0x53bc91(0x125)]>0x0?Object[_0x53bc91(0x132)](_0x465716[_0x53bc91(0x12b)](_0x4fc606=>[_0x4fc606[_0x53bc91(0x123)],fileHash(_0x4fc606)])):undefined;return{'schemaVersion':_0x465716['length']>0x0?0x2:0x1,'id':_0x30f04b['id'],'appCode':_0x4f1a1a,'skillCode':requireSkillCode(_0x30f04b),'skillName':_0x30f04b[_0x53bc91(0x12f)],'description':_0x30f04b[_0x53bc91(0x12c)],'example':_0x30f04b['example'],'scope':_0x37828d,'readonly':_0x37828d!==_0x53bc91(0x117)||_0x30f04b[_0x53bc91(0x12e)]===!![],'tenantCode':_0x30f04b[_0x53bc91(0x11b)],'userId':_0x30f04b[_0x53bc91(0x131)],'version':_0x30f04b[_0x53bc91(0x12d)],'status':_0x30f04b[_0x53bc91(0x129)],'tags':Array[_0x53bc91(0x119)](_0x30f04b[_0x53bc91(0x11c)])?_0x30f04b[_0x53bc91(0x11c)]:[],'hasUpstreamUpdate':_0x30f04b['hasUpstreamUpdate'],'forkedFromSkillId':_0x30f04b[_0x53bc91(0x134)],'forkedFromVersion':_0x30f04b['forkedFromVersion'],'sourceSessionId':_0x30f04b[_0x53bc91(0x135)],'contentHash':_0x42a33a,'fileHashes':_0x576134,'treeHash':_0x465716[_0x53bc91(0x125)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x465716)):undefined,'ossPath':remoteManifestOssPath(_0x30f04b[_0x53bc91(0x11e)]),'zipSha256':_0x49e9a2,'zipSize':_0x33a97a,'files':_0x465716[_0x53bc91(0x125)]>0x0?_0x465716['map'](_0x38043e=>({'path':_0x38043e[_0x53bc91(0x123)],'hash':fileHash(_0x38043e),'size':fileContent(_0x38043e)['length']})):undefined,'pulledAt':_0x16536f??new Date()[_0x53bc91(0x124)]()};}function a139_0x4075(){const _0x6d055b=['isArray','951364pVSjqV','tenantCode','tags','validation','files','452728LljfZj','29254WrDAhJ','86anAUsZ','string','path','toISOString','length','120zJJyrV','400740IvxpOF','manifest','status','utf8','map','description','version','readonly','skillName','271482ZBwxMt','userId','fromEntries','parse','forkedFromSkillId','sourceSessionId','225eBgIlG','zipSha256','25418810UmdHxj','trim','skillCode','personal','5136859pltMIO'];a139_0x4075=function(){return _0x6d055b;};return a139_0x4075();}export function requireSkillCode(_0x2865b1){const _0x52153c=a139_0x211f,_0x283296=_0x2865b1[_0x52153c(0x116)]?.[_0x52153c(0x115)]();if(!_0x283296)throw CliErrors['validation']('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x283296;}export function readMetadataIfPresent(_0x55a1ea){const _0x34ed00=a139_0x211f;if(!existsSync(_0x55a1ea))return undefined;try{const _0x473039=JSON[_0x34ed00(0x133)](readFileSync(_0x55a1ea,_0x34ed00(0x12a)));return _0x473039;}catch{throw CliErrors[_0x34ed00(0x11d)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x55a1ea);}}function remoteManifestOssPath(_0x3a7f46){const _0x2ca1c1=a139_0x211f;if(!_0x3a7f46||typeof _0x3a7f46!=='object'||Array[_0x2ca1c1(0x119)](_0x3a7f46))return undefined;const _0x1f441d=_0x3a7f46['ossPath'];return typeof _0x1f441d===_0x2ca1c1(0x122)&&_0x1f441d[_0x2ca1c1(0x115)]()?_0x1f441d['trim']():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x3ef7dc=a140_0x4cf6;(function(_0x123a0c,_0x1e2e1d){const _0x228669=a140_0x4cf6,_0x33e082=_0x123a0c();while(!![]){try{const _0x2f0bf2=parseInt(_0x228669(0x133))/0x1*(parseInt(_0x228669(0x135))/0x2)+parseInt(_0x228669(0x137))/0x3*(-parseInt(_0x228669(0x13d))/0x4)+parseInt(_0x228669(0x136))/0x5+parseInt(_0x228669(0x13f))/0x6+-parseInt(_0x228669(0x12d))/0x7+-parseInt(_0x228669(0x138))/0x8*(-parseInt(_0x228669(0x141))/0x9)+parseInt(_0x228669(0x12e))/0xa;if(_0x2f0bf2===_0x1e2e1d)break;else _0x33e082['push'](_0x33e082['shift']());}catch(_0x23046a){_0x33e082['push'](_0x33e082['shift']());}}}(a140_0x160d,0xda736));function a140_0x4cf6(_0x52dba8,_0xba5a24){_0x52dba8=_0x52dba8-0x12d;const _0x160d20=a140_0x160d();let _0x4cf66a=_0x160d20[_0x52dba8];return _0x4cf66a;}import{existsSync}from'node:fs';import{homedir}from'node:os';function a140_0x160d(){const _0x13969a=['.agents','4258endSmy','483645PLtMBH','156810JiMtxS','72qaWTOE','.workbuddy','CLAUDE_SKILL_ROOT','path\x20segment','.claude','128tbpsMO','validation','8023824MZVhGU','skills','704574vOXSsj','trim','includes','workbuddySkillsDir','9312807duCxGM','6861920NgYXMM','filter','cache','appCode','skillCode','504sKrVJd'];a140_0x160d=function(){return _0x13969a;};return a140_0x160d();}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';export function resolveSkillSyncPaths(_0x3690b7={}){const _0x3c97ab=a140_0x4cf6,_0x35eeef=_0x3690b7['homeDir']??homedir(),_0x33f9c7=resolve(_0x35eeef,PRODUCT_CONFIG['homeDirName'],_0x3c97ab(0x130)),_0x4ab3ab=trimmedEnv('SKILL_ROOT'),_0xc8e439=trimmedEnv(_0x3c97ab(0x13a)),_0x29b9f4=resolve(_0x35eeef,_0x3c97ab(0x139)),_0x37463b=_0x3690b7[_0x3c97ab(0x144)]??(existsSync(_0x29b9f4)?resolve(_0x29b9f4,_0x3c97ab(0x140)):undefined);return{'homeDir':_0x35eeef,'cacheRoot':_0x33f9c7,'managedRoot':resolve(_0x35eeef,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x3690b7['agentsSkillsDir']??_0x4ab3ab??resolve(_0x35eeef,_0x3c97ab(0x134),_0x3c97ab(0x140)),'claudeSkillsDir':_0x3690b7['claudeSkillsDir']??_0xc8e439??resolve(_0x35eeef,_0x3c97ab(0x13c),'skills'),'workbuddySkillsDir':_0x37463b};}export function runtimeAgentSkillRoots(_0x5ef84e){const _0x3fae5a=a140_0x4cf6;return[_0x5ef84e['agentsSkillsDir'],_0x5ef84e['claudeSkillsDir'],_0x5ef84e['workbuddySkillsDir']][_0x3fae5a(0x12f)](_0x1148b3=>Boolean(_0x1148b3));}export function getRuntimeSkillCacheRoot(_0x2bded7,_0x53dbd1,_0x1b5640={}){const _0x37e1a4=a140_0x4cf6,_0x3b97f2=resolveSkillSyncPaths(_0x1b5640);return resolve(_0x3b97f2['cacheRoot'],_0x2bded7,fingerprintAccessKey(_0x53dbd1),_0x37e1a4(0x140));}export function getRuntimeSkillDir(_0x5d6856,_0x201eda,_0x4e5c23,_0xd5422e,_0x5c98b4,_0x151ff4={}){const _0x2f100b=a140_0x4cf6;return resolve(getRuntimeSkillCacheRoot(_0x5d6856,_0x201eda,_0x151ff4),safePathSegment(_0x4e5c23,_0x2f100b(0x131)),_0xd5422e,safePathSegment(_0x5c98b4,_0x2f100b(0x132)));}export function safePathSegment(_0x4ab4e8,_0x5c3e47=a140_0x3ef7dc(0x13b)){const _0x27525a=a140_0x3ef7dc;if(!_0x4ab4e8||_0x4ab4e8[_0x27525a(0x143)]('/')||_0x4ab4e8[_0x27525a(0x143)]('\x5c')||_0x4ab4e8[_0x27525a(0x143)]('..'))throw CliErrors[_0x27525a(0x13e)]('Unsafe\x20'+_0x5c3e47+'\x20for\x20local\x20path:\x20'+_0x4ab4e8);return _0x4ab4e8;}function trimmedEnv(_0x5988c0){const _0x180a9d=a140_0x3ef7dc,_0x5f40c3=productEnv(_0x5988c0)?.[_0x180a9d(0x142)]();return _0x5f40c3?_0x5f40c3:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4a716c,_0x9ab9cf){const _0x39e47a=a141_0x37e7,_0x134051=_0x4a716c();while(!![]){try{const _0x219ff1=-parseInt(_0x39e47a(0x17f))/0x1*(parseInt(_0x39e47a(0x155))/0x2)+-parseInt(_0x39e47a(0x142))/0x3+parseInt(_0x39e47a(0x169))/0x4*(parseInt(_0x39e47a(0x151))/0x5)+parseInt(_0x39e47a(0x167))/0x6*(-parseInt(_0x39e47a(0x172))/0x7)+parseInt(_0x39e47a(0x183))/0x8*(parseInt(_0x39e47a(0x178))/0x9)+-parseInt(_0x39e47a(0x154))/0xa*(-parseInt(_0x39e47a(0x15b))/0xb)+parseInt(_0x39e47a(0x14b))/0xc;if(_0x219ff1===_0x9ab9cf)break;else _0x134051['push'](_0x134051['shift']());}catch(_0x22f5ec){_0x134051['push'](_0x134051['shift']());}}}(a141_0xcd98,0x4f328));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x35be4c}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(_0x28ff47,_0x50f1fa,_0x38ee66={}){const _0x1a2038=a141_0x37e7,_0x225db1=resolvePushDirectoryRoot(_0x28ff47),_0x29c18e=readPushMetadataIfPresent(resolve(_0x225db1,METADATA_FILE),{'ignoreInvalidMetadata':_0x38ee66[_0x1a2038(0x145)]});if(_0x29c18e?.['appCode']&&_0x29c18e[_0x1a2038(0x14f)]!==_0x50f1fa&&!_0x38ee66[_0x1a2038(0x141)]&&!_0x38ee66[_0x1a2038(0x143)])throw CliErrors[_0x1a2038(0x16c)](_0x1a2038(0x15f)+_0x29c18e['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x50f1fa+'\x22.');const _0x55ca11=resolvePushSkillCode(_0x225db1,_0x50f1fa,_0x29c18e,_0x38ee66);if(!_0x55ca11)throw CliErrors[_0x1a2038(0x16c)](_0x1a2038(0x165)+SKILL_FILE+',\x20'+METADATA_FILE+_0x1a2038(0x171));return{'dir':_0x225db1,'skillCode':_0x55ca11,'metadata':_0x29c18e};}export function readPushDirectory(_0x1994f9,_0x7fc433,_0x11e770={}){const _0x4c2b05=a141_0x37e7,_0x5178d5=resolvePushDirectoryIdentity(_0x1994f9,_0x7fc433,_0x11e770),_0x1e17f7=_0x5178d5[_0x4c2b05(0x166)],_0x3a89b7=resolve(_0x1e17f7,SKILL_FILE);if(!existsSync(_0x3a89b7)||!lstatSync(_0x3a89b7)[_0x4c2b05(0x14d)]())throw CliErrors[_0x4c2b05(0x16c)](_0x4c2b05(0x149)+SKILL_FILE+':\x20'+_0x3a89b7);const _0x45307b=_0x5178d5[_0x4c2b05(0x17d)],_0x11bfe8=_0x11e770[_0x4c2b05(0x13d)]??_0x4c2b05(0x17e);if(!_0x11e770['ignoreMetadataScope']&&_0x45307b?.[_0x4c2b05(0x181)]===_0x4c2b05(0x174))throw CliErrors[_0x4c2b05(0x16c)](_0x4c2b05(0x159)+METADATA_FILE+_0x4c2b05(0x17c)+_0x45307b[_0x4c2b05(0x181)]+'\x22.');if(!_0x11e770[_0x4c2b05(0x152)]&&_0x11bfe8==='personal'&&_0x45307b?.['scope']&&_0x45307b[_0x4c2b05(0x181)]!=='personal')throw CliErrors[_0x4c2b05(0x16c)](_0x4c2b05(0x176)+METADATA_FILE+_0x4c2b05(0x17c)+_0x45307b[_0x4c2b05(0x181)]+'\x22.',_0x4c2b05(0x160)+_0x1e17f7+_0x4c2b05(0x156));const _0x16faa6=scanSkillDirectory(_0x1e17f7,{'excludedFilePaths':_0x11e770[_0x4c2b05(0x16a)]}),_0x2879d0=buildSkillPackage(_0x16faa6),_0x540b2d=readFileSync(_0x3a89b7,_0x4c2b05(0x13e)),_0x3fe839=_0x5178d5[_0x4c2b05(0x182)],_0x324bf1=_0x11e770[_0x4c2b05(0x153)]?undefined:_0x45307b,_0x23ac48=readSkillDisplayName(_0x540b2d);return{'skillCode':_0x3fe839,'metadata':_0x45307b,'frontmatterDisplayName':_0x23ac48,'input':{'skillCode':_0x3fe839,'skillName':_0x23ac48??_0x324bf1?.[_0x4c2b05(0x16d)],'description':_0x324bf1?.[_0x4c2b05(0x15e)],'content':_0x540b2d,'files':_0x2879d0[_0x4c2b05(0x16e)],'packageBase64':_0x2879d0['packageBase64'],'tags':_0x324bf1?.[_0x4c2b05(0x179)],'version':_0x324bf1?.[_0x4c2b05(0x175)],'sourceSessionId':_0x324bf1?.[_0x4c2b05(0x147)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x1d0542,_0x273001,_0x43408b,_0x31c720={}){const _0x10f753=a141_0x37e7,_0x4fc1c8=resolvePushDirectoryRoot(_0x1d0542),_0x5355a9=readPushMetadataIfPresent(resolve(_0x4fc1c8,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5ab6a6=requireRemoteScope(_0x273001),_0x49a6c3=readLocalSkillContent(_0x4fc1c8),_0x5efafd={..._0x273001,'appCode':_0x273001['appCode']??_0x43408b,'skillName':_0x273001['skillName']??_0x5355a9?.[_0x10f753(0x16d)],'description':_0x273001[_0x10f753(0x15e)]??_0x5355a9?.['description'],'example':_0x273001[_0x10f753(0x148)]??_0x5355a9?.[_0x10f753(0x148)],'tags':Array[_0x10f753(0x14e)](_0x273001[_0x10f753(0x179)])?_0x273001[_0x10f753(0x179)]:_0x5355a9?.[_0x10f753(0x179)],'sourceSessionId':_0x273001[_0x10f753(0x147)]??_0x5355a9?.[_0x10f753(0x147)],'content':_0x273001[_0x10f753(0x177)]??_0x49a6c3},_0x32cfe5=buildMetadata(_0x5efafd,_0x5ab6a6,_0x43408b,contentHash(_0x49a6c3),_0x31c720[_0x10f753(0x15d)]);writeJsonAtomic(resolve(_0x4fc1c8,METADATA_FILE),_0x32cfe5);}export function recordPushedRuntimeSkill(_0x273270,_0x1205b2,_0x3e7546,_0xb7a059={}){const _0x9ef5a4=a141_0x37e7,_0x4983e3=resolvePushDirectoryRoot(_0x273270),_0x3e5773=scanSkillDirectory(_0x4983e3),_0x5726b3=_0x3e5773[_0x9ef5a4(0x14c)](_0x172b70=>_0x172b70[_0x9ef5a4(0x157)]===SKILL_FILE),_0x492bc7=_0x5726b3?fileText(_0x5726b3):'',_0x64ac5a=tryNormalizePackageManifest(_0x1205b2[_0x9ef5a4(0x17b)]),_0x3b7676={..._0x1205b2,'content':_0x1205b2[_0x9ef5a4(0x177)]??_0x492bc7,'files':_0x64ac5a},_0x3cfb2e=_0x64ac5a?normalizeLocalFiles(_0x3e5773)[_0x9ef5a4(0x158)](_0x5eda69=>_0x64ac5a[_0x9ef5a4(0x17b)][_0x9ef5a4(0x163)](_0x2b4ee0=>_0x2b4ee0[_0x9ef5a4(0x157)]===_0x5eda69[_0x9ef5a4(0x157)])):undefined,_0x37af5a=buildMetadata(_0x3b7676,_0xb7a059[_0x9ef5a4(0x181)]??_0x9ef5a4(0x17e),_0x3e7546,contentHash(_0x3b7676[_0x9ef5a4(0x177)]??''),_0xb7a059[_0x9ef5a4(0x14a)],_0x3cfb2e);writeJsonAtomic(resolve(_0x4983e3,METADATA_FILE),_0x37af5a);}export function deriveSkillCodeFromDirectory(_0xa6e6bd,_0x8391a1){const _0x260f14=a141_0x37e7,_0x9af089=basename(resolve(_0xa6e6bd)),_0x27bd4f=_0x8391a1+'--';return _0x9af089[_0x260f14(0x140)](_0x27bd4f)?_0x9af089['slice'](_0x27bd4f[_0x260f14(0x13f)]):_0x9af089;}function a141_0x37e7(_0x4b5525,_0x580a61){_0x4b5525=_0x4b5525-0x13c;const _0xcd9834=a141_0xcd98();let _0x37e708=_0xcd9834[_0x4b5525];return _0x37e708;}function resolvePushSkillCode(_0x35c82f,_0x436593,_0x3b4258,_0x2d01ce){const _0x54ede2=a141_0x37e7,_0x1ee439=deriveSkillCodeFromSkillFile(_0x35c82f)||deriveSkillCodeFromDirectory(_0x35c82f,_0x436593);if(_0x2d01ce[_0x54ede2(0x16f)])return _0x1ee439;return _0x3b4258?.[_0x54ede2(0x182)]?.[_0x54ede2(0x173)]()||_0x1ee439;}function deriveSkillCodeFromSkillFile(_0xac5e58){const _0x2318d6=a141_0x37e7,_0x3c7441=resolve(_0xac5e58,SKILL_FILE);if(!existsSync(_0x3c7441)||!lstatSync(_0x3c7441)[_0x2318d6(0x14d)]())return undefined;const _0x39e157=readFileSync(_0x3c7441,_0x2318d6(0x13e)),_0x474b9f=_0x39e157['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x474b9f)return undefined;const _0x1d1c3f=parseFrontmatterObject(_0x474b9f[0x1]??''),_0x42e8ca=scalarToString(_0x1d1c3f?.[_0x2318d6(0x164)]);return _0x42e8ca?slugifySkillName(_0x42e8ca):undefined;}function readSkillDisplayName(_0x106d67){const _0x427549=a141_0x37e7,_0x292566=_0x106d67[_0x427549(0x15a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x292566)return undefined;const _0x3f153b=parseFrontmatterObject(_0x292566[0x1]??'');return scalarToString(_0x3f153b?.[_0x427549(0x13c)]);}function slugifySkillName(_0x26919e){const _0x519c80=a141_0x37e7,_0x55bb42=_0x26919e['trim']()[_0x519c80(0x168)]()[_0x519c80(0x144)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')['replace'](/-+$/,'')[_0x519c80(0x144)](/-{2,}/g,'-');if(!_0x55bb42)throw CliErrors[_0x519c80(0x16c)](_0x519c80(0x161)+SKILL_FILE+_0x519c80(0x180));return _0x55bb42;}function parseFrontmatterObject(_0x42bcc5){const _0x306a1d=a141_0x37e7;try{const _0x456f41=a141_0x35be4c(_0x42bcc5);return _0x456f41&&typeof _0x456f41==='object'&&!Array[_0x306a1d(0x14e)](_0x456f41)?_0x456f41:undefined;}catch{return undefined;}}function scalarToString(_0x429fa9){const _0x46e0d6=a141_0x37e7;if(typeof _0x429fa9===_0x46e0d6(0x15c))return _0x429fa9[_0x46e0d6(0x173)]();if(typeof _0x429fa9===_0x46e0d6(0x16b)||typeof _0x429fa9==='boolean')return String(_0x429fa9);return undefined;}function resolvePushDirectoryRoot(_0x12e3e2){const _0x2e8c85=a141_0x37e7,_0xcd6727=resolve(_0x12e3e2);if(!existsSync(_0xcd6727))throw CliErrors[_0x2e8c85(0x16c)](_0x2e8c85(0x170)+_0x12e3e2);const _0x5e7f8b=lstatSync(_0xcd6727);if(_0x5e7f8b[_0x2e8c85(0x17a)]())return _0xcd6727;if(_0x5e7f8b[_0x2e8c85(0x146)]()){const _0x360696=realpathSync(_0xcd6727);if(lstatSync(_0x360696)[_0x2e8c85(0x17a)]())return _0x360696;}throw CliErrors['validation'](_0x2e8c85(0x170)+_0x12e3e2);}function a141_0xcd98(){const _0x4b96ef=['ignoreMetadataAppCodeMismatch','replace','ignoreInvalidMetadata','isSymbolicLink','sourceSessionId','example','Missing\x20','pushedAt','4117308XutFSJ','find','isFile','isArray','appCode','(unknown)','37815PldNmt','ignoreMetadataScope','ignoreMetadataForPayload','1510100ndJdei','454mGjUmi','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','path','filter','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','match','22rEEADW','string','refreshedAt','description','Skill\x20metadata\x20appCode\x20\x22','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Invalid\x20','company','some','name','Unable\x20to\x20resolve\x20skillCode\x20from\x20','dir','19176byrwyf','toLowerCase','12CUqegm','excludedFilePaths','number','validation','skillName','manifest','ignoreMetadataSkillCode','Skill\x20directory\x20not\x20found:\x20',',\x20or\x20directory\x20name.','819Pwgwiw','trim','builtin','version','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','content','1746gGHKEa','tags','isDirectory','files','\x20has\x20scope=\x22','metadata','personal','569yaOKyH','\x20name\x20for\x20SkillHub\x20slug\x20generation.','scope','skillCode','13816KKviAZ','displayName','targetScope','utf8','length','startsWith','allowAppCodeRetarget','526107MXMYCs'];a141_0xcd98=function(){return _0x4b96ef;};return a141_0xcd98();}function requireRemoteScope(_0x78c8bd){const _0x4b0cae=a141_0x37e7;if(_0x78c8bd[_0x4b0cae(0x181)]===_0x4b0cae(0x17e)||_0x78c8bd[_0x4b0cae(0x181)]===_0x4b0cae(0x162)||_0x78c8bd[_0x4b0cae(0x181)]===_0x4b0cae(0x174))return _0x78c8bd[_0x4b0cae(0x181)];throw CliErrors[_0x4b0cae(0x16c)]('Remote\x20Skill\x20'+(_0x78c8bd[_0x4b0cae(0x182)]||_0x4b0cae(0x150))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0x78c8bd[_0x4b0cae(0x181)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x17c4cd){const _0x13f061=resolve(_0x17c4cd,SKILL_FILE);return existsSync(_0x13f061)&&lstatSync(_0x13f061)['isFile']()?readFileSync(_0x13f061,'utf8'):'';}function readPushMetadataIfPresent(_0x504382,_0x4894a6={}){const _0x20011b=a141_0x37e7;try{return readMetadataIfPresent(_0x504382);}catch(_0x2715b3){if(_0x4894a6[_0x20011b(0x145)])return undefined;throw _0x2715b3;}}
|
|
1
|
+
(function(_0x3fa481,_0x3601b3){const _0x3df6c4=a141_0x316d,_0x5673da=_0x3fa481();while(!![]){try{const _0x3ecb46=parseInt(_0x3df6c4(0x1d4))/0x1*(parseInt(_0x3df6c4(0x1e3))/0x2)+parseInt(_0x3df6c4(0x1d7))/0x3+-parseInt(_0x3df6c4(0x209))/0x4*(parseInt(_0x3df6c4(0x1e5))/0x5)+parseInt(_0x3df6c4(0x1cf))/0x6*(parseInt(_0x3df6c4(0x1d3))/0x7)+-parseInt(_0x3df6c4(0x1d5))/0x8*(parseInt(_0x3df6c4(0x1dd))/0x9)+parseInt(_0x3df6c4(0x1cc))/0xa+-parseInt(_0x3df6c4(0x1ee))/0xb;if(_0x3ecb46===_0x3601b3)break;else _0x5673da['push'](_0x5673da['shift']());}catch(_0x5cca74){_0x5673da['push'](_0x5673da['shift']());}}}(a141_0x2a08,0xb7bd1));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x687a9f}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(_0xeadde4,_0x4fb8c6,_0x43b70c={}){const _0x374dbd=a141_0x316d,_0x403fb7=resolvePushDirectoryRoot(_0xeadde4),_0x7ad18c=readPushMetadataIfPresent(resolve(_0x403fb7,METADATA_FILE),{'ignoreInvalidMetadata':_0x43b70c[_0x374dbd(0x1e8)]});if(_0x7ad18c?.[_0x374dbd(0x1f7)]&&_0x7ad18c[_0x374dbd(0x1f7)]!==_0x4fb8c6&&!_0x43b70c[_0x374dbd(0x1fc)]&&!_0x43b70c['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x374dbd(0x1cb)]('Skill\x20metadata\x20appCode\x20\x22'+_0x7ad18c[_0x374dbd(0x1f7)]+_0x374dbd(0x1e9)+_0x4fb8c6+'\x22.');const _0x21fb0e=resolvePushSkillCode(_0x403fb7,_0x4fb8c6,_0x7ad18c,_0x43b70c);if(!_0x21fb0e)throw CliErrors[_0x374dbd(0x1cb)](_0x374dbd(0x1e4)+SKILL_FILE+',\x20'+METADATA_FILE+_0x374dbd(0x1f3));return{'dir':_0x403fb7,'skillCode':_0x21fb0e,'metadata':_0x7ad18c};}export function readPushDirectory(_0x6c23df,_0x2d6c48,_0x2435cb={}){const _0x4e1b54=a141_0x316d,_0x11b3e1=resolvePushDirectoryIdentity(_0x6c23df,_0x2d6c48,_0x2435cb),_0x4c4956=_0x11b3e1[_0x4e1b54(0x1d8)],_0x557f81=resolve(_0x4c4956,SKILL_FILE);if(!existsSync(_0x557f81)||!lstatSync(_0x557f81)[_0x4e1b54(0x1ff)]())throw CliErrors[_0x4e1b54(0x1cb)]('Missing\x20'+SKILL_FILE+':\x20'+_0x557f81);const _0x5443c5=_0x11b3e1[_0x4e1b54(0x1d9)],_0x29672e=_0x2435cb[_0x4e1b54(0x1eb)]??_0x4e1b54(0x203);if(!_0x2435cb[_0x4e1b54(0x206)]&&_0x5443c5?.['scope']===_0x4e1b54(0x1f1))throw CliErrors[_0x4e1b54(0x1cb)](_0x4e1b54(0x1d1)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5443c5['scope']+'\x22.');if(!_0x2435cb['ignoreMetadataScope']&&_0x29672e==='personal'&&_0x5443c5?.[_0x4e1b54(0x1de)]&&_0x5443c5[_0x4e1b54(0x1de)]!==_0x4e1b54(0x203))throw CliErrors[_0x4e1b54(0x1cb)](_0x4e1b54(0x201)+METADATA_FILE+_0x4e1b54(0x1e0)+_0x5443c5[_0x4e1b54(0x1de)]+'\x22.',_0x4e1b54(0x1ce)+_0x4c4956+_0x4e1b54(0x1d2));const _0x235b4e=scanSkillDirectory(_0x4c4956,{'excludedFilePaths':_0x2435cb[_0x4e1b54(0x1fb)]}),_0x1f0264=buildSkillPackage(_0x235b4e),_0x3edbf0=readFileSync(_0x557f81,_0x4e1b54(0x1da)),_0x223fb6=_0x11b3e1[_0x4e1b54(0x1db)],_0x166ee0=_0x2435cb['ignoreMetadataForPayload']?undefined:_0x5443c5,_0x4890b4=readSkillDisplayName(_0x3edbf0);return{'skillCode':_0x223fb6,'metadata':_0x5443c5,'frontmatterDisplayName':_0x4890b4,'input':{'skillCode':_0x223fb6,'skillName':_0x4890b4??_0x166ee0?.[_0x4e1b54(0x205)],'description':_0x166ee0?.['description'],'content':_0x3edbf0,'files':_0x1f0264[_0x4e1b54(0x1ea)],'packageBase64':_0x1f0264[_0x4e1b54(0x1f5)],'tags':_0x166ee0?.[_0x4e1b54(0x1f6)],'version':_0x166ee0?.['version'],'sourceSessionId':_0x166ee0?.[_0x4e1b54(0x1f9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x486c2e,_0x429acf,_0x4ff22e,_0x3036b0={}){const _0x27f9d7=a141_0x316d,_0x49659c=resolvePushDirectoryRoot(_0x486c2e),_0xfd3270=readPushMetadataIfPresent(resolve(_0x49659c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4072b0=requireRemoteScope(_0x429acf),_0x2700a4=readLocalSkillContent(_0x49659c),_0x488fe5={..._0x429acf,'appCode':_0x429acf[_0x27f9d7(0x1f7)]??_0x4ff22e,'skillName':_0x429acf['skillName']??_0xfd3270?.[_0x27f9d7(0x205)],'description':_0x429acf[_0x27f9d7(0x1e6)]??_0xfd3270?.['description'],'example':_0x429acf[_0x27f9d7(0x1f0)]??_0xfd3270?.[_0x27f9d7(0x1f0)],'tags':Array['isArray'](_0x429acf['tags'])?_0x429acf[_0x27f9d7(0x1f6)]:_0xfd3270?.[_0x27f9d7(0x1f6)],'sourceSessionId':_0x429acf[_0x27f9d7(0x1f9)]??_0xfd3270?.[_0x27f9d7(0x1f9)],'content':_0x429acf[_0x27f9d7(0x1d0)]??_0x2700a4},_0x32d5f0=buildMetadata(_0x488fe5,_0x4072b0,_0x4ff22e,contentHash(_0x2700a4),_0x3036b0[_0x27f9d7(0x1ef)]);writeJsonAtomic(resolve(_0x49659c,METADATA_FILE),_0x32d5f0);}export function recordPushedRuntimeSkill(_0x4d0399,_0x1107ef,_0x42e93e,_0x1ba7ef={}){const _0x2d831b=a141_0x316d,_0x3bd57e=resolvePushDirectoryRoot(_0x4d0399),_0x12e24e=scanSkillDirectory(_0x3bd57e),_0x5c375c=_0x12e24e['find'](_0x10c3a4=>_0x10c3a4['path']===SKILL_FILE),_0x5146cc=_0x5c375c?fileText(_0x5c375c):'',_0x155514=tryNormalizePackageManifest(_0x1107ef[_0x2d831b(0x1ed)]),_0x170826={..._0x1107ef,'content':_0x1107ef[_0x2d831b(0x1d0)]??_0x5146cc,'files':_0x155514},_0x469574=_0x155514?normalizeLocalFiles(_0x12e24e)[_0x2d831b(0x1ca)](_0x440775=>_0x155514[_0x2d831b(0x1ed)]['some'](_0x1b7ad5=>_0x1b7ad5[_0x2d831b(0x1d6)]===_0x440775[_0x2d831b(0x1d6)])):undefined,_0x319ae9=buildMetadata(_0x170826,_0x1ba7ef[_0x2d831b(0x1de)]??_0x2d831b(0x203),_0x42e93e,contentHash(_0x170826[_0x2d831b(0x1d0)]??''),_0x1ba7ef[_0x2d831b(0x1df)],_0x469574);writeJsonAtomic(resolve(_0x3bd57e,METADATA_FILE),_0x319ae9);}export function deriveSkillCodeFromDirectory(_0x3b8e89,_0x506c52){const _0xdd49c8=a141_0x316d,_0x540de0=basename(resolve(_0x3b8e89)),_0x4cafa7=_0x506c52+'--';return _0x540de0[_0xdd49c8(0x1fe)](_0x4cafa7)?_0x540de0[_0xdd49c8(0x1c8)](_0x4cafa7['length']):_0x540de0;}function resolvePushSkillCode(_0x44137a,_0x32be26,_0x37fc62,_0x4980dd){const _0xf815d5=a141_0x316d,_0x8a15f8=deriveSkillCodeFromSkillFile(_0x44137a)||deriveSkillCodeFromDirectory(_0x44137a,_0x32be26);if(_0x4980dd[_0xf815d5(0x1e1)])return _0x8a15f8;return _0x37fc62?.[_0xf815d5(0x1db)]?.[_0xf815d5(0x1cd)]()||_0x8a15f8;}function deriveSkillCodeFromSkillFile(_0x805976){const _0x2eba57=a141_0x316d,_0x32c6fe=resolve(_0x805976,SKILL_FILE);if(!existsSync(_0x32c6fe)||!lstatSync(_0x32c6fe)[_0x2eba57(0x1ff)]())return undefined;const _0x112c2a=readFileSync(_0x32c6fe,'utf8'),_0x54518d=_0x112c2a[_0x2eba57(0x1dc)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x54518d)return undefined;const _0xc71e26=parseFrontmatterObject(_0x54518d[0x1]??''),_0x170edb=scalarToString(_0xc71e26?.[_0x2eba57(0x208)]);return _0x170edb?slugifySkillName(_0x170edb):undefined;}function readSkillDisplayName(_0x4990ee){const _0x1d6011=a141_0x316d,_0x51b829=_0x4990ee[_0x1d6011(0x1dc)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x51b829)return undefined;const _0x1c91a1=parseFrontmatterObject(_0x51b829[0x1]??'');return scalarToString(_0x1c91a1?.[_0x1d6011(0x1f8)]);}function a141_0x316d(_0xadbd2a,_0xec0f81){_0xadbd2a=_0xadbd2a-0x1c7;const _0x2a08b1=a141_0x2a08();let _0x316d67=_0x2a08b1[_0xadbd2a];return _0x316d67;}function slugifySkillName(_0x2f8a05){const _0x4d4464=a141_0x316d,_0x42e7a1=_0x2f8a05['trim']()[_0x4d4464(0x1ec)]()[_0x4d4464(0x1c9)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4d4464(0x1c9)](/^-+/,'')[_0x4d4464(0x1c9)](/-+$/,'')[_0x4d4464(0x1c9)](/-{2,}/g,'-');if(!_0x42e7a1)throw CliErrors[_0x4d4464(0x1cb)](_0x4d4464(0x207)+SKILL_FILE+_0x4d4464(0x1c7));return _0x42e7a1;}function parseFrontmatterObject(_0x3ebd60){const _0xf10de8=a141_0x316d;try{const _0x11c853=a141_0x687a9f(_0x3ebd60);return _0x11c853&&typeof _0x11c853==='object'&&!Array[_0xf10de8(0x204)](_0x11c853)?_0x11c853:undefined;}catch{return undefined;}}function scalarToString(_0x130698){const _0x5961ff=a141_0x316d;if(typeof _0x130698===_0x5961ff(0x1e2))return _0x130698[_0x5961ff(0x1cd)]();if(typeof _0x130698==='number'||typeof _0x130698==='boolean')return String(_0x130698);return undefined;}function resolvePushDirectoryRoot(_0x2bc677){const _0x3a4777=a141_0x316d,_0x365fea=resolve(_0x2bc677);if(!existsSync(_0x365fea))throw CliErrors[_0x3a4777(0x1cb)](_0x3a4777(0x1f4)+_0x2bc677);const _0x232e70=lstatSync(_0x365fea);if(_0x232e70[_0x3a4777(0x1e7)]())return _0x365fea;if(_0x232e70[_0x3a4777(0x1fd)]()){const _0x5caeeb=realpathSync(_0x365fea);if(lstatSync(_0x5caeeb)[_0x3a4777(0x1e7)]())return _0x5caeeb;}throw CliErrors[_0x3a4777(0x1cb)](_0x3a4777(0x1f4)+_0x2bc677);}function requireRemoteScope(_0x3e624c){const _0x58bcea=a141_0x316d;if(_0x3e624c[_0x58bcea(0x1de)]==='personal'||_0x3e624c[_0x58bcea(0x1de)]===_0x58bcea(0x200)||_0x3e624c[_0x58bcea(0x1de)]===_0x58bcea(0x1f1))return _0x3e624c['scope'];throw CliErrors[_0x58bcea(0x1cb)](_0x58bcea(0x202)+(_0x3e624c[_0x58bcea(0x1db)]||_0x58bcea(0x1fa))+_0x58bcea(0x1f2)+(_0x3e624c[_0x58bcea(0x1de)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x5cfe02){const _0x318bd4=a141_0x316d,_0x57bcb0=resolve(_0x5cfe02,SKILL_FILE);return existsSync(_0x57bcb0)&&lstatSync(_0x57bcb0)['isFile']()?readFileSync(_0x57bcb0,_0x318bd4(0x1da)):'';}function a141_0x2a08(){const _0x5609c8=['targetScope','toLowerCase','files','16140762gMfEbx','refreshedAt','example','builtin','\x20has\x20unsupported\x20scope\x20\x22',',\x20or\x20directory\x20name.','Skill\x20directory\x20not\x20found:\x20','packageBase64','tags','appCode','displayName','sourceSessionId','(unknown)','excludedFilePaths','allowAppCodeRetarget','isSymbolicLink','startsWith','isFile','company','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Remote\x20Skill\x20','personal','isArray','skillName','ignoreMetadataScope','Invalid\x20','name','4LbGUsD','\x20name\x20for\x20SkillHub\x20slug\x20generation.','slice','replace','filter','validation','765530pGabcS','trim','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','3010908KXPbAu','content','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','14KsiWQn','1223153XdVOgD','32kTCvvA','path','3559029SNQdvs','dir','metadata','utf8','skillCode','match','67923hKaZSh','scope','pushedAt','\x20has\x20scope=\x22','ignoreMetadataSkillCode','string','2EXJyMD','Unable\x20to\x20resolve\x20skillCode\x20from\x20','6197810xRJDPQ','description','isDirectory','ignoreInvalidMetadata','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','manifest'];a141_0x2a08=function(){return _0x5609c8;};return a141_0x2a08();}function readPushMetadataIfPresent(_0xc0a4ce,_0x43b39d={}){const _0xc2f04d=a141_0x316d;try{return readMetadataIfPresent(_0xc0a4ce);}catch(_0x1c48ea){if(_0x43b39d[_0xc2f04d(0x1e8)])return undefined;throw _0x1c48ea;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a142_0x40ab(_0x5e799b,_0x4a1425){_0x5e799b=_0x5e799b-0xe4;const _0x595513=a142_0x5955();let _0x40ab4a=_0x595513[_0x5e799b];return _0x40ab4a;}(function(_0xb4b85c,_0xb49a41){const _0x2470a9=a142_0x40ab,_0x35b0c4=_0xb4b85c();while(!![]){try{const _0x2a698a=parseInt(_0x2470a9(0xe4))/0x1*(-parseInt(_0x2470a9(0xe6))/0x2)+-parseInt(_0x2470a9(0xed))/0x3*(parseInt(_0x2470a9(0xea))/0x4)+parseInt(_0x2470a9(0xe5))/0x5*(-parseInt(_0x2470a9(0xf0))/0x6)+parseInt(_0x2470a9(0xec))/0x7+parseInt(_0x2470a9(0xe7))/0x8*(-parseInt(_0x2470a9(0xef))/0x9)+parseInt(_0x2470a9(0xe9))/0xa+parseInt(_0x2470a9(0xee))/0xb;if(_0x2a698a===_0xb49a41)break;else _0x35b0c4['push'](_0x35b0c4['shift']());}catch(_0x2ae8b5){_0x35b0c4['push'](_0x35b0c4['shift']());}}}(a142_0x5955,0x4550f));function a142_0x5955(){const _0x560b4b=['personal','360509HaHcXT','165WXrxhU','2duhPJc','8CxJeYv','Unsupported\x20runtime\x20Skill\x20scope:\x20','52090ZWPTOW','1196060tuWhpp','push','708456vOtpzG','3yDqeEx','11927586xwwVIl','1852371gkVoVD','7542drMJjz'];a142_0x5955=function(){return _0x560b4b;};return a142_0x5955();}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x2ecf79){const _0x22f1dc=a142_0x40ab,_0x573611=_0x2ecf79&&_0x2ecf79['length']>0x0?_0x2ecf79:[_0x22f1dc(0xf1),'company','builtin'],_0x5a1b7f=[];for(const _0x5c6d6e of _0x573611){if(!isRuntimeSkillScope(_0x5c6d6e))throw CliErrors['validation'](_0x22f1dc(0xe8)+_0x5c6d6e);!_0x5a1b7f['includes'](_0x5c6d6e)&&_0x5a1b7f[_0x22f1dc(0xeb)](_0x5c6d6e);}return _0x5a1b7f;}export function isRuntimeSkillScope(_0x3b56cf){const _0x226cc5=a142_0x40ab;return _0x3b56cf===_0x226cc5(0xf1)||_0x3b56cf==='company'||_0x3b56cf==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a144_0x39040d=a144_0x744c;(function(_0x47a675,_0x168a55){const _0x1970a9=a144_0x744c,_0x2b5f9f=_0x47a675();while(!![]){try{const _0x58ac4f=parseInt(_0x1970a9(0x1c4))/0x1*(parseInt(_0x1970a9(0x1b9))/0x2)+-parseInt(_0x1970a9(0x1be))/0x3*(-parseInt(_0x1970a9(0x1b2))/0x4)+parseInt(_0x1970a9(0x1c9))/0x5+-parseInt(_0x1970a9(0x1c8))/0x6*(parseInt(_0x1970a9(0x1c0))/0x7)+parseInt(_0x1970a9(0x1b3))/0x8+parseInt(_0x1970a9(0x1bc))/0x9+-parseInt(_0x1970a9(0x1bf))/0xa;if(_0x58ac4f===_0x168a55)break;else _0x2b5f9f['push'](_0x2b5f9f['shift']());}catch(_0x31ea68){_0x2b5f9f['push'](_0x2b5f9f['shift']());}}}(a144_0x34f2,0x49615));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a144_0x34f2(){const _0x177ab1=['code','45gonPSM','2042130laiqyj','3620141tMKBie','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation','1owIEIg','from','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','entries','6FPVAHs','1534205eIMAyo','path','69268qGymJE','2779360eaGwnN','sort','endsWith','validation_error','map','length','9600igVyqF','name','object','928125SsqriY'];a144_0x34f2=function(){return _0x177ab1;};return a144_0x34f2();}const ZIP_MTIME=new Date(a144_0x39040d(0x1c1));export function createDeterministicZipPackage(_0x2546ec){const _0x49ae71=a144_0x39040d,_0x406583={};for(const _0x3949a6 of normalizeLocalFiles(_0x2546ec)){_0x406583[_0x3949a6[_0x49ae71(0x1ca)]]=fileContent(_0x3949a6);}return Buffer[_0x49ae71(0x1c5)](zipSync(_0x406583,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x5a957b){const _0x3e3c34=a144_0x39040d;if(_0x5a957b[_0x3e3c34(0x1b8)]<0x16)throw CliErrors[_0x3e3c34(0x1c3)](_0x3e3c34(0x1c2));let _0x2f509d;try{_0x2f509d=unzipSync(_0x5a957b,{'filter'(_0x4f2fd){const _0x824e44=_0x3e3c34,_0x5ab2e1=normalizeSkillRelativePath(_0x4f2fd[_0x824e44(0x1ba)]);if(_0x5ab2e1[_0x824e44(0x1b5)]('/'))throw CliErrors[_0x824e44(0x1c3)](_0x824e44(0x1c6)+_0x5ab2e1);return!![];}});}catch(_0x5c35dd){if(isRuntimeSkillValidationError(_0x5c35dd))throw _0x5c35dd;throw CliErrors[_0x3e3c34(0x1c3)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x3e3c34(0x1c7)](_0x2f509d)[_0x3e3c34(0x1b7)](([_0x386fe4,_0x1af8f3])=>({'path':normalizeSkillRelativePath(_0x386fe4),'bytes':Buffer[_0x3e3c34(0x1c5)](_0x1af8f3)}))[_0x3e3c34(0x1b4)](compareSkillFiles);}function a144_0x744c(_0x22489f,_0x10d8f8){_0x22489f=_0x22489f-0x1b2;const _0x34f228=a144_0x34f2();let _0x744c49=_0x34f228[_0x22489f];return _0x744c49;}function isRuntimeSkillValidationError(_0x53b01c){const _0x13599c=a144_0x39040d;return typeof _0x53b01c===_0x13599c(0x1bb)&&_0x53b01c!==null&&_0x13599c(0x1bd)in _0x53b01c&&_0x53b01c[_0x13599c(0x1bd)]===_0x13599c(0x1b6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5cbcbf,_0x5ee912){const _0x405a43=a145_0x26f4,_0xa24737=_0x5cbcbf();while(!![]){try{const _0x55b2cb=-parseInt(_0x405a43(0x1a8))/0x1+parseInt(_0x405a43(0x1bb))/0x2*(parseInt(_0x405a43(0x1bc))/0x3)+parseInt(_0x405a43(0x1a0))/0x4*(-parseInt(_0x405a43(0x1c5))/0x5)+parseInt(_0x405a43(0x1ce))/0x6*(parseInt(_0x405a43(0x1a4))/0x7)+-parseInt(_0x405a43(0x1a3))/0x8*(parseInt(_0x405a43(0x1af))/0x9)+-parseInt(_0x405a43(0x1cb))/0xa*(-parseInt(_0x405a43(0x1c4))/0xb)+parseInt(_0x405a43(0x1ab))/0xc*(-parseInt(_0x405a43(0x1b7))/0xd);if(_0x55b2cb===_0x5ee912)break;else _0xa24737['push'](_0xa24737['shift']());}catch(_0x58b56a){_0xa24737['push'](_0xa24737['shift']());}}}(a145_0x4996,0xdbc26));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';function a145_0x26f4(_0x4d6310,_0x42cd2e){_0x4d6310=_0x4d6310-0x1a0;const _0x49960d=a145_0x4996();let _0x26f421=_0x49960d[_0x4d6310];return _0x26f421;}import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';function a145_0x4996(){const _0x5d2a55=['zipSha256','283829lMUESn','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','length','5096gUDVkK','360cWLooc','Missing\x20','isArray','files','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','schemaVersion','object','4868171DQWSqc','21025eSzhNe','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','sha256','bytes','Duplicate\x20Skill\x20package\x20entry:\x20','path','10AuaNwa','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','validation','303384NlcXUg','120AfPTPG','map','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','1913232sADJBm','203yjhpwH','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','get','treeSha256','403414jlqozd','Runtime\x20Skill\x20package\x20is\x20missing\x20','isSafeInteger','300iqWlRn','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','ossPath','base64','9cZSlDy','some','toLowerCase','size','requireOssPath','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','zipSize'];a145_0x4996=function(){return _0x5d2a55;};return a145_0x4996();}export function buildSkillPackage(_0x3d8583){const _0x23ac27=a145_0x26f4,_0x536e1e=normalizeLocalFiles(_0x3d8583);if(!_0x536e1e[_0x23ac27(0x1b0)](_0x246b2c=>_0x246b2c[_0x23ac27(0x1ca)]===SKILL_FILE))throw CliErrors['validation'](_0x23ac27(0x1bd)+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x34cc74=localFilesToManifestFiles(_0x536e1e),_0x4b7978=createDeterministicZipPackage(_0x536e1e);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x34cc74),'zipSha256':bufferSha256(_0x4b7978),'zipSize':_0x4b7978[_0x23ac27(0x1ba)],'files':_0x34cc74},'packageBytes':_0x4b7978,'packageBase64':_0x4b7978['toString'](_0x23ac27(0x1ae))};}export function verifyRuntimeSkillPackage(_0x18ad54,_0x4c544f){const _0x23ab8d=a145_0x26f4,_0x100344=normalizePackageManifest(_0x18ad54,{'requireOssPath':![]});if(!_0x100344)throw CliErrors[_0x23ab8d(0x1cd)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x100344,_0x4c544f);}export function verifyRuntimeSkillBundle(_0x577f07,_0x2df102){const _0x8f6d5d=a145_0x26f4,_0x150249=normalizePackageManifest(_0x577f07,{'requireOssPath':![]});if(!_0x150249)throw CliErrors[_0x8f6d5d(0x1cd)](_0x8f6d5d(0x1a2));return extractAndVerifyPackageFiles(_0x150249,_0x2df102);}export function tryNormalizePackageManifest(_0x5dbfef){return normalizePackageManifest(_0x5dbfef,{'requireOssPath':![]});}export function requirePackageBytes(_0x56b4d2,_0x33b1d8){const _0x40f8d1=a145_0x26f4;if(!_0x33b1d8||_0x33b1d8['length']===0x0)throw CliErrors[_0x40f8d1(0x1cd)](_0x40f8d1(0x1a5)+_0x56b4d2);return _0x33b1d8;}export function extractDownloadedPackage(_0x273ee4){const _0x3c235e=a145_0x26f4,_0x4c2262=parseZipPackage(_0x273ee4)[_0x3c235e(0x1a1)](_0x35d472=>({'path':_0x35d472[_0x3c235e(0x1ca)],'bytes':_0x35d472[_0x3c235e(0x1c8)]}));if(!_0x4c2262[_0x3c235e(0x1b0)](_0xcb6509=>_0xcb6509['path']===SKILL_FILE))throw CliErrors[_0x3c235e(0x1cd)](_0x3c235e(0x1a9)+SKILL_FILE+'.');return normalizeLocalFiles(_0x4c2262);}export function localFilesToManifestFiles(_0x434908){const _0x380a2f=a145_0x26f4;return normalizeLocalFiles(_0x434908)['map'](_0x2b1748=>({'path':_0x2b1748[_0x380a2f(0x1ca)],'sha256':fileHash(_0x2b1748),'size':fileContent(_0x2b1748)['length']}));}function normalizePackageManifest(_0x13426d,_0xeae69c){const _0x15894c=a145_0x26f4;if(!_0x13426d||typeof _0x13426d!==_0x15894c(0x1c3)||Array['isArray'](_0x13426d))return undefined;const _0x262503=_0x13426d,_0x36611a=typeof _0x262503[_0x15894c(0x1ad)]==='string'?_0x262503[_0x15894c(0x1ad)]['trim']():undefined;if(_0xeae69c[_0x15894c(0x1b3)]&&!_0x36611a)return undefined;if(!Array[_0x15894c(0x1be)](_0x262503[_0x15894c(0x1bf)])||_0x262503[_0x15894c(0x1bf)][_0x15894c(0x1ba)]===0x0)return undefined;if(!isSha256Hex(_0x262503[_0x15894c(0x1a7)]))throw CliErrors[_0x15894c(0x1cd)](_0x15894c(0x1b4));if(!isSha256Hex(_0x262503['zipSha256']))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.');if(!Number[_0x15894c(0x1aa)](_0x262503[_0x15894c(0x1b5)])||_0x262503[_0x15894c(0x1b5)]<0x0)throw CliErrors[_0x15894c(0x1cd)](_0x15894c(0x1c6));const _0x11d156=normalizeManifestFiles(_0x262503[_0x15894c(0x1bf)]);if(!_0x11d156[_0x15894c(0x1b0)](_0x2509a0=>_0x2509a0[_0x15894c(0x1ca)]===SKILL_FILE))throw CliErrors[_0x15894c(0x1cd)](_0x15894c(0x1c1)+SKILL_FILE+'.');const _0x56b05f=fileTreeHash(_0x11d156);if(_0x56b05f!==_0x262503[_0x15894c(0x1a7)][_0x15894c(0x1b1)]())throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x15894c(0x1aa)](_0x262503[_0x15894c(0x1c2)])?_0x262503['schemaVersion']:0x2,'ossPath':_0x36611a,'treeSha256':_0x56b05f,'zipSha256':_0x262503[_0x15894c(0x1b6)][_0x15894c(0x1b1)](),'zipSize':_0x262503['zipSize'],'files':_0x11d156};}function extractAndVerifyPackage(_0x3169a0,_0x514a92){const _0x24913b=a145_0x26f4,_0x21cc74=normalizePackageManifest(_0x3169a0,{'requireOssPath':![]});if(!_0x21cc74)throw CliErrors[_0x24913b(0x1cd)](_0x24913b(0x1a2));if(_0x514a92[_0x24913b(0x1ba)]!==_0x21cc74[_0x24913b(0x1b5)])throw CliErrors[_0x24913b(0x1cd)]('Runtime\x20Skill\x20package\x20size\x20mismatch.');const _0x133cc2=bufferSha256(_0x514a92);if(_0x133cc2!==_0x21cc74[_0x24913b(0x1b6)])throw CliErrors['validation'](_0x24913b(0x1b9));return extractAndVerifyPackageFiles(_0x21cc74,_0x514a92);}function extractAndVerifyPackageFiles(_0x2f6f20,_0x10b2e0){const _0x3814d3=a145_0x26f4,_0x572be1=parseZipPackage(_0x10b2e0);if(_0x572be1[_0x3814d3(0x1ba)]!==_0x2f6f20[_0x3814d3(0x1bf)][_0x3814d3(0x1ba)])throw CliErrors[_0x3814d3(0x1cd)](_0x3814d3(0x1cc));const _0x3eedc7=new Map();for(const _0x32ff81 of _0x572be1){if(_0x3eedc7['has'](_0x32ff81['path']))throw CliErrors['validation'](_0x3814d3(0x1c9)+_0x32ff81[_0x3814d3(0x1ca)]);_0x3eedc7['set'](_0x32ff81[_0x3814d3(0x1ca)],_0x32ff81);}const _0x3e6f50=[];for(const _0xac16dc of _0x2f6f20[_0x3814d3(0x1bf)]){const _0x17c3b6=_0x3eedc7[_0x3814d3(0x1a6)](_0xac16dc['path']);if(!_0x17c3b6)throw CliErrors[_0x3814d3(0x1cd)](_0x3814d3(0x1b8)+_0xac16dc[_0x3814d3(0x1ca)]);if(_0x17c3b6[_0x3814d3(0x1c8)]['length']!==_0xac16dc[_0x3814d3(0x1b2)])throw CliErrors[_0x3814d3(0x1cd)](_0x3814d3(0x1ac)+_0xac16dc[_0x3814d3(0x1ca)]);const _0x440ecc=bufferSha256(_0x17c3b6[_0x3814d3(0x1c8)]);if(_0x440ecc!==_0xac16dc[_0x3814d3(0x1c7)])throw CliErrors['validation'](_0x3814d3(0x1c0)+_0xac16dc[_0x3814d3(0x1ca)]);_0x3e6f50['push']({'path':_0xac16dc[_0x3814d3(0x1ca)],'bytes':_0x17c3b6[_0x3814d3(0x1c8)]});}return normalizeLocalFiles(_0x3e6f50);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27df6b,_0x55fdc4){var _0x420d64=a146_0x5e89,_0x218816=_0x27df6b();while(!![]){try{var _0xbba4ba=parseInt(_0x420d64(0x188))/0x1+parseInt(_0x420d64(0x187))/0x2+-parseInt(_0x420d64(0x18d))/0x3+parseInt(_0x420d64(0x189))/0x4+-parseInt(_0x420d64(0x18b))/0x5+-parseInt(_0x420d64(0x186))/0x6*(-parseInt(_0x420d64(0x18c))/0x7)+-parseInt(_0x420d64(0x185))/0x8*(parseInt(_0x420d64(0x18a))/0x9);if(_0xbba4ba===_0x55fdc4)break;else _0x218816['push'](_0x218816['shift']());}catch(_0x58c8d5){_0x218816['push'](_0x218816['shift']());}}}(a146_0x5533,0xe4fba));function a146_0x5e89(_0x394aa4,_0x4f0632){_0x394aa4=_0x394aa4-0x185;var _0x5533dc=a146_0x5533();var _0x5e8922=_0x5533dc[_0x394aa4];return _0x5e8922;}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 a146_0x5533(){var _0x379ce8=['7430330usuzwZ','165676fvpFYt','1884099EGeZZi','8LdeGZn','24upVHWr','2343892bVtizy','996563XYRyqF','6236132xeOfoL','6931809KihrQZ'];a146_0x5533=function(){return _0x379ce8;};return a146_0x5533();}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 a147_0x2ec3b1=a147_0x54ef;(function(_0x4d2f8f,_0x19098e){const _0x101591=a147_0x54ef,_0x4d5027=_0x4d2f8f();while(!![]){try{const _0xfd3fc8=-parseInt(_0x101591(0x15b))/0x1+parseInt(_0x101591(0x15d))/0x2*(-parseInt(_0x101591(0x15f))/0x3)+-parseInt(_0x101591(0x15a))/0x4*(-parseInt(_0x101591(0x176))/0x5)+parseInt(_0x101591(0x166))/0x6*(parseInt(_0x101591(0x175))/0x7)+parseInt(_0x101591(0x16b))/0x8*(parseInt(_0x101591(0x155))/0x9)+-parseInt(_0x101591(0x172))/0xa*(-parseInt(_0x101591(0x159))/0xb)+-parseInt(_0x101591(0x16e))/0xc;if(_0xfd3fc8===_0x19098e)break;else _0x4d5027['push'](_0x4d5027['shift']());}catch(_0x23fa29){_0x4d5027['push'](_0x4d5027['shift']());}}}(a147_0x393b,0x6658e));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a147_0x2ec3b1(0x170),a147_0x2ec3b1(0x15c));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a147_0x2ec3b1(0x154)),join(a147_0x2ec3b1(0x169),'skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x4291ca,_0x310a6c){const _0x52d011=a147_0x2ec3b1;if(!existsSync(_0x4291ca))return{'kind':'not-recorded'};let _0x1f6550;try{_0x1f6550=JSON[_0x52d011(0x160)](readFileSync(_0x4291ca,_0x52d011(0x156)));}catch(_0x102976){return{'kind':'unusable','reason':_0x4291ca+_0x52d011(0x162)+_0x102976[_0x52d011(0x177)]};}const _0x6130f4=_0x1f6550;if(typeof _0x6130f4?.[_0x52d011(0x163)]!==_0x52d011(0x158)||!SUPPORTED_LOCK_VERSIONS['includes'](_0x6130f4['version']))return{'kind':'unusable','reason':_0x4291ca+'\x20uses\x20unsupported\x20version\x20'+String(_0x6130f4?.['version'])};if(!_0x6130f4[_0x52d011(0x154)]||typeof _0x6130f4[_0x52d011(0x154)]!==_0x52d011(0x173))return{'kind':_0x52d011(0x167),'reason':_0x4291ca+_0x52d011(0x171)};return _0x6130f4['skills'][_0x310a6c]?{'kind':'recorded'}:{'kind':_0x52d011(0x179)};}function a147_0x54ef(_0x21bad9,_0x34897d){_0x21bad9=_0x21bad9-0x154;const _0x393bb7=a147_0x393b();let _0x54ef8c=_0x393bb7[_0x21bad9];return _0x54ef8c;}function a147_0x393b(){const _0xc49584=['491403jQZWJX','.skill-lock.json','28tdshRS','kind','46653fyOuea','parse','present','\x20is\x20unreadable:\x20','version','home','SKILL.md','6xXikau','unusable','map','.claude','absent','253592tFVwaf','unverifiable','lockFile','17284788MyuUlc','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','.agents','\x20has\x20no\x20skills\x20map','10XlgRQL','object','globalSkillsDirs','4582060FIowyK','205MDTbaS','message','find','not-recorded','skills','180QCPoCP','utf8','reason','number','8791189CIeAyX','46924pKFrlD'];a147_0x393b=function(){return _0xc49584;};return a147_0x393b();}export function resolveInstalledSkill(_0x144cfd,_0x43a1c9){const _0x265c85=a147_0x2ec3b1,_0x5d88f3=_0x43a1c9?.[_0x265c85(0x164)]??homedir(),_0x2883ef=_0x43a1c9?.[_0x265c85(0x174)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x265c85(0x168)](_0x3c2e6e=>join(_0x5d88f3,_0x3c2e6e)),_0x45de19=_0x43a1c9?.[_0x265c85(0x16d)]??join(_0x5d88f3,SKILL_LOCK_RELATIVE_PATH),_0x43ce5d=_0x2883ef['map'](_0x170343=>join(_0x170343,_0x144cfd,_0x265c85(0x165))),_0x48457a=_0x43ce5d[_0x265c85(0x178)](_0x4a274c=>existsSync(_0x4a274c));if(_0x48457a)return{'state':_0x265c85(0x161),'path':_0x48457a};const _0x6b89be=readLockLookup(_0x45de19,_0x144cfd);if(_0x6b89be[_0x265c85(0x15e)]==='unusable')return{'state':_0x265c85(0x16c),'reason':_0x6b89be[_0x265c85(0x157)]};if(_0x6b89be[_0x265c85(0x15e)]==='recorded')return{'state':_0x265c85(0x16c),'reason':_0x45de19+'\x20records\x20\x22'+_0x144cfd+_0x265c85(0x16f)+('('+_0x43ce5d['join'](',\x20')+')')};return{'state':_0x265c85(0x16a),'checked':_0x43ce5d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x105cc8,_0x239797){const _0x57ae54=a148_0xf9a6,_0x18ce67=_0x105cc8();while(!![]){try{const _0x89aef8=-parseInt(_0x57ae54(0x1f5))/0x1+parseInt(_0x57ae54(0x1f9))/0x2*(parseInt(_0x57ae54(0x1f6))/0x3)+parseInt(_0x57ae54(0x1f8))/0x4+parseInt(_0x57ae54(0x1f7))/0x5*(parseInt(_0x57ae54(0x1fb))/0x6)+parseInt(_0x57ae54(0x1fc))/0x7*(parseInt(_0x57ae54(0x1f3))/0x8)+parseInt(_0x57ae54(0x1fa))/0x9+parseInt(_0x57ae54(0x1f2))/0xa*(-parseInt(_0x57ae54(0x1f4))/0xb);if(_0x89aef8===_0x239797)break;else _0x18ce67['push'](_0x18ce67['shift']());}catch(_0xbf5279){_0x18ce67['push'](_0x18ce67['shift']());}}}(a148_0x2454,0x1e7fc));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a148_0xf9a6(_0x82608f,_0x493cee){_0x82608f=_0x82608f-0x1f2;const _0x245496=a148_0x2454();let _0xf9a605=_0x245496[_0x82608f];return _0xf9a605;}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a148_0x2454(){const _0x4471d9=['87162RuctTm','485hSktng','128900NZEtVf','2VGBMfz','1054962zwjgrZ','7644oDxUbv','7cVPSHQ','75560oQUtsk','1782232JetJUU','264JtIxDn','218586SjeDyJ'];a148_0x2454=function(){return _0x4471d9;};return a148_0x2454();}
|