@lovrabet/lovrabet-cli 2.2.3 → 2.2.4-beta.1
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.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -0
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -0
- package/lib/commands/notification/shared.d.ts +13 -0
- package/lib/commands/notification/shared.js +1 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.d.ts +2 -0
- package/lib/commands/permit/dataset-get.js +1 -0
- package/lib/commands/permit/dataset-set.d.ts +2 -0
- package/lib/commands/permit/dataset-set.js +1 -0
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -0
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -0
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -0
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -0
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -0
- package/lib/commands/permit/shared.d.ts +52 -0
- package/lib/commands/permit/shared.js +1 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -0
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -0
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -0
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -0
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -0
- package/lib/commands/role/shared.d.ts +33 -0
- package/lib/commands/role/shared.js +1 -0
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -0
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -0
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -0
- 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.d.ts +161 -0
- 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 +19 -6
- package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
- package/skills/lovrabet/references/lovrabet-auth.md +1 -5
- package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
- package/skills/lovrabet.manifest.json +5 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a115_0x165f3d=a115_0x2048;(function(_0x344a4d,_0x2b5d0b){const _0x367bff=a115_0x2048,_0x1be392=_0x344a4d();while(!![]){try{const _0x429d14=-parseInt(_0x367bff(0x129))/0x1+-parseInt(_0x367bff(0x14b))/0x2*(-parseInt(_0x367bff(0x140))/0x3)+-parseInt(_0x367bff(0x11c))/0x4*(parseInt(_0x367bff(0x123))/0x5)+parseInt(_0x367bff(0x122))/0x6+-parseInt(_0x367bff(0x13b))/0x7+parseInt(_0x367bff(0x144))/0x8*(-parseInt(_0x367bff(0x143))/0x9)+-parseInt(_0x367bff(0x124))/0xa*(-parseInt(_0x367bff(0x138))/0xb);if(_0x429d14===_0x2b5d0b)break;else _0x1be392['push'](_0x1be392['shift']());}catch(_0x2df638){_0x1be392['push'](_0x1be392['shift']());}}}(a115_0x427c,0xafa6b));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a115_0x3a2a52 from'fs-extra';import{CliErrors}from'../../errors.js';function a115_0x427c(){const _0xcb3756=['name','builtin','1123886uNzXpc','validation','slice','removed','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','personal','created','trim','contentHash','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','isDirectory','project','metadata-mismatch','filter','company','17842mqZeFi','scopes','metadataPath','9324028tzGKtf','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','pruneSkillCodes','linked-from-protected-root','activeSkillCodes','3570807daMSDd','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','skill','9KravtR','3979848MrJUZl','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','isSymbolicLink','secret-retriever','env','push','length','2hVrFAk','has','scope','map','external-symlink','skillCode','dir','managedRoot','updated','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','skipped','lovrabet','260pcSzKy','unchanged','agentsSkillsDir','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','appCode','not-managed-symlink','445044jlgYdx','8755LxwMIe','15550JAFEgO','skillRoots','accessKey'];a115_0x427c=function(){return _0xcb3756;};return a115_0x427c();}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}=a115_0x3a2a52,RESERVED_PROJECT_SKILL_CODES=new Set([a115_0x165f3d(0x11b),'runtime-observe',a115_0x165f3d(0x147)]);export function linkEffectiveRuntimeSkills(_0x2a3160,_0x4e329e){const _0x5b35e6=a115_0x165f3d,_0x59ee85=new Map();for(const _0x4581b6 of _0x2a3160){const _0x2a01b0=_0x4581b6[_0x5b35e6(0x142)][_0x5b35e6(0x150)];if(!_0x2a01b0)continue;const _0x823dcb=_0x59ee85['get'](_0x2a01b0);(!_0x823dcb||_0x4581b6[_0x5b35e6(0x14d)]===_0x5b35e6(0x12e))&&_0x59ee85['set'](_0x2a01b0,_0x4581b6);}const _0x292e67=[];for(const _0x13f24a of _0x59ee85['values']()){const _0x22a3e2=requireSkillCode(_0x13f24a['skill']),_0x565898=readMetadataIfPresent(_0x13f24a[_0x5b35e6(0x13a)]);if(_0x565898?.['appCode']!==_0x4e329e[_0x5b35e6(0x120)]||_0x565898[_0x5b35e6(0x150)]!==_0x22a3e2)throw CliErrors[_0x5b35e6(0x12a)](_0x5b35e6(0x141)+_0x4e329e[_0x5b35e6(0x120)]+':\x20'+_0x13f24a[_0x5b35e6(0x13a)]);const _0x2e6f96=runtimeSkillLinkName(_0x4e329e,_0x22a3e2);for(const _0x3cf7f6 of _0x4e329e['skillRoots']){_0x292e67[_0x5b35e6(0x149)](ensureManagedSymlink(resolve(_0x3cf7f6,_0x2e6f96),_0x13f24a[_0x5b35e6(0x151)],_0x4e329e,_0x22a3e2));}}return _0x292e67;}export function pruneStaleRuntimeSkillLinks(_0x3ddd,_0x120b86,_0x1fa315){const _0x5c1847=a115_0x165f3d,_0x464fef=new Set([..._0x120b86][_0x5c1847(0x14e)](_0x3ce639=>_0x3ce639[_0x5c1847(0x130)]())[_0x5c1847(0x136)](Boolean)),_0x170f26=_0x1fa315?new Set([..._0x1fa315][_0x5c1847(0x14e)](_0x47994=>_0x47994[_0x5c1847(0x130)]())['filter'](Boolean)):undefined,_0x3a8503=[];for(const _0x22344f of _0x3ddd[_0x5c1847(0x125)]){for(const _0x204b18 of managedTargetSkillLinkPaths(_0x22344f,_0x3ddd)){const _0x3f84d2=runtimeSkillCodeFromLink(_0x3ddd,_0x204b18);if(_0x170f26&&!_0x170f26[_0x5c1847(0x14c)](_0x3f84d2))continue;if(_0x464fef[_0x5c1847(0x14c)](_0x3f84d2))continue;_0x3a8503[_0x5c1847(0x149)](removeManagedSkillLink(_0x204b18,_0x3ddd,_0x3f84d2));}}return _0x3a8503;}export function pruneStaleRuntimeSkillCache(_0x3d8a78,_0x13b6a0={}){const _0xc34d2d=a115_0x165f3d,_0xc6a111=new Set([..._0x3d8a78[_0xc34d2d(0x13f)]]['map'](_0xe62ab7=>_0xe62ab7[_0xc34d2d(0x130)]())[_0xc34d2d(0x136)](Boolean)),_0x1a7b84=_0x3d8a78[_0xc34d2d(0x13d)]?new Set([..._0x3d8a78[_0xc34d2d(0x13d)]][_0xc34d2d(0x14e)](_0x470120=>_0x470120[_0xc34d2d(0x130)]())[_0xc34d2d(0x136)](Boolean)):undefined,_0x546425=_0x3d8a78[_0xc34d2d(0x139)]??[_0xc34d2d(0x12e),_0xc34d2d(0x137)],_0x383f7a=resolve(getRuntimeSkillCacheRoot(_0x3d8a78[_0xc34d2d(0x148)],_0x3d8a78[_0xc34d2d(0x126)],_0x13b6a0),safePathSegment(_0x3d8a78[_0xc34d2d(0x120)],'appCode')),_0x710301=[];for(const _0x4d5579 of _0x546425){const _0x4acd43=resolve(_0x383f7a,_0x4d5579);if(!existsSync(_0x4acd43))continue;for(const _0xacc9ba of readdirSync(_0x4acd43,{'withFileTypes':!![]})){if(!_0xacc9ba[_0xc34d2d(0x133)]())continue;const _0x3ff977=_0xacc9ba[_0xc34d2d(0x127)];if(_0x1a7b84&&!_0x1a7b84[_0xc34d2d(0x14c)](_0x3ff977))continue;if(_0xc6a111['has'](_0x3ff977))continue;const _0x4324f0=resolve(_0x4acd43,_0x3ff977),_0x22659e=readMetadataIfPresent(resolve(_0x4324f0,METADATA_FILE));if(_0x22659e?.[_0xc34d2d(0x120)]!==_0x3d8a78[_0xc34d2d(0x120)]||_0x22659e[_0xc34d2d(0x14d)]!==_0x4d5579||_0x22659e[_0xc34d2d(0x150)]!==_0x3ff977){_0x710301[_0xc34d2d(0x149)]({'path':_0x4324f0,'action':'skipped','reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x4324f0,_0x3d8a78['protectedLinkRoots']??[])){_0x710301['push']({'path':_0x4324f0,'action':'skipped','reason':_0xc34d2d(0x13e)});continue;}removeSync(_0x4324f0),_0x710301[_0xc34d2d(0x149)]({'path':_0x4324f0,'action':_0xc34d2d(0x12c)});}}return _0x710301;}function a115_0x2048(_0x2b5aea,_0xf233a6){_0x2b5aea=_0x2b5aea-0x118;const _0x427cd9=a115_0x427c();let _0x2048d3=_0x427cd9[_0x2b5aea];return _0x2048d3;}export function linkGlobalRuntimeSkills(_0x2e49e9,_0x21024b={}){const _0x33c8ee=a115_0x165f3d,_0x231b09=resolveSkillSyncPaths(_0x21024b),_0x600c5d=[];for(const _0x891821 of _0x2e49e9){if(_0x891821['scope']!==_0x33c8ee(0x128))throw CliErrors[_0x33c8ee(0x12a)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x891821['scope']);const _0x5869fc=requireSkillCode(_0x891821[_0x33c8ee(0x142)]),_0x1b3cf4=copyManagedSkillDirectory(_0x891821[_0x33c8ee(0x151)],resolve(_0x231b09[_0x33c8ee(0x11e)],_0x5869fc));_0x600c5d[_0x33c8ee(0x149)]({..._0x1b3cf4,'contentHash':_0x891821[_0x33c8ee(0x131)]});}return _0x600c5d;}function ensureManagedSymlink(_0x591401,_0x5296d1,_0x3e97ba,_0x4a4ccb){const _0x57e285=a115_0x165f3d;mkdirSync(dirname(_0x591401),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x591401)||isDanglingSymlink(_0x591401)){const _0x325324=lstatSync(_0x591401);if(!_0x325324[_0x57e285(0x146)]())throw CliErrors[_0x57e285(0x12a)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x591401);const _0x58100f=resolveSymlinkTarget(_0x591401);if(!isPathInside(realOrResolved(_0x58100f),realOrResolved(_0x3e97ba[_0x57e285(0x152)])))throw CliErrors[_0x57e285(0x12a)](_0x57e285(0x119)+_0x591401);if(realOrResolved(_0x58100f)===realOrResolved(_0x5296d1))return{'path':_0x591401,'target':_0x5296d1,'action':_0x57e285(0x11d)};const _0x34366c=readMetadataIfPresent(resolve(_0x58100f,METADATA_FILE));if(_0x3e97ba[_0x57e285(0x14d)]==='project'&&(_0x34366c?.[_0x57e285(0x120)]!==_0x3e97ba[_0x57e285(0x120)]||_0x34366c[_0x57e285(0x150)]!==_0x4a4ccb))throw CliErrors['validation'](_0x57e285(0x145)+_0x591401);return unlinkSync(_0x591401),symlinkSync(_0x5296d1,_0x591401,'dir'),{'path':_0x591401,'target':_0x5296d1,'action':_0x57e285(0x118)};}return symlinkSync(_0x5296d1,_0x591401,'dir'),{'path':_0x591401,'target':_0x5296d1,'action':_0x57e285(0x12f)};}function managedTargetSkillLinkPaths(_0xba1359,_0x439609){const _0x4203df=a115_0x165f3d;if(!existsSync(_0xba1359))return[];const _0x487bc9=_0x439609[_0x4203df(0x120)]+'--';return readdirSync(_0xba1359,{'withFileTypes':!![]})['filter'](_0x39d94c=>_0x439609[_0x4203df(0x14d)]===_0x4203df(0x134)||_0x39d94c[_0x4203df(0x127)]['startsWith'](_0x487bc9))[_0x4203df(0x14e)](_0x164d8d=>resolve(_0xba1359,_0x164d8d[_0x4203df(0x127)]));}function removeManagedSkillLink(_0x34c242,_0x4bfe3f,_0x500f30){const _0x334709=a115_0x165f3d,_0x35ddcb=lstatIfPresent(_0x34c242);if(!_0x35ddcb?.[_0x334709(0x146)]())return{'path':_0x34c242,'action':_0x334709(0x11a),'reason':_0x334709(0x121)};const _0x258e9c=resolveSymlinkTarget(_0x34c242);if(!isPathInside(realOrResolved(_0x258e9c),realOrResolved(_0x4bfe3f[_0x334709(0x152)])))return{'path':_0x34c242,'action':'skipped','reason':_0x334709(0x14f)};const _0x560146=readMetadataIfPresent(resolve(_0x258e9c,METADATA_FILE));if(_0x4bfe3f['scope']===_0x334709(0x134)&&(_0x560146?.['appCode']!==_0x4bfe3f[_0x334709(0x120)]||_0x560146[_0x334709(0x150)]!==_0x500f30))return{'path':_0x34c242,'action':_0x334709(0x11a),'reason':_0x334709(0x135)};return unlinkSync(_0x34c242),{'path':_0x34c242,'action':_0x334709(0x12c)};}function isLinkedFromAnyRoot(_0x58d8f8,_0x48daf0){const _0x312bf8=a115_0x165f3d,_0x4f7bbd=realOrResolved(_0x58d8f8);for(const _0x1f906d of _0x48daf0){if(!existsSync(_0x1f906d))continue;for(const _0x415394 of readdirSync(_0x1f906d,{'withFileTypes':!![]})){if(!_0x415394[_0x312bf8(0x146)]())continue;const _0x46c6c1=resolve(_0x1f906d,_0x415394['name']);if(realOrResolved(resolveSymlinkTarget(_0x46c6c1))===_0x4f7bbd)return!![];}}return![];}function runtimeSkillLinkName(_0xfb9772,_0x5e467f){const _0x3f050f=a115_0x165f3d,_0x3b7a17=safePathSegment(_0x5e467f,_0x3f050f(0x150));if(_0xfb9772[_0x3f050f(0x14d)]==='project'&&RESERVED_PROJECT_SKILL_CODES['has'](_0x3b7a17))throw CliErrors['validation'](_0x3f050f(0x12d)+_0x3b7a17);return _0xfb9772[_0x3f050f(0x14d)]===_0x3f050f(0x134)?_0x3b7a17:_0xfb9772[_0x3f050f(0x120)]+'--'+_0x3b7a17;}function runtimeSkillCodeFromLink(_0x360238,_0x25dd22){const _0x32a818=a115_0x165f3d,_0x4b232d=basename(_0x25dd22);return _0x360238['scope']==='project'?_0x4b232d:_0x4b232d[_0x32a818(0x12b)]((_0x360238['appCode']+'--')[_0x32a818(0x14a)]);}export function copyManagedSkillDirectory(_0x2870a1,_0xcaf2ae){const _0x1f15d6=a115_0x165f3d,_0x4da05e=resolve(_0xcaf2ae,METADATA_FILE),_0x1b83c5=existsSync(_0xcaf2ae);if(_0x1b83c5){const _0x5c9dce=lstatSync(_0xcaf2ae);if(_0x5c9dce[_0x1f15d6(0x146)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0xcaf2ae);if(!_0x5c9dce['isDirectory']())throw CliErrors[_0x1f15d6(0x12a)](_0x1f15d6(0x132)+_0xcaf2ae);const _0x1dc1f3=readMetadataIfPresent(_0x4da05e);if(_0x1dc1f3?.[_0x1f15d6(0x14d)]!==_0x1f15d6(0x128))throw CliErrors[_0x1f15d6(0x12a)](_0x1f15d6(0x11f)+_0xcaf2ae);}ensureDirSync(dirname(_0xcaf2ae));const _0x2905f8=_0x1b83c5?readMetadataIfPresent(_0x4da05e)?.['contentHash']:undefined,_0x18cd14=readMetadataIfPresent(resolve(_0x2870a1,METADATA_FILE))?.['contentHash'];return _0x1b83c5&&removeSync(_0xcaf2ae),copySkillDirectory(_0x2870a1,_0xcaf2ae),{'path':_0xcaf2ae,'target':_0x2870a1,'action':!_0x1b83c5?_0x1f15d6(0x12f):_0x2905f8===_0x18cd14?_0x1f15d6(0x11d):_0x1f15d6(0x118)};}function copySkillDirectory(_0x55a640,_0xa1a973){copySync(_0x55a640,_0xa1a973,{'dereference':![],'overwrite':!![],'filter'(_0x1ae5ad){const _0x27ba64=a115_0x2048;if(lstatSync(_0x1ae5ad)[_0x27ba64(0x146)]())throw CliErrors[_0x27ba64(0x12a)](_0x27ba64(0x13c)+_0x1ae5ad);return!![];}});}
|
|
1
|
+
const a135_0x5cf0da=a135_0x3c28;(function(_0x1eb8ee,_0x892217){const _0x319349=a135_0x3c28,_0x512b50=_0x1eb8ee();while(!![]){try{const _0x2dfd3a=parseInt(_0x319349(0x198))/0x1*(-parseInt(_0x319349(0x1a7))/0x2)+parseInt(_0x319349(0x180))/0x3+parseInt(_0x319349(0x1a3))/0x4+-parseInt(_0x319349(0x185))/0x5*(-parseInt(_0x319349(0x183))/0x6)+parseInt(_0x319349(0x18c))/0x7*(parseInt(_0x319349(0x1a2))/0x8)+parseInt(_0x319349(0x199))/0x9*(parseInt(_0x319349(0x1ac))/0xa)+-parseInt(_0x319349(0x18a))/0xb*(parseInt(_0x319349(0x193))/0xc);if(_0x2dfd3a===_0x892217)break;else _0x512b50['push'](_0x512b50['shift']());}catch(_0x17126e){_0x512b50['push'](_0x512b50['shift']());}}}(a135_0x3f73,0x65a1a));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x5087f6 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_0x5087f6,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x5cf0da(0x189),a135_0x5cf0da(0x19a),a135_0x5cf0da(0x197)]);export function linkEffectiveRuntimeSkills(_0x957d21,_0x1bda15){const _0x50b4f3=a135_0x5cf0da,_0x19d96e=new Map();for(const _0x31d493 of _0x957d21){const _0x865202=_0x31d493[_0x50b4f3(0x179)][_0x50b4f3(0x186)];if(!_0x865202)continue;const _0x36ffff=_0x19d96e['get'](_0x865202);(!_0x36ffff||_0x31d493['scope']===_0x50b4f3(0x19b))&&_0x19d96e['set'](_0x865202,_0x31d493);}const _0x42198d=[];for(const _0x420180 of _0x19d96e[_0x50b4f3(0x1a5)]()){const _0x133dde=requireSkillCode(_0x420180[_0x50b4f3(0x179)]),_0x23022f=readMetadataIfPresent(_0x420180[_0x50b4f3(0x182)]);if(_0x23022f?.[_0x50b4f3(0x19c)]!==_0x1bda15[_0x50b4f3(0x19c)]||_0x23022f[_0x50b4f3(0x186)]!==_0x133dde)throw CliErrors['validation'](_0x50b4f3(0x1a9)+_0x1bda15[_0x50b4f3(0x19c)]+':\x20'+_0x420180['metadataPath']);const _0x309f02=runtimeSkillLinkName(_0x1bda15,_0x133dde);for(const _0x502531 of _0x1bda15[_0x50b4f3(0x178)]){_0x42198d[_0x50b4f3(0x188)](ensureManagedSymlink(resolve(_0x502531,_0x309f02),_0x420180['dir'],_0x1bda15,_0x133dde));}}return _0x42198d;}export function pruneStaleRuntimeSkillLinks(_0x4585e3,_0x160297,_0x3e00ab){const _0x3b83cc=a135_0x5cf0da,_0x5d9858=new Set([..._0x160297][_0x3b83cc(0x190)](_0x698ed9=>_0x698ed9[_0x3b83cc(0x1aa)]())[_0x3b83cc(0x17a)](Boolean)),_0x47b03e=_0x3e00ab?new Set([..._0x3e00ab][_0x3b83cc(0x190)](_0x3c6020=>_0x3c6020['trim']())[_0x3b83cc(0x17a)](Boolean)):undefined,_0x335737=[];for(const _0x211497 of _0x4585e3[_0x3b83cc(0x178)]){for(const _0x4542d6 of managedTargetSkillLinkPaths(_0x211497,_0x4585e3)){const _0x2228d8=runtimeSkillCodeFromLink(_0x4585e3,_0x4542d6);if(_0x47b03e&&!_0x47b03e[_0x3b83cc(0x184)](_0x2228d8))continue;if(_0x5d9858[_0x3b83cc(0x184)](_0x2228d8))continue;_0x335737[_0x3b83cc(0x188)](removeManagedSkillLink(_0x4542d6,_0x4585e3,_0x2228d8));}}return _0x335737;}export function pruneStaleRuntimeSkillCache(_0x24326d,_0x4bfcd6={}){const _0x189115=a135_0x5cf0da,_0x268eb5=new Set([..._0x24326d['activeSkillCodes']][_0x189115(0x190)](_0xe82b41=>_0xe82b41['trim']())[_0x189115(0x17a)](Boolean)),_0x19a011=_0x24326d[_0x189115(0x18b)]?new Set([..._0x24326d[_0x189115(0x18b)]][_0x189115(0x190)](_0x80239e=>_0x80239e['trim']())[_0x189115(0x17a)](Boolean)):undefined,_0xeddaae=_0x24326d[_0x189115(0x17b)]??[_0x189115(0x19b),'company'],_0x211582=resolve(getRuntimeSkillCacheRoot(_0x24326d[_0x189115(0x1a4)],_0x24326d['accessKey'],_0x4bfcd6),safePathSegment(_0x24326d['appCode'],'appCode')),_0x5f5370=[];for(const _0x5a4cbe of _0xeddaae){const _0x430ff8=resolve(_0x211582,_0x5a4cbe);if(!existsSync(_0x430ff8))continue;for(const _0x3db092 of readdirSync(_0x430ff8,{'withFileTypes':!![]})){if(!_0x3db092['isDirectory']())continue;const _0x3f0aa7=_0x3db092[_0x189115(0x17f)];if(_0x19a011&&!_0x19a011[_0x189115(0x184)](_0x3f0aa7))continue;if(_0x268eb5[_0x189115(0x184)](_0x3f0aa7))continue;const _0x496d54=resolve(_0x430ff8,_0x3f0aa7),_0x2e04cc=readMetadataIfPresent(resolve(_0x496d54,METADATA_FILE));if(_0x2e04cc?.[_0x189115(0x19c)]!==_0x24326d[_0x189115(0x19c)]||_0x2e04cc['scope']!==_0x5a4cbe||_0x2e04cc[_0x189115(0x186)]!==_0x3f0aa7){_0x5f5370[_0x189115(0x188)]({'path':_0x496d54,'action':_0x189115(0x19d),'reason':_0x189115(0x1ab)});continue;}if(isLinkedFromAnyRoot(_0x496d54,_0x24326d['protectedLinkRoots']??[])){_0x5f5370[_0x189115(0x188)]({'path':_0x496d54,'action':'skipped','reason':'linked-from-protected-root'});continue;}removeSync(_0x496d54),_0x5f5370[_0x189115(0x188)]({'path':_0x496d54,'action':_0x189115(0x17e)});}}return _0x5f5370;}export function linkGlobalRuntimeSkills(_0x51809f,_0x5d77ce={}){const _0x41c0bd=a135_0x5cf0da,_0x33010b=resolveSkillSyncPaths(_0x5d77ce),_0x42f118=[];for(const _0x6bf69a of _0x51809f){if(_0x6bf69a['scope']!==_0x41c0bd(0x195))throw CliErrors[_0x41c0bd(0x18e)](_0x41c0bd(0x1ae)+_0x6bf69a[_0x41c0bd(0x1b0)]);const _0x15ef6d=requireSkillCode(_0x6bf69a[_0x41c0bd(0x179)]),_0xa3be1d=copyManagedSkillDirectory(_0x6bf69a['dir'],resolve(_0x33010b[_0x41c0bd(0x191)],_0x15ef6d));_0x42f118[_0x41c0bd(0x188)]({..._0xa3be1d,'contentHash':_0x6bf69a['contentHash']});}return _0x42f118;}function ensureManagedSymlink(_0x7b964b,_0x5a9175,_0x5f3ee6,_0x157af8){const _0x4785a1=a135_0x5cf0da;mkdirSync(dirname(_0x7b964b),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x7b964b)||isDanglingSymlink(_0x7b964b)){const _0x147778=lstatSync(_0x7b964b);if(!_0x147778[_0x4785a1(0x196)]())throw CliErrors['validation'](_0x4785a1(0x19e)+_0x7b964b);const _0x4d7c7b=resolveSymlinkTarget(_0x7b964b);if(!isPathInside(realOrResolved(_0x4d7c7b),realOrResolved(_0x5f3ee6[_0x4785a1(0x192)])))throw CliErrors[_0x4785a1(0x18e)](_0x4785a1(0x17c)+_0x7b964b);if(realOrResolved(_0x4d7c7b)===realOrResolved(_0x5a9175))return{'path':_0x7b964b,'target':_0x5a9175,'action':_0x4785a1(0x194)};const _0x2bdf22=readMetadataIfPresent(resolve(_0x4d7c7b,METADATA_FILE));if(_0x5f3ee6[_0x4785a1(0x1b0)]==='project'&&(_0x2bdf22?.['appCode']!==_0x5f3ee6[_0x4785a1(0x19c)]||_0x2bdf22[_0x4785a1(0x186)]!==_0x157af8))throw CliErrors[_0x4785a1(0x18e)]('Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20'+_0x7b964b);return unlinkSync(_0x7b964b),symlinkSync(_0x5a9175,_0x7b964b,'dir'),{'path':_0x7b964b,'target':_0x5a9175,'action':_0x4785a1(0x187)};}return symlinkSync(_0x5a9175,_0x7b964b,'dir'),{'path':_0x7b964b,'target':_0x5a9175,'action':_0x4785a1(0x1ad)};}function managedTargetSkillLinkPaths(_0x17da75,_0x2e251f){const _0x3befec=a135_0x5cf0da;if(!existsSync(_0x17da75))return[];const _0x345a72=_0x2e251f[_0x3befec(0x19c)]+'--';return readdirSync(_0x17da75,{'withFileTypes':!![]})[_0x3befec(0x17a)](_0x2a833e=>_0x2e251f[_0x3befec(0x1b0)]===_0x3befec(0x181)||_0x2a833e[_0x3befec(0x17f)][_0x3befec(0x18f)](_0x345a72))['map'](_0x23765c=>resolve(_0x17da75,_0x23765c[_0x3befec(0x17f)]));}function removeManagedSkillLink(_0x99473f,_0x248882,_0x18e00a){const _0x3b6c11=a135_0x5cf0da,_0x254a68=lstatIfPresent(_0x99473f);if(!_0x254a68?.[_0x3b6c11(0x196)]())return{'path':_0x99473f,'action':_0x3b6c11(0x19d),'reason':_0x3b6c11(0x1a6)};const _0x470c03=resolveSymlinkTarget(_0x99473f);if(!isPathInside(realOrResolved(_0x470c03),realOrResolved(_0x248882[_0x3b6c11(0x192)])))return{'path':_0x99473f,'action':_0x3b6c11(0x19d),'reason':_0x3b6c11(0x1a0)};const _0x4b11b8=readMetadataIfPresent(resolve(_0x470c03,METADATA_FILE));if(_0x248882['scope']===_0x3b6c11(0x181)&&(_0x4b11b8?.['appCode']!==_0x248882['appCode']||_0x4b11b8['skillCode']!==_0x18e00a))return{'path':_0x99473f,'action':_0x3b6c11(0x19d),'reason':'metadata-mismatch'};return unlinkSync(_0x99473f),{'path':_0x99473f,'action':_0x3b6c11(0x17e)};}function isLinkedFromAnyRoot(_0x50d571,_0x3472ce){const _0x26289e=realOrResolved(_0x50d571);for(const _0x29c5cb of _0x3472ce){if(!existsSync(_0x29c5cb))continue;for(const _0x2bd35b of readdirSync(_0x29c5cb,{'withFileTypes':!![]})){if(!_0x2bd35b['isSymbolicLink']())continue;const _0x1a0953=resolve(_0x29c5cb,_0x2bd35b['name']);if(realOrResolved(resolveSymlinkTarget(_0x1a0953))===_0x26289e)return!![];}}return![];}function runtimeSkillLinkName(_0x5370ff,_0x24af06){const _0x2cb685=a135_0x5cf0da,_0x1c8bf5=safePathSegment(_0x24af06,_0x2cb685(0x186));if(_0x5370ff[_0x2cb685(0x1b0)]===_0x2cb685(0x181)&&RESERVED_PROJECT_SKILL_CODES[_0x2cb685(0x184)](_0x1c8bf5))throw CliErrors[_0x2cb685(0x18e)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x1c8bf5);return _0x5370ff[_0x2cb685(0x1b0)]===_0x2cb685(0x181)?_0x1c8bf5:_0x5370ff[_0x2cb685(0x19c)]+'--'+_0x1c8bf5;}function a135_0x3c28(_0x2308e6,_0x45aef4){_0x2308e6=_0x2308e6-0x178;const _0x3f730c=a135_0x3f73();let _0x3c28f5=_0x3f730c[_0x2308e6];return _0x3c28f5;}function runtimeSkillCodeFromLink(_0xea055e,_0x1dd1eb){const _0x4d3f28=a135_0x5cf0da,_0xb924d0=basename(_0x1dd1eb);return _0xea055e[_0x4d3f28(0x1b0)]===_0x4d3f28(0x181)?_0xb924d0:_0xb924d0['slice']((_0xea055e['appCode']+'--')['length']);}export function copyManagedSkillDirectory(_0x15b199,_0x177adb){const _0x5c16e0=a135_0x5cf0da,_0x30faab=resolve(_0x177adb,METADATA_FILE),_0x12869d=existsSync(_0x177adb);if(_0x12869d){const _0x1ea49c=lstatSync(_0x177adb);if(_0x1ea49c[_0x5c16e0(0x196)]())throw CliErrors[_0x5c16e0(0x18e)](_0x5c16e0(0x1a1)+_0x177adb);if(!_0x1ea49c[_0x5c16e0(0x1af)]())throw CliErrors[_0x5c16e0(0x18e)](_0x5c16e0(0x18d)+_0x177adb);const _0x1a5270=readMetadataIfPresent(_0x30faab);if(_0x1a5270?.[_0x5c16e0(0x1b0)]!==_0x5c16e0(0x195))throw CliErrors[_0x5c16e0(0x18e)](_0x5c16e0(0x17d)+_0x177adb);}ensureDirSync(dirname(_0x177adb));const _0x1e0cae=_0x12869d?readMetadataIfPresent(_0x30faab)?.[_0x5c16e0(0x1a8)]:undefined,_0x46b23c=readMetadataIfPresent(resolve(_0x15b199,METADATA_FILE))?.[_0x5c16e0(0x1a8)];return _0x12869d&&removeSync(_0x177adb),copySkillDirectory(_0x15b199,_0x177adb),{'path':_0x177adb,'target':_0x15b199,'action':!_0x12869d?_0x5c16e0(0x1ad):_0x1e0cae===_0x46b23c?_0x5c16e0(0x194):'updated'};}function a135_0x3f73(){const _0x552ae7=['skillRoots','skill','filter','scopes','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','removed','name','1064574zToUHT','project','metadataPath','1902kntDjo','has','10295hFsKKY','skillCode','updated','push','lovrabet','11tyAQdK','pruneSkillCodes','31724LFZnjD','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','validation','startsWith','map','agentsSkillsDir','managedRoot','33343212WSKZSH','unchanged','builtin','isSymbolicLink','secret-retriever','1437mwjPVv','126YICQIk','runtime-observe','personal','appCode','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','external-symlink','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','1208hnqNZA','2982020tSHWGX','env','values','not-managed-symlink','34dtxKSH','contentHash','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','trim','metadata-mismatch','558510KytOmp','created','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','isDirectory','scope'];a135_0x3f73=function(){return _0x552ae7;};return a135_0x3f73();}function copySkillDirectory(_0x1fef53,_0x578a52){copySync(_0x1fef53,_0x578a52,{'dereference':![],'overwrite':!![],'filter'(_0x470001){const _0x3eeb20=a135_0x3c28;if(lstatSync(_0x470001)[_0x3eeb20(0x196)]())throw CliErrors[_0x3eeb20(0x18e)](_0x3eeb20(0x19f)+_0x470001);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2d4462,_0x26303c){const _0x563cc9=a136_0x4764,_0x4fb42f=_0x2d4462();while(!![]){try{const _0xd53642=parseInt(_0x563cc9(0xf2))/0x1+parseInt(_0x563cc9(0xf3))/0x2*(-parseInt(_0x563cc9(0xe8))/0x3)+-parseInt(_0x563cc9(0x10d))/0x4+-parseInt(_0x563cc9(0x108))/0x5+parseInt(_0x563cc9(0xef))/0x6*(-parseInt(_0x563cc9(0xf9))/0x7)+parseInt(_0x563cc9(0x109))/0x8+parseInt(_0x563cc9(0xe9))/0x9;if(_0xd53642===_0x26303c)break;else _0x4fb42f['push'](_0x4fb42f['shift']());}catch(_0x26d00d){_0x4fb42f['push'](_0x4fb42f['shift']());}}}(a136_0x2fd0,0x7a63f));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';function a136_0x4764(_0x35bbed,_0x8c1110){_0x35bbed=_0x35bbed-0xe7;const _0x2fd0ca=a136_0x2fd0();let _0x4764e9=_0x2fd0ca[_0x35bbed];return _0x4764e9;}import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x22ba26,_0x1e4b07,_0x5c287b={}){const _0x2f9953=a136_0x4764,_0x58586c=safePathSegment(_0x22ba26[_0x2f9953(0x113)],_0x2f9953(0x113));if(_0x1e4b07[_0x2f9953(0x113)]!==_0x58586c)throw CliErrors[_0x2f9953(0x107)](_0x2f9953(0xfa)+_0x1e4b07[_0x2f9953(0x113)]+_0x2f9953(0xfc)+_0x58586c);const _0x2b1f9a=normalizeRuntimeSkillScopes(_0x22ba26[_0x2f9953(0x102)]),_0x1ff3d6=new Set(_0x2b1f9a),_0x2cb3e1=_0x22ba26[_0x2f9953(0xf8)]?.[_0x2f9953(0xeb)](),_0x768079=new Map(),_0x57fbf0=resolve(getRuntimeSkillCacheRoot(_0x22ba26[_0x2f9953(0xed)],_0x22ba26[_0x2f9953(0x101)],_0x5c287b),_0x58586c);for(const _0x66efe4 of _0x2b1f9a){for(const _0x5ea427 of localSkillEntryDirs(resolve(_0x57fbf0,_0x66efe4))){collectLocalRuntimeSkill(_0x768079,_0x5ea427,{'appCode':_0x58586c,'scopes':_0x1ff3d6,'code':_0x2cb3e1,'source':'cache'});}}for(const _0x3f88e0 of _0x1e4b07[_0x2f9953(0x106)]){for(const _0x1cfd23 of localSkillLinkCandidates(_0x3f88e0,_0x1e4b07,_0x1ff3d6)){collectLocalRuntimeSkill(_0x768079,_0x1cfd23,{'appCode':_0x58586c,'scopes':_0x1ff3d6,'code':_0x2cb3e1,'source':_0x2f9953(0xf7),'linkedPath':_0x1cfd23});}}return Array[_0x2f9953(0xea)](_0x768079[_0x2f9953(0x112)]())[_0x2f9953(0x10e)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x41c646){const _0x3de391=a136_0x4764;if(!existsSync(_0x41c646))return[];return readdirSync(_0x41c646,{'withFileTypes':!![]})[_0x3de391(0xee)](_0xe47172=>_0xe47172['isDirectory']()||_0xe47172[_0x3de391(0xfb)]())['map'](_0x5711e0=>resolve(_0x41c646,_0x5711e0[_0x3de391(0x100)]));}function localSkillLinkCandidates(_0x4b4279,_0x289c20,_0x4f5fb9){const _0x3ccdd6=a136_0x4764;if(!existsSync(_0x4b4279))return[];const _0x1b6874=_0x289c20['appCode']+'--';return readdirSync(_0x4b4279,{'withFileTypes':!![]})['filter'](_0x4b1a1e=>_0x4b1a1e[_0x3ccdd6(0xf0)]()||_0x4b1a1e[_0x3ccdd6(0xfb)]())[_0x3ccdd6(0xee)](_0x40ca25=>_0x289c20['scope']===_0x3ccdd6(0xff)||_0x40ca25[_0x3ccdd6(0x100)][_0x3ccdd6(0xf6)](_0x1b6874)||_0x4f5fb9['has'](_0x3ccdd6(0xe7)))[_0x3ccdd6(0x10a)](_0x36bd63=>resolve(_0x4b4279,_0x36bd63[_0x3ccdd6(0x100)]));}function a136_0x2fd0(){const _0x3c01c9=['trim','skillCode','env','filter','6xxnxWt','isDirectory','linkedPath','39063kBYgVC','305566ZeemCP','cacheDir','push','startsWith','link','code','2631433HizJCN','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','isSymbolicLink','\x20!=\x20','metadataPath','set','project','name','accessKey','scopes','source','scope','cache','skillRoots','validation','1934385QBBOeP','4974144BwpNrB','map','includes','get','1679300myEHsX','sort','isArray','localeCompare','dir','values','appCode','tags','builtin','3THflAJ','10582956SwycCN','from'];a136_0x2fd0=function(){return _0x3c01c9;};return a136_0x2fd0();}function collectLocalRuntimeSkill(_0x61d5f8,_0x25ff0a,_0x47707c){const _0x4d7cc4=a136_0x4764,_0x165459=resolve(_0x25ff0a,METADATA_FILE),_0x54d398=readMetadataIfPresent(_0x165459);if(!_0x54d398)return;if(_0x54d398[_0x4d7cc4(0x113)]!==_0x47707c[_0x4d7cc4(0x113)])return;if(!isRuntimeSkillScope(_0x54d398['scope'])||!_0x47707c['scopes']['has'](_0x54d398[_0x4d7cc4(0x104)]))return;const _0x22f6ac=_0x54d398[_0x4d7cc4(0xec)]?.[_0x4d7cc4(0xeb)]();if(!_0x22f6ac)return;if(_0x47707c[_0x4d7cc4(0xf8)]&&_0x22f6ac!==_0x47707c[_0x4d7cc4(0xf8)])return;const _0x4f4fdb=_0x54d398[_0x4d7cc4(0x104)]+':'+_0x22f6ac,_0x21b3ff=_0x47707c[_0x4d7cc4(0xf1)]?[_0x47707c['linkedPath']]:[],_0x1b9799=_0x61d5f8[_0x4d7cc4(0x10c)](_0x4f4fdb);if(_0x1b9799){_0x47707c[_0x4d7cc4(0x103)]===_0x4d7cc4(0x105)&&(_0x1b9799[_0x4d7cc4(0x111)]=_0x25ff0a,_0x1b9799[_0x4d7cc4(0xf4)]=_0x25ff0a,_0x1b9799['skillMdPath']=resolve(_0x25ff0a,SKILL_FILE),_0x1b9799[_0x4d7cc4(0xfd)]=_0x165459);for(const _0x4a3832 of _0x21b3ff){!_0x1b9799['linkedPaths'][_0x4d7cc4(0x10b)](_0x4a3832)&&_0x1b9799['linkedPaths'][_0x4d7cc4(0xf5)](_0x4a3832);}_0x1b9799['linkedPaths'][_0x4d7cc4(0x10e)]();return;}_0x61d5f8[_0x4d7cc4(0xfe)](_0x4f4fdb,{..._0x54d398,'tags':Array[_0x4d7cc4(0x10f)](_0x54d398[_0x4d7cc4(0x114)])?_0x54d398[_0x4d7cc4(0x114)]:[],'scope':_0x54d398[_0x4d7cc4(0x104)],'source':'local','dir':_0x25ff0a,'cacheDir':_0x47707c[_0x4d7cc4(0x103)]===_0x4d7cc4(0x105)?_0x25ff0a:undefined,'skillMdPath':resolve(_0x25ff0a,SKILL_FILE),'metadataPath':_0x165459,'linkedPaths':_0x21b3ff});}function compareLocalRuntimeSkills(_0x20e0df,_0x233225){const _0x5aa258=a136_0x4764,_0x2aee44={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2aee44[_0x20e0df[_0x5aa258(0x104)]]-_0x2aee44[_0x233225[_0x5aa258(0x104)]]||_0x20e0df[_0x5aa258(0xec)][_0x5aa258(0x110)](_0x233225[_0x5aa258(0xec)])||_0x20e0df[_0x5aa258(0x111)][_0x5aa258(0x110)](_0x233225[_0x5aa258(0x111)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a137_0xf2aa(_0x3177fc,_0x39e6d6){_0x3177fc=_0x3177fc-0x1b3;const _0x2f9841=a137_0x2f98();let _0xf2aa4e=_0x2f9841[_0x3177fc];return _0xf2aa4e;}function a137_0x2f98(){const _0x1f6412=['119236OIbgOW','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','605324LUcWJk','size','6rOBVLO','values','name','from','1523500IaiuCW','utf8','compare','sha256','toString','length','path','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isArray','8UpgAoY','validation','bytes','isDirectory','3JlNXjA','split','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','string','Skill\x20file\x20sha256\x20is\x20invalid:\x20','trim','2802548QbEslV','Unsafe\x20Skill\x20file\x20path:\x20','3022146FCYRVV','excludedFilePaths','add','7997310qcWKPf','set','localeCompare','sort','5414233ruzYtE','Skill\x20file\x20path\x20must\x20be\x20text.','isFile','includes','has','6eBCJjb','push','content','isBuffer','object','startsWith'];a137_0x2f98=function(){return _0x1f6412;};return a137_0x2f98();}(function(_0x515750,_0x1989cd){const _0x4eb0cd=a137_0xf2aa,_0x3ec5eb=_0x515750();while(!![]){try{const _0x38c520=-parseInt(_0x4eb0cd(0x1dc))/0x1*(parseInt(_0x4eb0cd(0x1d8))/0x2)+parseInt(_0x4eb0cd(0x1be))/0x3*(-parseInt(_0x4eb0cd(0x1da))/0x4)+-parseInt(_0x4eb0cd(0x1e0))/0x5*(parseInt(_0x4eb0cd(0x1d2))/0x6)+-parseInt(_0x4eb0cd(0x1c4))/0x7+parseInt(_0x4eb0cd(0x1ba))/0x8*(parseInt(_0x4eb0cd(0x1c6))/0x9)+parseInt(_0x4eb0cd(0x1c9))/0xa+parseInt(_0x4eb0cd(0x1cd))/0xb;if(_0x38c520===_0x1989cd)break;else _0x3ec5eb['push'](_0x3ec5eb['shift']());}catch(_0x3d2eb1){_0x3ec5eb['push'](_0x3ec5eb['shift']());}}}(a137_0x2f98,0x64fb9));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(_0x4a83fb){const _0x3ca2b1=a137_0xf2aa;return _0x4a83fb[_0x3ca2b1(0x1bc)]??Buffer['from'](_0x4a83fb[_0x3ca2b1(0x1d4)]??'','utf8');}export function fileText(_0x22fffd){const _0x211fee=a137_0xf2aa;return fileContent(_0x22fffd)[_0x211fee(0x1b5)](_0x211fee(0x1e1));}export function normalizeLocalFiles(_0x5a1c00){const _0x265cc3=a137_0xf2aa;if(!Array['isArray'](_0x5a1c00)||_0x5a1c00[_0x265cc3(0x1b6)]===0x0)return[];const _0xe71b1d=new Map();for(const _0x58e206 of _0x5a1c00){if(!_0x58e206||typeof _0x58e206!=='object'||typeof _0x58e206[_0x265cc3(0x1b7)]!==_0x265cc3(0x1c1))throw CliErrors[_0x265cc3(0x1bb)](_0x265cc3(0x1ce));const _0x5a8e2e=normalizeSkillRelativePath(_0x58e206[_0x265cc3(0x1b7)]);if(_0xe71b1d[_0x265cc3(0x1d1)](_0x5a8e2e))throw CliErrors[_0x265cc3(0x1bb)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x5a8e2e);if(_0x58e206[_0x265cc3(0x1bc)]!==undefined&&!Buffer[_0x265cc3(0x1d5)](_0x58e206['bytes']))throw CliErrors[_0x265cc3(0x1bb)](_0x265cc3(0x1b8)+_0x5a8e2e);if(_0x58e206[_0x265cc3(0x1bc)]===undefined&&typeof _0x58e206['content']!=='string')throw CliErrors[_0x265cc3(0x1bb)](_0x265cc3(0x1c0)+_0x5a8e2e);const _0x45c68e=fileContent(_0x58e206);_0xe71b1d['set'](_0x5a8e2e,{'path':_0x5a8e2e,'bytes':_0x45c68e});}return Array[_0x265cc3(0x1df)](_0xe71b1d[_0x265cc3(0x1dd)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x320bcd){const _0x30e233=a137_0xf2aa;if(!Array[_0x30e233(0x1b9)](_0x320bcd)||_0x320bcd[_0x30e233(0x1b6)]===0x0)return[];const _0xf94c=new Map();for(const _0x2114d0 of _0x320bcd){if(!_0x2114d0||typeof _0x2114d0!==_0x30e233(0x1d6)||typeof _0x2114d0[_0x30e233(0x1b7)]!==_0x30e233(0x1c1))throw CliErrors[_0x30e233(0x1bb)](_0x30e233(0x1ce));const _0x22f02a=normalizeSkillRelativePath(_0x2114d0['path']);if(_0xf94c[_0x30e233(0x1d1)](_0x22f02a))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x22f02a);if(!isSha256Hex(_0x2114d0[_0x30e233(0x1b4)]))throw CliErrors[_0x30e233(0x1bb)](_0x30e233(0x1c2)+_0x22f02a);if(!Number['isSafeInteger'](_0x2114d0[_0x30e233(0x1db)])||_0x2114d0[_0x30e233(0x1db)]<0x0)throw CliErrors[_0x30e233(0x1bb)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x22f02a);_0xf94c[_0x30e233(0x1ca)](_0x22f02a,{'path':_0x22f02a,'sha256':_0x2114d0[_0x30e233(0x1b4)]['toLowerCase'](),'size':_0x2114d0[_0x30e233(0x1db)]});}return Array[_0x30e233(0x1df)](_0xf94c[_0x30e233(0x1dd)]())[_0x30e233(0x1cc)](compareSkillFiles);}export function scanSkillDirectory(_0x255ed1,_0x59313a={}){const _0x57c4cc=a137_0xf2aa,_0x35da35=realpathSync(_0x255ed1),_0x44649c=canonicalExcludedFilePaths(_0x59313a[_0x57c4cc(0x1c7)]),_0x4caac1=[];function _0x322659(_0x5c2f16){const _0x3967b0=_0x57c4cc,_0x273ab5=readdirSync(_0x5c2f16,{'withFileTypes':!![]})[_0x3967b0(0x1cc)]((_0x13da41,_0xe934ca)=>_0x13da41['name'][_0x3967b0(0x1cb)](_0xe934ca[_0x3967b0(0x1de)]));for(const _0x651d82 of _0x273ab5){if(_0x651d82[_0x3967b0(0x1bd)]()&&IGNORED_DIR_NAMES[_0x3967b0(0x1d1)](_0x651d82[_0x3967b0(0x1de)]))continue;if(IGNORED_FILE_NAMES[_0x3967b0(0x1d1)](_0x651d82['name']))continue;const _0xeb692d=resolve(_0x5c2f16,_0x651d82[_0x3967b0(0x1de)]);if(isExcludedFilePath(_0xeb692d,_0x44649c))continue;if(_0x651d82['isSymbolicLink']())throw CliErrors[_0x3967b0(0x1bb)](_0x3967b0(0x1d9)+_0xeb692d);const _0x1ee10c=toPosixPath(relative(_0x35da35,_0xeb692d));if(_0x651d82['isDirectory']()){_0x322659(_0xeb692d);continue;}if(!_0x651d82[_0x3967b0(0x1cf)]())continue;validateSkillRelativePath(_0x1ee10c);const _0x4c0afb=readFileSync(_0xeb692d);_0x4caac1[_0x3967b0(0x1d3)]({'path':_0x1ee10c,'bytes':_0x4c0afb});}}return _0x322659(_0x35da35),normalizeLocalFiles(_0x4caac1);}function canonicalExcludedFilePaths(_0x4e87f7){const _0x5aa15=a137_0xf2aa,_0x4bfea1=new Set();for(const _0x31d3d7 of _0x4e87f7??[]){const _0x4ace57=resolve(_0x31d3d7);_0x4bfea1[_0x5aa15(0x1c8)](_0x4ace57);try{_0x4bfea1[_0x5aa15(0x1c8)](realpathSync(_0x4ace57));}catch{}}return _0x4bfea1;}function isExcludedFilePath(_0x5ff9c5,_0x3262a2){const _0x53153b=a137_0xf2aa;if(_0x3262a2[_0x53153b(0x1d1)](_0x5ff9c5))return!![];if(_0x3262a2[_0x53153b(0x1db)]===0x0)return![];try{return _0x3262a2['has'](realpathSync(_0x5ff9c5));}catch{return![];}}export function compareSkillFiles(_0x11e81a,_0x10da8b){const _0x2800aa=a137_0xf2aa;if(_0x11e81a[_0x2800aa(0x1b7)]===SKILL_FILE)return _0x10da8b[_0x2800aa(0x1b7)]===SKILL_FILE?0x0:-0x1;if(_0x10da8b[_0x2800aa(0x1b7)]===SKILL_FILE)return 0x1;return Buffer[_0x2800aa(0x1b3)](Buffer[_0x2800aa(0x1df)](_0x11e81a[_0x2800aa(0x1b7)],_0x2800aa(0x1e1)),Buffer[_0x2800aa(0x1df)](_0x10da8b[_0x2800aa(0x1b7)],_0x2800aa(0x1e1)));}export function normalizeSkillRelativePath(_0x2b9401){const _0xc436b5=a137_0xf2aa,_0xa601a2=toPosixPath(_0x2b9401[_0xc436b5(0x1c3)]());return validateSkillRelativePath(_0xa601a2),_0xa601a2;}export function validateSkillRelativePath(_0xe303cc){const _0x147f86=a137_0xf2aa;if(!_0xe303cc||_0xe303cc[_0x147f86(0x1d7)]('/')||_0xe303cc[_0x147f86(0x1d0)]('//'))throw CliErrors[_0x147f86(0x1bb)](_0x147f86(0x1c5)+_0xe303cc);for(const _0x217722 of _0xe303cc[_0x147f86(0x1bf)]('/')){if(!_0x217722||_0x217722==='.'||_0x217722==='..')throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0xe303cc);}}export function toPosixPath(_0x434ef3){return _0x434ef3['replace'](/\\/g,'/');}export function isSha256Hex(_0x13782a){const _0x31eb0e=a137_0xf2aa;return typeof _0x13782a===_0x31eb0e(0x1c1)&&/^[a-fA-F0-9]{64}$/['test'](_0x13782a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xdd0e3d,_0x1f2691){const _0x1bac62=a138_0x1962,_0x4c11fd=_0xdd0e3d();while(!![]){try{const _0x3eab95=parseInt(_0x1bac62(0x149))/0x1+parseInt(_0x1bac62(0x152))/0x2+-parseInt(_0x1bac62(0x14d))/0x3+parseInt(_0x1bac62(0x147))/0x4+-parseInt(_0x1bac62(0x159))/0x5+parseInt(_0x1bac62(0x14b))/0x6*(parseInt(_0x1bac62(0x15d))/0x7)+-parseInt(_0x1bac62(0x157))/0x8*(parseInt(_0x1bac62(0x171))/0x9);if(_0x3eab95===_0x1f2691)break;else _0x4c11fd['push'](_0x4c11fd['shift']());}catch(_0x5eb05a){_0x4c11fd['push'](_0x4c11fd['shift']());}}}(a138_0x567b,0xcd545));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';function a138_0x567b(){const _0x2a9ce3=['find','fileHashes','paths','length','has','contents','isFile','description','Managed\x20file\x20was\x20removed\x20locally:\x20','path','displayName','\x0a---\x0a\x0a','trimEnd','Runtime\x20Skill\x20package\x20is\x20missing\x20','appCode','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','36TAUiVr','description:\x20','set','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','errors','utf8','map','validation','match','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','toString','pulledAt','slice','name:\x20','.\x20Changed\x20file:\x20','3900948EAinKu','replace','581387Olmgrv','join','42PxiVlF','keys','1279803sBODHo','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','---','stringify','skillName','358830sBUWuv','---\x0a','contentHash','delete','test','1189544OFdYUB','env','3852000LKZrep','trim','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','896763EYVdVZ','filter','flow','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'];a138_0x567b=function(){return _0x2a9ce3;};return a138_0x567b();}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';function a138_0x1962(_0x1e8b52,_0x576319){_0x1e8b52=_0x1e8b52-0x146;const _0x567b46=a138_0x567b();let _0x19628a=_0x567b46[_0x1e8b52];return _0x19628a;}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(_0x5d0f6f,_0x6eab42,_0xee68d6){const _0x4f3d6f=a138_0x1962,_0x5ed679=requireSkillCode(_0x5d0f6f),_0x5dc310=requirePackageBytes(_0x5ed679,_0xee68d6['packageBytes']),_0x22355a=extractDownloadedPackage(_0x5dc310),_0x2b796a=_0x22355a['find'](_0x46d2c1=>_0x46d2c1['path']===SKILL_FILE);if(!_0x2b796a)throw CliErrors[_0x4f3d6f(0x178)](_0x4f3d6f(0x16e)+SKILL_FILE+':\x20'+_0x5ed679);const _0x510918=withMaterializedSkillFrontmatter(_0x22355a,_0x5d0f6f,_0x5ed679),_0x27f57c=_0x510918[_0x4f3d6f(0x161)](_0x2955ec=>_0x2955ec[_0x4f3d6f(0x16a)]===SKILL_FILE),_0x35307d=fileText(_0x27f57c),_0x252f6d=getRuntimeSkillDir(_0xee68d6[_0x4f3d6f(0x158)],_0xee68d6['accessKey'],_0xee68d6[_0x4f3d6f(0x16f)],_0x6eab42,_0x5ed679,_0xee68d6[_0x4f3d6f(0x163)]),_0x154fa2=resolve(_0x252f6d,SKILL_FILE),_0x4d1de9=resolve(_0x252f6d,METADATA_FILE),_0xf631a8=contentHash(_0x35307d),_0x2db94b=readMetadataIfPresent(_0x4d1de9)?.[_0x4f3d6f(0x162)];ensurePulledFilesCanBeOverwritten(_0x252f6d,_0x4d1de9,_0x510918,_0xee68d6['force']===!![]),mkdirSync(_0x252f6d,{'recursive':!![],'mode':0x1c0});const _0x7444ef=existsSync(_0x154fa2)?readFileSync(_0x154fa2,_0x4f3d6f(0x176)):undefined;return materializeFiles(_0x252f6d,_0x510918),removeStaleManagedFiles(_0x252f6d,_0x2db94b,_0x510918),writeJsonAtomic(_0x4d1de9,buildMetadata(_0x5d0f6f,_0x6eab42,_0xee68d6[_0x4f3d6f(0x16f)],_0xf631a8,_0xee68d6[_0x4f3d6f(0x17c)],_0x510918,_0x5dc310)),{'skill':_0x5d0f6f,'scope':_0x6eab42,'dir':_0x252f6d,'skillMdPath':_0x154fa2,'metadataPath':_0x4d1de9,'contentHash':_0xf631a8,'changed':_0x7444ef!==_0x35307d};}function withMaterializedSkillFrontmatter(_0x1e86e6,_0x197f78,_0x552137){const _0x49295b=a138_0x1962,_0x2a3281=skillDisplayName(_0x197f78,_0x552137),_0x1c1877=_0x197f78['description']?.['trim']()||_0x2a3281||_0x552137;return normalizeLocalFiles(_0x1e86e6)[_0x49295b(0x177)](_0x48e36f=>{const _0x394947=_0x49295b,_0x4390d9=fileText(_0x48e36f);if(_0x48e36f['path']!==SKILL_FILE)return _0x48e36f;if(hasYamlFrontmatter(_0x4390d9))return{'path':_0x48e36f[_0x394947(0x16a)],'content':withSyncedDisplayName(_0x4390d9,_0x2a3281)};return{'path':_0x48e36f[_0x394947(0x16a)],'content':prependSkillFrontmatter(_0x4390d9,{'name':_0x552137,'displayName':_0x2a3281,'description':_0x1c1877})};});}function hasYamlFrontmatter(_0x258a8b){const _0x477484=a138_0x1962;return/^\uFEFF?---\s*\r?\n/[_0x477484(0x156)](_0x258a8b);}function prependSkillFrontmatter(_0x12d340,_0x125bfa){const _0x1adcfc=a138_0x1962,_0x4a7fbd=_0x12d340['replace'](/^\uFEFF/,'');return[_0x1adcfc(0x14f),_0x1adcfc(0x17e)+yamlString(_0x125bfa['name']),_0x125bfa[_0x1adcfc(0x16b)]?'displayName:\x20'+yamlString(_0x125bfa[_0x1adcfc(0x16b)]):undefined,_0x1adcfc(0x172)+yamlString(_0x125bfa[_0x1adcfc(0x168)]),_0x1adcfc(0x14f),'',_0x4a7fbd][_0x1adcfc(0x15e)](_0x357ee3=>_0x357ee3!==undefined)[_0x1adcfc(0x14a)]('\x0a');}function yamlString(_0x3eefa6){const _0x137ed1=a138_0x1962;return JSON[_0x137ed1(0x150)](_0x3eefa6[_0x137ed1(0x148)](/\r/g,'')[_0x137ed1(0x15a)]());}function skillDisplayName(_0x37b71a,_0x2dee8e){const _0x5c46e6=a138_0x1962,_0x423563=_0x37b71a[_0x5c46e6(0x151)]?.['trim']();return _0x423563||_0x2dee8e;}function withSyncedDisplayName(_0x11c246,_0x31199e){const _0x4ab261=a138_0x1962,_0x10fef4=_0x11c246[_0x4ab261(0x179)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x10fef4)return _0x11c246;const _0x39e385=_0x10fef4[0x1]??'',_0x146f91=_0x10fef4[0x2]??'',_0x5cf7e1=parseDocument(_0x146f91);if(_0x5cf7e1[_0x4ab261(0x175)]['length']>0x0||!isMap(_0x5cf7e1[_0x4ab261(0x166)]))return _0x11c246;if(_0x31199e)_0x5cf7e1[_0x4ab261(0x173)](_0x4ab261(0x16b),_0x31199e);else{if(_0x5cf7e1[_0x4ab261(0x165)](_0x4ab261(0x16b)))_0x5cf7e1[_0x4ab261(0x155)](_0x4ab261(0x16b));else return _0x11c246;}forceBlockCollections(_0x5cf7e1[_0x4ab261(0x166)]);const _0x579c0f=_0x5cf7e1[_0x4ab261(0x17b)]({'lineWidth':0x0})[_0x4ab261(0x16d)](),_0x1226f3=_0x11c246[_0x4ab261(0x17d)](_0x10fef4[0x0][_0x4ab261(0x164)])[_0x4ab261(0x148)](/^\r?\n/,'');return _0x39e385+_0x4ab261(0x153)+_0x579c0f+_0x4ab261(0x16c)+_0x1226f3;}function forceBlockCollections(_0x334df5){if(!isNode(_0x334df5))return;visit(_0x334df5,(_0x4ed7b1,_0x55dede)=>{const _0x499183=a138_0x1962;isCollection(_0x55dede)&&(_0x55dede[_0x499183(0x15f)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x2717d8,_0x202928,_0x25c36e,_0x2e94cd){const _0x2570da=a138_0x1962;if(_0x2e94cd||!existsSync(_0x202928))return;const _0x4f05eb=readMetadataIfPresent(_0x202928);if(!_0x4f05eb)return;const _0x1165df=_0x4f05eb[_0x2570da(0x162)]&&Object['keys'](_0x4f05eb[_0x2570da(0x162)])['length']>0x0?_0x4f05eb[_0x2570da(0x162)]:undefined;if(_0x1165df)for(const [_0x2882e1,_0x420367]of Object['entries'](_0x1165df)){const _0xa4a775=resolveManagedFilePath(_0x2717d8,_0x2882e1);if(!existsSync(_0xa4a775))throw CliErrors['validation'](_0x2570da(0x15c)+_0x2717d8,_0x2570da(0x169)+_0x2882e1);const _0x4a6054=lstatSync(_0xa4a775);if(!_0x4a6054[_0x2570da(0x167)]())throw CliErrors[_0x2570da(0x178)](_0x2570da(0x15c)+_0x2717d8,_0x2570da(0x160)+_0x2882e1);const _0xd6f4c9=bufferSha256(readFileSync(_0xa4a775));if(_0xd6f4c9!==_0x420367)throw CliErrors[_0x2570da(0x178)](_0x2570da(0x15c)+_0x2717d8+_0x2570da(0x146)+_0x2882e1,_0x2570da(0x17a)+_0x2882e1);}else{const _0x1073c7=resolve(_0x2717d8,SKILL_FILE);if(existsSync(_0x1073c7)&&_0x4f05eb[_0x2570da(0x154)]){const _0x8f7cac=contentHash(readFileSync(_0x1073c7,'utf8'));if(_0x8f7cac!==_0x4f05eb[_0x2570da(0x154)])throw CliErrors[_0x2570da(0x178)](_0x2570da(0x170)+_0x1073c7,_0x2570da(0x15b));}}for(const _0xe8e30d of normalizeLocalFiles(_0x25c36e)){if(_0x1165df?.[_0xe8e30d[_0x2570da(0x16a)]])continue;if(!_0x1165df&&_0xe8e30d['path']===SKILL_FILE)continue;const _0x4c824f=resolveManagedFilePath(_0x2717d8,_0xe8e30d[_0x2570da(0x16a)]);if(!existsSync(_0x4c824f))continue;const _0x8d8cb6=lstatSync(_0x4c824f);if(!_0x8d8cb6[_0x2570da(0x167)]())throw CliErrors[_0x2570da(0x178)](_0x2570da(0x15c)+_0x2717d8,_0x2570da(0x174)+_0xe8e30d[_0x2570da(0x16a)]);const _0x2aa36a=bufferSha256(readFileSync(_0x4c824f));if(_0x2aa36a!==fileHash(_0xe8e30d))throw CliErrors[_0x2570da(0x178)](_0x2570da(0x15c)+_0x2717d8,_0x2570da(0x14e)+_0xe8e30d['path']);}}function materializeFiles(_0x2727fd,_0x30bc6a){for(const _0x17199f of normalizeLocalFiles(_0x30bc6a)){const _0x42b0f5=resolveManagedFilePath(_0x2727fd,_0x17199f['path']);mkdirSync(dirname(_0x42b0f5),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x42b0f5,fileContent(_0x17199f),0x180);}}function removeStaleManagedFiles(_0x2faf05,_0x272bb0,_0x5ce319){const _0x530b5f=a138_0x1962;if(!_0x272bb0)return;const _0x52f7df=new Set(normalizeLocalFiles(_0x5ce319)[_0x530b5f(0x177)](_0x4f2bc4=>_0x4f2bc4[_0x530b5f(0x16a)]));for(const _0x365bca of Object[_0x530b5f(0x14c)](_0x272bb0)){if(_0x52f7df[_0x530b5f(0x165)](_0x365bca))continue;const _0x388ff3=resolveManagedFilePath(_0x2faf05,_0x365bca);existsSync(_0x388ff3)&&lstatSync(_0x388ff3)[_0x530b5f(0x167)]()&&rmSync(_0x388ff3,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59566b,_0x5308b8){const _0x937b99=a139_0x428e,_0x58899f=_0x59566b();while(!![]){try{const _0x33d0cd=parseInt(_0x937b99(0x125))/0x1*(parseInt(_0x937b99(0x128))/0x2)+-parseInt(_0x937b99(0x129))/0x3+parseInt(_0x937b99(0x139))/0x4*(parseInt(_0x937b99(0x138))/0x5)+-parseInt(_0x937b99(0x123))/0x6+parseInt(_0x937b99(0x130))/0x7+parseInt(_0x937b99(0x134))/0x8*(parseInt(_0x937b99(0x131))/0x9)+-parseInt(_0x937b99(0x12a))/0xa;if(_0x33d0cd===_0x5308b8)break;else _0x58899f['push'](_0x58899f['shift']());}catch(_0x2b3ddc){_0x58899f['push'](_0x58899f['shift']());}}}(a139_0x5e25,0x25a47));import{existsSync,readFileSync}from'node:fs';function a139_0x5e25(){const _0x5429a1=['623601ZOtoYU','readonly','forkedFromSkillId','8xRTYpQ','files','manifest','length','490wDthSZ','4804BtYhoN','tenantCode','zipSize','utf8','forkedFromVersion','description','fromEntries','isArray','trim','sourceSessionId','validation','skillName','318702HoUATe','userId','1069YLqrGg','personal','ossPath','344SQLmvk','524112bzTIjg','2493770ZVeFFg','hasUpstreamUpdate','zipSha256','string','tags','path','1823682SFiQEX'];a139_0x5e25=function(){return _0x5429a1;};return a139_0x5e25();}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0xdc6229,_0x4771ab,_0x431a8e,_0x25f7f2,_0x4a63ea,_0x5a6c70,_0x38c1a6){const _0x26451d=a139_0x428e,_0x5ddf6f=_0x5a6c70?normalizeLocalFiles(_0x5a6c70):[],_0x1d4627=!_0x38c1a6&&_0x5ddf6f['length']>0x0?buildSkillPackage(_0x5ddf6f):undefined,_0x423e2f=_0x38c1a6?bufferSha256(_0x38c1a6):_0x1d4627?.[_0x26451d(0x136)][_0x26451d(0x12c)],_0x1b4a95=_0x38c1a6?.[_0x26451d(0x137)]??_0x1d4627?.[_0x26451d(0x136)][_0x26451d(0x13b)],_0x65a66e=_0x5ddf6f[_0x26451d(0x137)]>0x0?Object[_0x26451d(0x13f)](_0x5ddf6f['map'](_0x540841=>[_0x540841[_0x26451d(0x12f)],fileHash(_0x540841)])):undefined;return{'schemaVersion':_0x5ddf6f[_0x26451d(0x137)]>0x0?0x2:0x1,'id':_0xdc6229['id'],'appCode':_0x431a8e,'skillCode':requireSkillCode(_0xdc6229),'skillName':_0xdc6229[_0x26451d(0x122)],'description':_0xdc6229[_0x26451d(0x13e)],'scope':_0x4771ab,'readonly':_0x4771ab!==_0x26451d(0x126)||_0xdc6229[_0x26451d(0x132)]===!![],'tenantCode':_0xdc6229[_0x26451d(0x13a)],'userId':_0xdc6229[_0x26451d(0x124)],'version':_0xdc6229['version'],'status':_0xdc6229['status'],'tags':Array['isArray'](_0xdc6229[_0x26451d(0x12e)])?_0xdc6229[_0x26451d(0x12e)]:[],'hasUpstreamUpdate':_0xdc6229[_0x26451d(0x12b)],'forkedFromSkillId':_0xdc6229[_0x26451d(0x133)],'forkedFromVersion':_0xdc6229[_0x26451d(0x13d)],'sourceSessionId':_0xdc6229[_0x26451d(0x120)],'contentHash':_0x25f7f2,'fileHashes':_0x65a66e,'treeHash':_0x5ddf6f[_0x26451d(0x137)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x5ddf6f)):undefined,'ossPath':remoteManifestOssPath(_0xdc6229[_0x26451d(0x135)]),'zipSha256':_0x423e2f,'zipSize':_0x1b4a95,'files':_0x5ddf6f[_0x26451d(0x137)]>0x0?_0x5ddf6f['map'](_0x52d7e9=>({'path':_0x52d7e9['path'],'hash':fileHash(_0x52d7e9),'size':fileContent(_0x52d7e9)[_0x26451d(0x137)]})):undefined,'pulledAt':_0x4a63ea??new Date()['toISOString']()};}export function requireSkillCode(_0xe56840){const _0x1dcce4=a139_0x428e,_0x2f312e=_0xe56840['skillCode']?.[_0x1dcce4(0x11f)]();if(!_0x2f312e)throw CliErrors[_0x1dcce4(0x121)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x2f312e;}export function readMetadataIfPresent(_0x1cb9c1){const _0x12e1c9=a139_0x428e;if(!existsSync(_0x1cb9c1))return undefined;try{const _0x5c73e5=JSON['parse'](readFileSync(_0x1cb9c1,_0x12e1c9(0x13c)));return _0x5c73e5;}catch{throw CliErrors[_0x12e1c9(0x121)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x1cb9c1);}}function a139_0x428e(_0x1d489f,_0x113a00){_0x1d489f=_0x1d489f-0x11e;const _0x5e25f4=a139_0x5e25();let _0x428eca=_0x5e25f4[_0x1d489f];return _0x428eca;}function remoteManifestOssPath(_0x36d246){const _0x4ed282=a139_0x428e;if(!_0x36d246||typeof _0x36d246!=='object'||Array[_0x4ed282(0x11e)](_0x36d246))return undefined;const _0x5d7d0c=_0x36d246[_0x4ed282(0x127)];return typeof _0x5d7d0c===_0x4ed282(0x12d)&&_0x5d7d0c[_0x4ed282(0x11f)]()?_0x5d7d0c[_0x4ed282(0x11f)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a140_0x3571(_0x1d7a90,_0xbfb94c){_0x1d7a90=_0x1d7a90-0xd6;const _0x3e7743=a140_0x3e77();let _0x357148=_0x3e7743[_0x1d7a90];return _0x357148;}const a140_0x2e44b7=a140_0x3571;(function(_0x1a375f,_0x389769){const _0x3a90ee=a140_0x3571,_0x1019e0=_0x1a375f();while(!![]){try{const _0x472184=-parseInt(_0x3a90ee(0xef))/0x1*(parseInt(_0x3a90ee(0xd9))/0x2)+parseInt(_0x3a90ee(0xe8))/0x3+parseInt(_0x3a90ee(0xe9))/0x4*(parseInt(_0x3a90ee(0xde))/0x5)+parseInt(_0x3a90ee(0xdb))/0x6+-parseInt(_0x3a90ee(0xeb))/0x7*(-parseInt(_0x3a90ee(0xdc))/0x8)+parseInt(_0x3a90ee(0xe2))/0x9*(parseInt(_0x3a90ee(0xe0))/0xa)+-parseInt(_0x3a90ee(0xf1))/0xb;if(_0x472184===_0x389769)break;else _0x1019e0['push'](_0x1019e0['shift']());}catch(_0x2429f7){_0x1019e0['push'](_0x1019e0['shift']());}}}(a140_0x3e77,0x34d29));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x2ea633={}){const _0x1a012a=a140_0x3571,_0x350099=_0x2ea633[_0x1a012a(0xdf)]??homedir(),_0x3c8f37=resolve(_0x350099,PRODUCT_CONFIG[_0x1a012a(0xe1)],_0x1a012a(0xd8)),_0x1c8915=trimmedEnv(_0x1a012a(0xe4)),_0xad6c0e=trimmedEnv(_0x1a012a(0xe7)),_0xbe95d6=resolve(_0x350099,'.workbuddy'),_0x4ba8b6=_0x2ea633[_0x1a012a(0xee)]??(existsSync(_0xbe95d6)?resolve(_0xbe95d6,_0x1a012a(0xec)):undefined);return{'homeDir':_0x350099,'cacheRoot':_0x3c8f37,'managedRoot':resolve(_0x350099,PRODUCT_CONFIG[_0x1a012a(0xe1)]),'agentsSkillsDir':_0x2ea633[_0x1a012a(0xda)]??_0x1c8915??resolve(_0x350099,'.agents','skills'),'claudeSkillsDir':_0x2ea633[_0x1a012a(0xed)]??_0xad6c0e??resolve(_0x350099,_0x1a012a(0xd6),_0x1a012a(0xec)),'workbuddySkillsDir':_0x4ba8b6};}export function runtimeAgentSkillRoots(_0x1debb3){const _0xa02d2a=a140_0x3571;return[_0x1debb3[_0xa02d2a(0xda)],_0x1debb3['claudeSkillsDir'],_0x1debb3[_0xa02d2a(0xee)]]['filter'](_0x57845a=>Boolean(_0x57845a));}export function getRuntimeSkillCacheRoot(_0x17a889,_0x540eae,_0x44bf27={}){const _0x59a455=a140_0x3571,_0x4044b4=resolveSkillSyncPaths(_0x44bf27);return resolve(_0x4044b4[_0x59a455(0xea)],_0x17a889,fingerprintAccessKey(_0x540eae),_0x59a455(0xec));}export function getRuntimeSkillDir(_0x491ffd,_0x54d6f3,_0x2867fa,_0x19f7c0,_0x8539bc,_0x36d9b5={}){const _0x1a610c=a140_0x3571;return resolve(getRuntimeSkillCacheRoot(_0x491ffd,_0x54d6f3,_0x36d9b5),safePathSegment(_0x2867fa,_0x1a610c(0xe6)),_0x19f7c0,safePathSegment(_0x8539bc,'skillCode'));}function a140_0x3e77(){const _0x58d517=['validation','1810gfrvMk','homeDir','807260zOquAX','homeDirName','9gZYGuc','path\x20segment','SKILL_ROOT','\x20for\x20local\x20path:\x20','appCode','CLAUDE_SKILL_ROOT','441705BPXUWo','1156ODxyja','cacheRoot','61943bbNNSC','skills','claudeSkillsDir','workbuddySkillsDir','1BIhvKN','includes','5596569dpgsnW','.claude','trim','cache','120356uICdiZ','agentsSkillsDir','1017426tJRNVl','256knxGoM'];a140_0x3e77=function(){return _0x58d517;};return a140_0x3e77();}export function safePathSegment(_0x2eb729,_0x3117bc=a140_0x2e44b7(0xe3)){const _0x157d82=a140_0x2e44b7;if(!_0x2eb729||_0x2eb729[_0x157d82(0xf0)]('/')||_0x2eb729[_0x157d82(0xf0)]('\x5c')||_0x2eb729[_0x157d82(0xf0)]('..'))throw CliErrors[_0x157d82(0xdd)]('Unsafe\x20'+_0x3117bc+_0x157d82(0xe5)+_0x2eb729);return _0x2eb729;}function trimmedEnv(_0x376bc7){const _0x3d206a=a140_0x2e44b7,_0x3a74cc=productEnv(_0x376bc7)?.[_0x3d206a(0xd7)]();return _0x3a74cc?_0x3a74cc:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x429535,_0x21dfaf){const _0x2a0534=a121_0x5289,_0x300c23=_0x429535();while(!![]){try{const _0x1d4ec4=-parseInt(_0x2a0534(0x1f4))/0x1+-parseInt(_0x2a0534(0x1f8))/0x2*(-parseInt(_0x2a0534(0x1db))/0x3)+-parseInt(_0x2a0534(0x20f))/0x4+parseInt(_0x2a0534(0x1f0))/0x5+-parseInt(_0x2a0534(0x1f2))/0x6+parseInt(_0x2a0534(0x1df))/0x7*(-parseInt(_0x2a0534(0x1e8))/0x8)+parseInt(_0x2a0534(0x1e9))/0x9*(parseInt(_0x2a0534(0x207))/0xa);if(_0x1d4ec4===_0x21dfaf)break;else _0x300c23['push'](_0x300c23['shift']());}catch(_0xbf4f6a){_0x300c23['push'](_0x300c23['shift']());}}}(a121_0x5ab5,0xeb0df));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a121_0x2b21b7}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0xd1835e,_0x55d9f2,_0x5a468a={}){const _0x4509ef=a121_0x5289,_0x18a819=resolvePushDirectoryRoot(_0xd1835e),_0x4e696c=readPushMetadataIfPresent(resolve(_0x18a819,METADATA_FILE),{'ignoreInvalidMetadata':_0x5a468a['ignoreInvalidMetadata']});if(_0x4e696c?.[_0x4509ef(0x1ef)]&&_0x4e696c[_0x4509ef(0x1ef)]!==_0x55d9f2&&!_0x5a468a[_0x4509ef(0x20b)]&&!_0x5a468a[_0x4509ef(0x1fa)])throw CliErrors['validation'](_0x4509ef(0x20a)+_0x4e696c[_0x4509ef(0x1ef)]+_0x4509ef(0x20c)+_0x55d9f2+'\x22.');const _0x46df3d=resolvePushSkillCode(_0x18a819,_0x55d9f2,_0x4e696c,_0x5a468a);if(!_0x46df3d)throw CliErrors[_0x4509ef(0x1f6)](_0x4509ef(0x212)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x18a819,'skillCode':_0x46df3d,'metadata':_0x4e696c};}export function readPushDirectory(_0x23375b,_0xab8f43,_0x5514f2={}){const _0xe1c03d=a121_0x5289,_0x137b15=resolvePushDirectoryIdentity(_0x23375b,_0xab8f43,_0x5514f2),_0x4d6fe8=_0x137b15[_0xe1c03d(0x21a)],_0x4d750b=resolve(_0x4d6fe8,SKILL_FILE);if(!existsSync(_0x4d750b)||!lstatSync(_0x4d750b)[_0xe1c03d(0x204)]())throw CliErrors[_0xe1c03d(0x1f6)]('Missing\x20'+SKILL_FILE+':\x20'+_0x4d750b);const _0x501623=_0x137b15[_0xe1c03d(0x1e7)],_0x210e34=_0x5514f2[_0xe1c03d(0x1ea)]??_0xe1c03d(0x1f3);if(!_0x5514f2[_0xe1c03d(0x202)]&&_0x501623?.[_0xe1c03d(0x1fb)]===_0xe1c03d(0x1f9))throw CliErrors[_0xe1c03d(0x1f6)](_0xe1c03d(0x20d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x501623[_0xe1c03d(0x1fb)]+'\x22.');if(!_0x5514f2[_0xe1c03d(0x202)]&&_0x210e34===_0xe1c03d(0x1f3)&&_0x501623?.[_0xe1c03d(0x1fb)]&&_0x501623['scope']!=='personal')throw CliErrors[_0xe1c03d(0x1f6)](_0xe1c03d(0x1f5)+METADATA_FILE+_0xe1c03d(0x21b)+_0x501623[_0xe1c03d(0x1fb)]+'\x22.',_0xe1c03d(0x1eb)+_0x4d6fe8+_0xe1c03d(0x215));const _0x59e064=scanSkillDirectory(_0x4d6fe8,{'excludedFilePaths':_0x5514f2[_0xe1c03d(0x214)]}),_0x7a7ac6=buildSkillPackage(_0x59e064),_0x330934=readFileSync(_0x4d750b,_0xe1c03d(0x216)),_0x2cfe3a=_0x137b15[_0xe1c03d(0x200)],_0x534223=_0x5514f2[_0xe1c03d(0x1fd)]?undefined:_0x501623,_0x100679=readSkillDisplayName(_0x330934);return{'skillCode':_0x2cfe3a,'metadata':_0x501623,'frontmatterDisplayName':_0x100679,'input':{'skillCode':_0x2cfe3a,'skillName':_0x100679??_0x534223?.[_0xe1c03d(0x1ee)],'description':_0x534223?.[_0xe1c03d(0x201)],'content':_0x330934,'files':_0x7a7ac6[_0xe1c03d(0x1e2)],'packageBase64':_0x7a7ac6[_0xe1c03d(0x1ff)],'tags':_0x534223?.[_0xe1c03d(0x1d9)],'version':_0x534223?.[_0xe1c03d(0x1ed)],'sourceSessionId':_0x534223?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x3b7cf0,_0x5c5db5,_0x2807c0,_0x4efb66={}){const _0x32bb15=a121_0x5289,_0x558d5a=resolvePushDirectoryRoot(_0x3b7cf0),_0x25c615=readPushMetadataIfPresent(resolve(_0x558d5a,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x1ff005=requireRemoteScope(_0x5c5db5),_0x516edd=readLocalSkillContent(_0x558d5a),_0x34e848={..._0x5c5db5,'appCode':_0x5c5db5[_0x32bb15(0x1ef)]??_0x2807c0,'skillName':_0x5c5db5[_0x32bb15(0x1ee)]??_0x25c615?.[_0x32bb15(0x1ee)],'description':_0x5c5db5[_0x32bb15(0x201)]??_0x25c615?.[_0x32bb15(0x201)],'tags':Array[_0x32bb15(0x1de)](_0x5c5db5['tags'])?_0x5c5db5['tags']:_0x25c615?.[_0x32bb15(0x1d9)],'sourceSessionId':_0x5c5db5[_0x32bb15(0x219)]??_0x25c615?.[_0x32bb15(0x219)],'content':_0x5c5db5[_0x32bb15(0x20e)]??_0x516edd},_0x236b44=buildMetadata(_0x34e848,_0x1ff005,_0x2807c0,contentHash(_0x516edd),_0x4efb66[_0x32bb15(0x1e4)]);writeJsonAtomic(resolve(_0x558d5a,METADATA_FILE),_0x236b44);}function a121_0x5ab5(){const _0x51e1e0=['Skill\x20metadata\x20appCode\x20\x22','allowAppCodeRetarget','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','content','1034816lAkMpW','toLowerCase','string','Unable\x20to\x20resolve\x20skillCode\x20from\x20','pushedAt','excludedFilePaths','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','utf8','path','displayName','sourceSessionId','dir','\x20has\x20scope=\x22','tags','ignoreMetadataSkillCode','51vkKTWu','find','trim','isArray','185878IMdrJQ','replace','boolean','manifest','Invalid\x20','refreshedAt','\x20has\x20unsupported\x20scope\x20\x22','\x20name\x20for\x20SkillHub\x20slug\x20generation.','metadata','248GaMopv','801TpZqYD','targetScope','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','version','skillName','appCode','6065545PpvZdo','ignoreInvalidMetadata','10277064PeZNMv','personal','83419scRzPB','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','validation','name','95984vTpIdS','builtin','ignoreMetadataAppCodeMismatch','scope','length','ignoreMetadataForPayload','match','packageBase64','skillCode','description','ignoreMetadataScope','number','isFile','Remote\x20Skill\x20','files','203590tvsvCz','filter','isDirectory'];a121_0x5ab5=function(){return _0x51e1e0;};return a121_0x5ab5();}export function recordPushedRuntimeSkill(_0x3ce4c3,_0x309136,_0x4a7ff3,_0x11e0ba={}){const _0x7d66e2=a121_0x5289,_0xfe1df2=resolvePushDirectoryRoot(_0x3ce4c3),_0x291881=scanSkillDirectory(_0xfe1df2),_0x272ddd=_0x291881[_0x7d66e2(0x1dc)](_0x33aed0=>_0x33aed0['path']===SKILL_FILE),_0x5ed0ca=_0x272ddd?fileText(_0x272ddd):'',_0x413140=tryNormalizePackageManifest(_0x309136['files']),_0x2dc4a0={..._0x309136,'content':_0x309136[_0x7d66e2(0x20e)]??_0x5ed0ca,'files':_0x413140},_0x374f3d=_0x413140?normalizeLocalFiles(_0x291881)[_0x7d66e2(0x208)](_0x18e0cd=>_0x413140[_0x7d66e2(0x206)]['some'](_0x3904b2=>_0x3904b2[_0x7d66e2(0x217)]===_0x18e0cd[_0x7d66e2(0x217)])):undefined,_0x4d2c3f=buildMetadata(_0x2dc4a0,_0x11e0ba[_0x7d66e2(0x1fb)]??_0x7d66e2(0x1f3),_0x4a7ff3,contentHash(_0x2dc4a0[_0x7d66e2(0x20e)]??''),_0x11e0ba[_0x7d66e2(0x213)],_0x374f3d);writeJsonAtomic(resolve(_0xfe1df2,METADATA_FILE),_0x4d2c3f);}export function deriveSkillCodeFromDirectory(_0x123b0d,_0x100152){const _0x3fa93c=a121_0x5289,_0x130829=basename(resolve(_0x123b0d)),_0x35e477=_0x100152+'--';return _0x130829['startsWith'](_0x35e477)?_0x130829['slice'](_0x35e477[_0x3fa93c(0x1fc)]):_0x130829;}function resolvePushSkillCode(_0x53d48c,_0x1abb03,_0x5e8b8c,_0x2b4ef2){const _0x2013b9=a121_0x5289,_0x5cc111=deriveSkillCodeFromSkillFile(_0x53d48c)||deriveSkillCodeFromDirectory(_0x53d48c,_0x1abb03);if(_0x2b4ef2[_0x2013b9(0x1da)])return _0x5cc111;return _0x5e8b8c?.[_0x2013b9(0x200)]?.[_0x2013b9(0x1dd)]()||_0x5cc111;}function deriveSkillCodeFromSkillFile(_0x494482){const _0x192ae8=a121_0x5289,_0x31bdeb=resolve(_0x494482,SKILL_FILE);if(!existsSync(_0x31bdeb)||!lstatSync(_0x31bdeb)[_0x192ae8(0x204)]())return undefined;const _0x2e3b99=readFileSync(_0x31bdeb,_0x192ae8(0x216)),_0x30e798=_0x2e3b99[_0x192ae8(0x1fe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x30e798)return undefined;const _0x593fb4=parseFrontmatterObject(_0x30e798[0x1]??''),_0x36fd1e=scalarToString(_0x593fb4?.[_0x192ae8(0x1f7)]);return _0x36fd1e?slugifySkillName(_0x36fd1e):undefined;}function readSkillDisplayName(_0x4bf35e){const _0x5f3aa9=a121_0x5289,_0xc36a6=_0x4bf35e[_0x5f3aa9(0x1fe)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xc36a6)return undefined;const _0x4eec57=parseFrontmatterObject(_0xc36a6[0x1]??'');return scalarToString(_0x4eec57?.[_0x5f3aa9(0x218)]);}function a121_0x5289(_0x3888d6,_0x5f540c){_0x3888d6=_0x3888d6-0x1d9;const _0x5ab58d=a121_0x5ab5();let _0x528954=_0x5ab58d[_0x3888d6];return _0x528954;}function slugifySkillName(_0x219661){const _0x121219=a121_0x5289,_0x13e199=_0x219661[_0x121219(0x1dd)]()[_0x121219(0x210)]()[_0x121219(0x1e0)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x121219(0x1e0)](/^-+/,'')[_0x121219(0x1e0)](/-+$/,'')[_0x121219(0x1e0)](/-{2,}/g,'-');if(!_0x13e199)throw CliErrors['validation'](_0x121219(0x1e3)+SKILL_FILE+_0x121219(0x1e6));return _0x13e199;}function parseFrontmatterObject(_0x5809eb){try{const _0x5f2a8e=a121_0x2b21b7(_0x5809eb);return _0x5f2a8e&&typeof _0x5f2a8e==='object'&&!Array['isArray'](_0x5f2a8e)?_0x5f2a8e:undefined;}catch{return undefined;}}function scalarToString(_0x4846f7){const _0x5ce38d=a121_0x5289;if(typeof _0x4846f7===_0x5ce38d(0x211))return _0x4846f7['trim']();if(typeof _0x4846f7===_0x5ce38d(0x203)||typeof _0x4846f7===_0x5ce38d(0x1e1))return String(_0x4846f7);return undefined;}function resolvePushDirectoryRoot(_0x4e5e5e){const _0x58a056=a121_0x5289,_0x268b11=resolve(_0x4e5e5e);if(!existsSync(_0x268b11))throw CliErrors[_0x58a056(0x1f6)](_0x58a056(0x1ec)+_0x4e5e5e);const _0x56c360=lstatSync(_0x268b11);if(_0x56c360[_0x58a056(0x209)]())return _0x268b11;if(_0x56c360['isSymbolicLink']()){const _0x1a7ef0=realpathSync(_0x268b11);if(lstatSync(_0x1a7ef0)['isDirectory']())return _0x1a7ef0;}throw CliErrors[_0x58a056(0x1f6)](_0x58a056(0x1ec)+_0x4e5e5e);}function requireRemoteScope(_0x37bffa){const _0x549ee1=a121_0x5289;if(_0x37bffa['scope']===_0x549ee1(0x1f3)||_0x37bffa[_0x549ee1(0x1fb)]==='company'||_0x37bffa['scope']===_0x549ee1(0x1f9))return _0x37bffa[_0x549ee1(0x1fb)];throw CliErrors['validation'](_0x549ee1(0x205)+(_0x37bffa['skillCode']||'(unknown)')+_0x549ee1(0x1e5)+(_0x37bffa[_0x549ee1(0x1fb)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x35ed95){const _0x138ffa=a121_0x5289,_0x248175=resolve(_0x35ed95,SKILL_FILE);return existsSync(_0x248175)&&lstatSync(_0x248175)['isFile']()?readFileSync(_0x248175,_0x138ffa(0x216)):'';}function readPushMetadataIfPresent(_0x62ed0d,_0x405405={}){const _0x37d512=a121_0x5289;try{return readMetadataIfPresent(_0x62ed0d);}catch(_0x115401){if(_0x405405[_0x37d512(0x1f1)])return undefined;throw _0x115401;}}
|
|
1
|
+
(function(_0x307d96,_0x2d59cb){const _0x7351fb=a141_0x5599,_0xd15e4=_0x307d96();while(!![]){try{const _0x453990=-parseInt(_0x7351fb(0x15e))/0x1*(parseInt(_0x7351fb(0x176))/0x2)+-parseInt(_0x7351fb(0x17f))/0x3*(-parseInt(_0x7351fb(0x15b))/0x4)+parseInt(_0x7351fb(0x14e))/0x5+-parseInt(_0x7351fb(0x183))/0x6*(-parseInt(_0x7351fb(0x164))/0x7)+-parseInt(_0x7351fb(0x153))/0x8+parseInt(_0x7351fb(0x157))/0x9*(-parseInt(_0x7351fb(0x15d))/0xa)+parseInt(_0x7351fb(0x160))/0xb*(parseInt(_0x7351fb(0x15f))/0xc);if(_0x453990===_0x2d59cb)break;else _0xd15e4['push'](_0xd15e4['shift']());}catch(_0x293798){_0xd15e4['push'](_0xd15e4['shift']());}}}(a141_0x237a,0x2319f));function a141_0x5599(_0x199f29,_0xade13e){_0x199f29=_0x199f29-0x13f;const _0x237a5c=a141_0x237a();let _0x5599a9=_0x237a5c[_0x199f29];return _0x5599a9;}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x3674bc}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(_0xc6571,_0x4618e7,_0x359504={}){const _0x562854=a141_0x5599,_0x53e214=resolvePushDirectoryRoot(_0xc6571),_0x44c131=readPushMetadataIfPresent(resolve(_0x53e214,METADATA_FILE),{'ignoreInvalidMetadata':_0x359504[_0x562854(0x166)]});if(_0x44c131?.[_0x562854(0x185)]&&_0x44c131[_0x562854(0x185)]!==_0x4618e7&&!_0x359504[_0x562854(0x152)]&&!_0x359504[_0x562854(0x178)])throw CliErrors[_0x562854(0x13f)](_0x562854(0x17a)+_0x44c131[_0x562854(0x185)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4618e7+'\x22.');const _0x488381=resolvePushSkillCode(_0x53e214,_0x4618e7,_0x44c131,_0x359504);if(!_0x488381)throw CliErrors[_0x562854(0x13f)](_0x562854(0x172)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x53e214,'skillCode':_0x488381,'metadata':_0x44c131};}export function readPushDirectory(_0x458336,_0x16b244,_0x22e1c7={}){const _0x16af80=a141_0x5599,_0xf60bb6=resolvePushDirectoryIdentity(_0x458336,_0x16b244,_0x22e1c7),_0x2b4b5b=_0xf60bb6[_0x16af80(0x184)],_0x53517f=resolve(_0x2b4b5b,SKILL_FILE);if(!existsSync(_0x53517f)||!lstatSync(_0x53517f)[_0x16af80(0x156)]())throw CliErrors[_0x16af80(0x13f)](_0x16af80(0x159)+SKILL_FILE+':\x20'+_0x53517f);const _0x2cebb0=_0xf60bb6['metadata'],_0x9c156e=_0x22e1c7[_0x16af80(0x144)]??_0x16af80(0x16e);if(!_0x22e1c7[_0x16af80(0x14d)]&&_0x2cebb0?.[_0x16af80(0x177)]==='builtin')throw CliErrors[_0x16af80(0x13f)](_0x16af80(0x143)+METADATA_FILE+_0x16af80(0x174)+_0x2cebb0[_0x16af80(0x177)]+'\x22.');if(!_0x22e1c7[_0x16af80(0x14d)]&&_0x9c156e===_0x16af80(0x16e)&&_0x2cebb0?.['scope']&&_0x2cebb0[_0x16af80(0x177)]!==_0x16af80(0x16e))throw CliErrors['validation']('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x16af80(0x174)+_0x2cebb0[_0x16af80(0x177)]+'\x22.',_0x16af80(0x150)+_0x2b4b5b+_0x16af80(0x14c));const _0x5a237b=scanSkillDirectory(_0x2b4b5b,{'excludedFilePaths':_0x22e1c7[_0x16af80(0x141)]}),_0x35040b=buildSkillPackage(_0x5a237b),_0x21731d=readFileSync(_0x53517f,_0x16af80(0x15c)),_0x18c971=_0xf60bb6['skillCode'],_0x501291=_0x22e1c7[_0x16af80(0x146)]?undefined:_0x2cebb0,_0x1a27c4=readSkillDisplayName(_0x21731d);return{'skillCode':_0x18c971,'metadata':_0x2cebb0,'frontmatterDisplayName':_0x1a27c4,'input':{'skillCode':_0x18c971,'skillName':_0x1a27c4??_0x501291?.[_0x16af80(0x140)],'description':_0x501291?.[_0x16af80(0x155)],'content':_0x21731d,'files':_0x35040b[_0x16af80(0x14a)],'packageBase64':_0x35040b['packageBase64'],'tags':_0x501291?.[_0x16af80(0x168)],'version':_0x501291?.[_0x16af80(0x170)],'sourceSessionId':_0x501291?.[_0x16af80(0x17c)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x54a41a,_0x46d095,_0x18904e,_0x2d710b={}){const _0x2d8930=a141_0x5599,_0x264c37=resolvePushDirectoryRoot(_0x54a41a),_0x8fcba6=readPushMetadataIfPresent(resolve(_0x264c37,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2ac289=requireRemoteScope(_0x46d095),_0x55d8a6=readLocalSkillContent(_0x264c37),_0x59c3cb={..._0x46d095,'appCode':_0x46d095[_0x2d8930(0x185)]??_0x18904e,'skillName':_0x46d095['skillName']??_0x8fcba6?.[_0x2d8930(0x140)],'description':_0x46d095['description']??_0x8fcba6?.['description'],'tags':Array[_0x2d8930(0x17e)](_0x46d095['tags'])?_0x46d095[_0x2d8930(0x168)]:_0x8fcba6?.[_0x2d8930(0x168)],'sourceSessionId':_0x46d095[_0x2d8930(0x17c)]??_0x8fcba6?.['sourceSessionId'],'content':_0x46d095[_0x2d8930(0x165)]??_0x55d8a6},_0xe7c88d=buildMetadata(_0x59c3cb,_0x2ac289,_0x18904e,contentHash(_0x55d8a6),_0x2d710b[_0x2d8930(0x161)]);writeJsonAtomic(resolve(_0x264c37,METADATA_FILE),_0xe7c88d);}export function recordPushedRuntimeSkill(_0x1945a8,_0x45dd02,_0x522fb9,_0x5d59e1={}){const _0x40aef4=a141_0x5599,_0x26c304=resolvePushDirectoryRoot(_0x1945a8),_0x4866d2=scanSkillDirectory(_0x26c304),_0x7f117c=_0x4866d2[_0x40aef4(0x180)](_0x36ed65=>_0x36ed65[_0x40aef4(0x162)]===SKILL_FILE),_0x206fd0=_0x7f117c?fileText(_0x7f117c):'',_0x2b9f5a=tryNormalizePackageManifest(_0x45dd02[_0x40aef4(0x14f)]),_0x56a40d={..._0x45dd02,'content':_0x45dd02[_0x40aef4(0x165)]??_0x206fd0,'files':_0x2b9f5a},_0x556fbe=_0x2b9f5a?normalizeLocalFiles(_0x4866d2)[_0x40aef4(0x16b)](_0x1b75fa=>_0x2b9f5a[_0x40aef4(0x14f)][_0x40aef4(0x163)](_0x597da3=>_0x597da3['path']===_0x1b75fa[_0x40aef4(0x162)])):undefined,_0x9d08a2=buildMetadata(_0x56a40d,_0x5d59e1[_0x40aef4(0x177)]??'personal',_0x522fb9,contentHash(_0x56a40d[_0x40aef4(0x165)]??''),_0x5d59e1[_0x40aef4(0x181)],_0x556fbe);writeJsonAtomic(resolve(_0x26c304,METADATA_FILE),_0x9d08a2);}export function deriveSkillCodeFromDirectory(_0x1d5898,_0xaf925a){const _0x4c8078=a141_0x5599,_0x2fc9f2=basename(resolve(_0x1d5898)),_0x5c68be=_0xaf925a+'--';return _0x2fc9f2[_0x4c8078(0x179)](_0x5c68be)?_0x2fc9f2[_0x4c8078(0x147)](_0x5c68be[_0x4c8078(0x175)]):_0x2fc9f2;}function resolvePushSkillCode(_0x202ba6,_0x2a65f4,_0x50fe8f,_0x264d8d){const _0x57f791=a141_0x5599,_0x44260e=deriveSkillCodeFromSkillFile(_0x202ba6)||deriveSkillCodeFromDirectory(_0x202ba6,_0x2a65f4);if(_0x264d8d[_0x57f791(0x15a)])return _0x44260e;return _0x50fe8f?.[_0x57f791(0x17b)]?.[_0x57f791(0x149)]()||_0x44260e;}function deriveSkillCodeFromSkillFile(_0x5b7c63){const _0x4faf74=a141_0x5599,_0x539563=resolve(_0x5b7c63,SKILL_FILE);if(!existsSync(_0x539563)||!lstatSync(_0x539563)[_0x4faf74(0x156)]())return undefined;const _0x5e595c=readFileSync(_0x539563,_0x4faf74(0x15c)),_0x26654e=_0x5e595c[_0x4faf74(0x154)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x26654e)return undefined;const _0x480e3b=parseFrontmatterObject(_0x26654e[0x1]??''),_0x26b279=scalarToString(_0x480e3b?.[_0x4faf74(0x148)]);return _0x26b279?slugifySkillName(_0x26b279):undefined;}function readSkillDisplayName(_0x4ea07f){const _0x2a8666=a141_0x5599,_0x1d035b=_0x4ea07f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1d035b)return undefined;const _0x415728=parseFrontmatterObject(_0x1d035b[0x1]??'');return scalarToString(_0x415728?.[_0x2a8666(0x145)]);}function slugifySkillName(_0x26f6eb){const _0x436ad5=a141_0x5599,_0x3b4502=_0x26f6eb[_0x436ad5(0x149)]()[_0x436ad5(0x169)]()[_0x436ad5(0x17d)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x436ad5(0x17d)](/^-+/,'')[_0x436ad5(0x17d)](/-+$/,'')[_0x436ad5(0x17d)](/-{2,}/g,'-');if(!_0x3b4502)throw CliErrors[_0x436ad5(0x13f)]('Invalid\x20'+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x3b4502;}function parseFrontmatterObject(_0x1f5ed6){const _0x5008ab=a141_0x5599;try{const _0x532494=a141_0x3674bc(_0x1f5ed6);return _0x532494&&typeof _0x532494===_0x5008ab(0x142)&&!Array[_0x5008ab(0x17e)](_0x532494)?_0x532494:undefined;}catch{return undefined;}}function scalarToString(_0x487bc0){const _0x1c6c67=a141_0x5599;if(typeof _0x487bc0===_0x1c6c67(0x173))return _0x487bc0[_0x1c6c67(0x149)]();if(typeof _0x487bc0===_0x1c6c67(0x151)||typeof _0x487bc0==='boolean')return String(_0x487bc0);return undefined;}function resolvePushDirectoryRoot(_0x1d523a){const _0x1e123d=a141_0x5599,_0x5dea7b=resolve(_0x1d523a);if(!existsSync(_0x5dea7b))throw CliErrors[_0x1e123d(0x13f)](_0x1e123d(0x16c)+_0x1d523a);const _0xcfaa8d=lstatSync(_0x5dea7b);if(_0xcfaa8d[_0x1e123d(0x16d)]())return _0x5dea7b;if(_0xcfaa8d[_0x1e123d(0x14b)]()){const _0x1405a2=realpathSync(_0x5dea7b);if(lstatSync(_0x1405a2)[_0x1e123d(0x16d)]())return _0x1405a2;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x1d523a);}function requireRemoteScope(_0x1712e){const _0x3d4dcb=a141_0x5599;if(_0x1712e['scope']===_0x3d4dcb(0x16e)||_0x1712e[_0x3d4dcb(0x177)]===_0x3d4dcb(0x16a)||_0x1712e[_0x3d4dcb(0x177)]===_0x3d4dcb(0x171))return _0x1712e[_0x3d4dcb(0x177)];throw CliErrors[_0x3d4dcb(0x13f)](_0x3d4dcb(0x16f)+(_0x1712e['skillCode']||_0x3d4dcb(0x182))+_0x3d4dcb(0x167)+(_0x1712e[_0x3d4dcb(0x177)]??_0x3d4dcb(0x158))+'\x22.');}function readLocalSkillContent(_0x2c0343){const _0x58ac97=a141_0x5599,_0x4dff1c=resolve(_0x2c0343,SKILL_FILE);return existsSync(_0x4dff1c)&&lstatSync(_0x4dff1c)[_0x58ac97(0x156)]()?readFileSync(_0x4dff1c,_0x58ac97(0x15c)):'';}function readPushMetadataIfPresent(_0x575d05,_0x28ee7a={}){try{return readMetadataIfPresent(_0x575d05);}catch(_0xaafc69){if(_0x28ee7a['ignoreInvalidMetadata'])return undefined;throw _0xaafc69;}}function a141_0x237a(){const _0x3435cd=['970645qGlWqG','files','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','number','allowAppCodeRetarget','1412336gcDZKm','match','description','isFile','459wbQegE','unknown','Missing\x20','ignoreMetadataSkillCode','236ZMVkZi','utf8','32830Wxdfdl','4oFWBBd','60zseqWr','634843SddYmR','refreshedAt','path','some','35JtMgjy','content','ignoreInvalidMetadata','\x20has\x20unsupported\x20scope\x20\x22','tags','toLowerCase','company','filter','Skill\x20directory\x20not\x20found:\x20','isDirectory','personal','Remote\x20Skill\x20','version','builtin','Unable\x20to\x20resolve\x20skillCode\x20from\x20','string','\x20has\x20scope=\x22','length','41188JzahhG','scope','ignoreMetadataAppCodeMismatch','startsWith','Skill\x20metadata\x20appCode\x20\x22','skillCode','sourceSessionId','replace','isArray','4389VsehLf','find','pushedAt','(unknown)','1338ZBPIUr','dir','appCode','validation','skillName','excludedFilePaths','object','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','targetScope','displayName','ignoreMetadataForPayload','slice','name','trim','manifest','isSymbolicLink','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','ignoreMetadataScope'];a141_0x237a=function(){return _0x3435cd;};return a141_0x237a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x477456,_0x4ebc68){const _0x3695ed=a142_0x22d7,_0xfd7f33=_0x477456();while(!![]){try{const _0x1c8a12=parseInt(_0x3695ed(0x1af))/0x1+parseInt(_0x3695ed(0x1ba))/0x2*(parseInt(_0x3695ed(0x1ad))/0x3)+-parseInt(_0x3695ed(0x1ae))/0x4+parseInt(_0x3695ed(0x1bd))/0x5+parseInt(_0x3695ed(0x1b6))/0x6+parseInt(_0x3695ed(0x1b7))/0x7+parseInt(_0x3695ed(0x1b5))/0x8*(-parseInt(_0x3695ed(0x1b3))/0x9);if(_0x1c8a12===_0x4ebc68)break;else _0xfd7f33['push'](_0xfd7f33['shift']());}catch(_0x2317f5){_0xfd7f33['push'](_0xfd7f33['shift']());}}}(a142_0x2e78,0x6596a));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x33ef98){const _0x5009d5=a142_0x22d7,_0x40b32b=_0x33ef98&&_0x33ef98[_0x5009d5(0x1bc)]>0x0?_0x33ef98:[_0x5009d5(0x1b9),_0x5009d5(0x1b2),_0x5009d5(0x1bb)],_0xb9e961=[];for(const _0xb9c345 of _0x40b32b){if(!isRuntimeSkillScope(_0xb9c345))throw CliErrors[_0x5009d5(0x1b8)](_0x5009d5(0x1b0)+_0xb9c345);!_0xb9e961[_0x5009d5(0x1b4)](_0xb9c345)&&_0xb9e961[_0x5009d5(0x1b1)](_0xb9c345);}return _0xb9e961;}function a142_0x22d7(_0x132d6c,_0x76806a){_0x132d6c=_0x132d6c-0x1ad;const _0x2e7822=a142_0x2e78();let _0x22d7c8=_0x2e7822[_0x132d6c];return _0x22d7c8;}export function isRuntimeSkillScope(_0xaa993b){const _0x5bed31=a142_0x22d7;return _0xaa993b===_0x5bed31(0x1b9)||_0xaa993b===_0x5bed31(0x1b2)||_0xaa993b===_0x5bed31(0x1bb);}function a142_0x2e78(){const _0x2aa9e1=['476330aVOiid','3RrrLIk','1879048OOxLWQ','730464nnBsMv','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','company','9ygFmmj','includes','10980304iFeSeP','3679596gqKkJe','317786tzjhiO','validation','personal','1548024SmtAmA','builtin','length'];a142_0x2e78=function(){return _0x2aa9e1;};return a142_0x2e78();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a144_0x108136=a144_0x4ca5;(function(_0x181c72,_0x3c96a9){const _0x20ca68=a144_0x4ca5,_0x367cf5=_0x181c72();while(!![]){try{const _0xc08a99=-parseInt(_0x20ca68(0x189))/0x1+-parseInt(_0x20ca68(0x190))/0x2+parseInt(_0x20ca68(0x18f))/0x3*(parseInt(_0x20ca68(0x18c))/0x4)+parseInt(_0x20ca68(0x18e))/0x5*(parseInt(_0x20ca68(0x182))/0x6)+-parseInt(_0x20ca68(0x181))/0x7*(-parseInt(_0x20ca68(0x191))/0x8)+-parseInt(_0x20ca68(0x184))/0x9+parseInt(_0x20ca68(0x185))/0xa;if(_0xc08a99===_0x3c96a9)break;else _0x367cf5['push'](_0x367cf5['shift']());}catch(_0x3c4ed1){_0x367cf5['push'](_0x367cf5['shift']());}}}(a144_0x2242,0xb0b05));function a144_0x4ca5(_0x2a3515,_0x4674b1){_0x2a3515=_0x2a3515-0x180;const _0x22426b=a144_0x2242();let _0x4ca5c4=_0x22426b[_0x2a3515];return _0x4ca5c4;}function a144_0x2242(){const _0x1d03c7=['from','55735JUCsqL','1167297xmybGa','706556ubbjJl','8Pqxzkq','validation_error','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','code','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','3942008czjbeD','726JYOxLQ','endsWith','8887023BzhMTX','10495790EQXxle','sort','map','object','1286167mqzIJb','entries','validation','4sZKErJ'];a144_0x2242=function(){return _0x1d03c7;};return a144_0x2242();}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a144_0x108136(0x196));export function createDeterministicZipPackage(_0x22f2c6){const _0x258ede=a144_0x108136,_0x3097d4={};for(const _0xca6324 of normalizeLocalFiles(_0x22f2c6)){_0x3097d4[_0xca6324['path']]=fileContent(_0xca6324);}return Buffer[_0x258ede(0x18d)](zipSync(_0x3097d4,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x131346){const _0x5c3767=a144_0x108136;if(_0x131346[_0x5c3767(0x194)]<0x16)throw CliErrors['validation'](_0x5c3767(0x193));let _0x2d1c1f;try{_0x2d1c1f=unzipSync(_0x131346,{'filter'(_0x218c52){const _0x3d310d=_0x5c3767,_0x46545c=normalizeSkillRelativePath(_0x218c52['name']);if(_0x46545c[_0x3d310d(0x183)]('/'))throw CliErrors[_0x3d310d(0x18b)](_0x3d310d(0x180)+_0x46545c);return!![];}});}catch(_0x34effa){if(isRuntimeSkillValidationError(_0x34effa))throw _0x34effa;throw CliErrors['validation'](_0x5c3767(0x193));}return Object[_0x5c3767(0x18a)](_0x2d1c1f)[_0x5c3767(0x187)](([_0x17f6e9,_0x2a6cfe])=>({'path':normalizeSkillRelativePath(_0x17f6e9),'bytes':Buffer[_0x5c3767(0x18d)](_0x2a6cfe)}))[_0x5c3767(0x186)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x48c111){const _0xdbcddb=a144_0x108136;return typeof _0x48c111===_0xdbcddb(0x188)&&_0x48c111!==null&&_0xdbcddb(0x195)in _0x48c111&&_0x48c111[_0xdbcddb(0x195)]===_0xdbcddb(0x192);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3459b8,_0x30c917){const _0x234f78=a145_0x4f4c,_0x55d3cf=_0x3459b8();while(!![]){try{const _0x27f01f=parseInt(_0x234f78(0x93))/0x1*(parseInt(_0x234f78(0x8c))/0x2)+-parseInt(_0x234f78(0x98))/0x3+-parseInt(_0x234f78(0x9a))/0x4*(-parseInt(_0x234f78(0xad))/0x5)+-parseInt(_0x234f78(0x8f))/0x6+parseInt(_0x234f78(0xa8))/0x7*(parseInt(_0x234f78(0x9d))/0x8)+-parseInt(_0x234f78(0xac))/0x9*(parseInt(_0x234f78(0x99))/0xa)+parseInt(_0x234f78(0xa5))/0xb*(parseInt(_0x234f78(0x8e))/0xc);if(_0x27f01f===_0x30c917)break;else _0x55d3cf['push'](_0x55d3cf['shift']());}catch(_0x55fa2c){_0x55d3cf['push'](_0x55d3cf['shift']());}}}(a145_0x4d63,0x8943b));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x1543fd){const _0x2dbed7=a145_0x4f4c,_0x34336e=normalizeLocalFiles(_0x1543fd);if(!_0x34336e['some'](_0x260a4f=>_0x260a4f['path']===SKILL_FILE))throw CliErrors[_0x2dbed7(0xa9)](_0x2dbed7(0x8a)+SKILL_FILE+_0x2dbed7(0x9f));const _0x542267=localFilesToManifestFiles(_0x34336e),_0x40cc54=createDeterministicZipPackage(_0x34336e);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x542267),'zipSha256':bufferSha256(_0x40cc54),'zipSize':_0x40cc54[_0x2dbed7(0x92)],'files':_0x542267},'packageBytes':_0x40cc54,'packageBase64':_0x40cc54[_0x2dbed7(0xa7)](_0x2dbed7(0x94))};}export function verifyRuntimeSkillPackage(_0x3a505a,_0x148ff6){const _0x11073e=a145_0x4f4c,_0x4c7340=normalizePackageManifest(_0x3a505a,{'requireOssPath':![]});if(!_0x4c7340)throw CliErrors[_0x11073e(0xa9)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x4c7340,_0x148ff6);}function a145_0x4f4c(_0x25278f,_0x51aff5){_0x25278f=_0x25278f-0x87;const _0x4d63ac=a145_0x4d63();let _0x4f4c79=_0x4d63ac[_0x25278f];return _0x4f4c79;}export function verifyRuntimeSkillBundle(_0x19949e,_0x4fb158){const _0x41feac=a145_0x4f4c,_0x29c2c9=normalizePackageManifest(_0x19949e,{'requireOssPath':![]});if(!_0x29c2c9)throw CliErrors[_0x41feac(0xa9)](_0x41feac(0x9e));return extractAndVerifyPackageFiles(_0x29c2c9,_0x4fb158);}export function tryNormalizePackageManifest(_0x3aeb5d){return normalizePackageManifest(_0x3aeb5d,{'requireOssPath':![]});}export function requirePackageBytes(_0x4bbf10,_0x5a602){const _0x19290b=a145_0x4f4c;if(!_0x5a602||_0x5a602[_0x19290b(0x92)]===0x0)throw CliErrors['validation'](_0x19290b(0xaa)+_0x4bbf10);return _0x5a602;}export function extractDownloadedPackage(_0x1a7d72){const _0x58d48c=a145_0x4f4c,_0x53f726=parseZipPackage(_0x1a7d72)[_0x58d48c(0x88)](_0x35a26c=>({'path':_0x35a26c['path'],'bytes':_0x35a26c[_0x58d48c(0xb3)]}));if(!_0x53f726['some'](_0x4c8ad1=>_0x4c8ad1[_0x58d48c(0xa2)]===SKILL_FILE))throw CliErrors[_0x58d48c(0xa9)](_0x58d48c(0x91)+SKILL_FILE+'.');return normalizeLocalFiles(_0x53f726);}export function localFilesToManifestFiles(_0x880d6f){const _0x4d099b=a145_0x4f4c;return normalizeLocalFiles(_0x880d6f)['map'](_0x552955=>({'path':_0x552955[_0x4d099b(0xa2)],'sha256':fileHash(_0x552955),'size':fileContent(_0x552955)[_0x4d099b(0x92)]}));}function normalizePackageManifest(_0x23be8f,_0x372700){const _0x19af20=a145_0x4f4c;if(!_0x23be8f||typeof _0x23be8f!=='object'||Array[_0x19af20(0x90)](_0x23be8f))return undefined;const _0x5105fb=_0x23be8f,_0x41b3e8=typeof _0x5105fb['ossPath']==='string'?_0x5105fb[_0x19af20(0x9c)][_0x19af20(0xb4)]():undefined;if(_0x372700[_0x19af20(0xa6)]&&!_0x41b3e8)return undefined;if(!Array[_0x19af20(0x90)](_0x5105fb[_0x19af20(0xa1)])||_0x5105fb[_0x19af20(0xa1)][_0x19af20(0x92)]===0x0)return undefined;if(!isSha256Hex(_0x5105fb[_0x19af20(0xaf)]))throw CliErrors[_0x19af20(0xa9)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x5105fb[_0x19af20(0x8d)]))throw CliErrors[_0x19af20(0xa9)](_0x19af20(0xab));if(!Number['isSafeInteger'](_0x5105fb[_0x19af20(0xb1)])||_0x5105fb['zipSize']<0x0)throw CliErrors[_0x19af20(0xa9)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x3b18b0=normalizeManifestFiles(_0x5105fb[_0x19af20(0xa1)]);if(!_0x3b18b0[_0x19af20(0x87)](_0x3d5f91=>_0x3d5f91[_0x19af20(0xa2)]===SKILL_FILE))throw CliErrors[_0x19af20(0xa9)](_0x19af20(0xb2)+SKILL_FILE+'.');const _0x30ff55=fileTreeHash(_0x3b18b0);if(_0x30ff55!==_0x5105fb[_0x19af20(0xaf)][_0x19af20(0xae)]())throw CliErrors[_0x19af20(0xa9)](_0x19af20(0x9b));return{'schemaVersion':Number['isSafeInteger'](_0x5105fb[_0x19af20(0x97)])?_0x5105fb['schemaVersion']:0x2,'ossPath':_0x41b3e8,'treeSha256':_0x30ff55,'zipSha256':_0x5105fb[_0x19af20(0x8d)][_0x19af20(0xae)](),'zipSize':_0x5105fb[_0x19af20(0xb1)],'files':_0x3b18b0};}function extractAndVerifyPackage(_0x2269fb,_0x56a1e5){const _0xf47442=a145_0x4f4c,_0x5bd36f=normalizePackageManifest(_0x2269fb,{'requireOssPath':![]});if(!_0x5bd36f)throw CliErrors[_0xf47442(0xa9)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x56a1e5[_0xf47442(0x92)]!==_0x5bd36f['zipSize'])throw CliErrors['validation'](_0xf47442(0x89));const _0xacd1eb=bufferSha256(_0x56a1e5);if(_0xacd1eb!==_0x5bd36f['zipSha256'])throw CliErrors[_0xf47442(0xa9)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x5bd36f,_0x56a1e5);}function a145_0x4d63(){const _0x1ffe8d=['schemaVersion','1750686BkAEeQ','19980AsVexw','27332gLqfMT','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','ossPath','288056zSjVSh','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','\x20in\x20Skill\x20file\x20package.','size','files','path','sha256','push','2347796VNOcqS','requireOssPath','toString','14BswrKI','validation','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','720iUbCdI','155yfYMZH','toLowerCase','treeSha256','set','zipSize','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','bytes','trim','some','map','Runtime\x20Skill\x20package\x20size\x20mismatch.','Missing\x20','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','52148XblolK','zipSha256','60cJwQHu','898056EdWllR','isArray','Runtime\x20Skill\x20package\x20is\x20missing\x20','length','4uqJAMe','base64','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Duplicate\x20Skill\x20package\x20entry:\x20'];a145_0x4d63=function(){return _0x1ffe8d;};return a145_0x4d63();}function extractAndVerifyPackageFiles(_0x23c304,_0x9a1709){const _0x6fce55=a145_0x4f4c,_0x2c0a72=parseZipPackage(_0x9a1709);if(_0x2c0a72[_0x6fce55(0x92)]!==_0x23c304[_0x6fce55(0xa1)][_0x6fce55(0x92)])throw CliErrors['validation'](_0x6fce55(0x8b));const _0x22b0e1=new Map();for(const _0x5d5a2a of _0x2c0a72){if(_0x22b0e1['has'](_0x5d5a2a['path']))throw CliErrors[_0x6fce55(0xa9)](_0x6fce55(0x96)+_0x5d5a2a[_0x6fce55(0xa2)]);_0x22b0e1[_0x6fce55(0xb0)](_0x5d5a2a['path'],_0x5d5a2a);}const _0x364af5=[];for(const _0x30690e of _0x23c304[_0x6fce55(0xa1)]){const _0x135af1=_0x22b0e1['get'](_0x30690e[_0x6fce55(0xa2)]);if(!_0x135af1)throw CliErrors[_0x6fce55(0xa9)](_0x6fce55(0x95)+_0x30690e[_0x6fce55(0xa2)]);if(_0x135af1[_0x6fce55(0xb3)][_0x6fce55(0x92)]!==_0x30690e[_0x6fce55(0xa0)])throw CliErrors[_0x6fce55(0xa9)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x30690e[_0x6fce55(0xa2)]);const _0x38e82d=bufferSha256(_0x135af1[_0x6fce55(0xb3)]);if(_0x38e82d!==_0x30690e[_0x6fce55(0xa3)])throw CliErrors[_0x6fce55(0xa9)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x30690e[_0x6fce55(0xa2)]);_0x364af5[_0x6fce55(0xa4)]({'path':_0x30690e[_0x6fce55(0xa2)],'bytes':_0x135af1['bytes']});}return normalizeLocalFiles(_0x364af5);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27a846,_0x58e658){var _0x3cd948=a146_0x60a3,_0x5a7c52=_0x27a846();while(!![]){try{var _0x4f6cd6=-parseInt(_0x3cd948(0x185))/0x1*(-parseInt(_0x3cd948(0x17f))/0x2)+parseInt(_0x3cd948(0x182))/0x3*(parseInt(_0x3cd948(0x187))/0x4)+-parseInt(_0x3cd948(0x180))/0x5+parseInt(_0x3cd948(0x181))/0x6+parseInt(_0x3cd948(0x183))/0x7+-parseInt(_0x3cd948(0x184))/0x8+-parseInt(_0x3cd948(0x186))/0x9*(parseInt(_0x3cd948(0x188))/0xa);if(_0x4f6cd6===_0x58e658)break;else _0x5a7c52['push'](_0x5a7c52['shift']());}catch(_0x28245d){_0x5a7c52['push'](_0x5a7c52['shift']());}}}(a146_0x2257,0x7b49e));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';function a146_0x60a3(_0x374b6c,_0x2b20be){_0x374b6c=_0x374b6c-0x17f;var _0x2257ac=a146_0x2257();var _0x60a3ca=_0x2257ac[_0x374b6c];return _0x60a3ca;}function a146_0x2257(){var _0xaf07d5=['3647805btEMkP','4029216SFJiBK','32277VBmZVF','2628136knnZes','1578000BpHEwP','301JlMZQQ','9aqqvQv','340ndNtbs','7629730DOWBav','1550gjPpba'];a146_0x2257=function(){return _0xaf07d5;};return a146_0x2257();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a147_0x232f(_0x5ab101,_0x57ab3c){_0x5ab101=_0x5ab101-0x155;const _0x10d58e=a147_0x10d5();let _0x232f0d=_0x10d58e[_0x5ab101];return _0x232f0d;}const a147_0x1bf44e=a147_0x232f;(function(_0x507b92,_0x4dac64){const _0x4d6e9d=a147_0x232f,_0x11054d=_0x507b92();while(!![]){try{const _0x390bef=parseInt(_0x4d6e9d(0x168))/0x1*(-parseInt(_0x4d6e9d(0x16b))/0x2)+-parseInt(_0x4d6e9d(0x157))/0x3*(parseInt(_0x4d6e9d(0x16c))/0x4)+parseInt(_0x4d6e9d(0x175))/0x5*(-parseInt(_0x4d6e9d(0x171))/0x6)+parseInt(_0x4d6e9d(0x169))/0x7+parseInt(_0x4d6e9d(0x15e))/0x8*(parseInt(_0x4d6e9d(0x174))/0x9)+parseInt(_0x4d6e9d(0x15c))/0xa*(-parseInt(_0x4d6e9d(0x16e))/0xb)+parseInt(_0x4d6e9d(0x16f))/0xc;if(_0x390bef===_0x4dac64)break;else _0x11054d['push'](_0x11054d['shift']());}catch(_0x5aa7ba){_0x11054d['push'](_0x11054d['shift']());}}}(a147_0x10d5,0x50a34));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join('.agents',a147_0x1bf44e(0x156));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a147_0x1bf44e(0x170),a147_0x1bf44e(0x161)),join('.claude','skills')];const SUPPORTED_LOCK_VERSIONS=[0x3];function a147_0x10d5(){const _0x358006=['221617QDlPnd','19449420nWnOdv','.agents','105096AtDGYi','present','recorded','9MLyBjX','185nMGfGd','kind','unverifiable','.skill-lock.json','72762GLMILz','join','lockFile','unusable','find','110bMSuNB','reason','2192952JxSVQE','\x20is\x20unreadable:\x20','parse','skills','map','home','absent','not-recorded','object','\x20records\x20\x22','2lEFlFI','2760107BhPKME','\x20uses\x20unsupported\x20version\x20','434346RuTjCP','108pnBcgE','version'];a147_0x10d5=function(){return _0x358006;};return a147_0x10d5();}function readLockLookup(_0x4bcf3d,_0x4d374d){const _0x4ecb96=a147_0x1bf44e;if(!existsSync(_0x4bcf3d))return{'kind':_0x4ecb96(0x165)};let _0x158375;try{_0x158375=JSON[_0x4ecb96(0x160)](readFileSync(_0x4bcf3d,'utf8'));}catch(_0x2b99bd){return{'kind':_0x4ecb96(0x15a),'reason':_0x4bcf3d+_0x4ecb96(0x15f)+_0x2b99bd['message']};}const _0x203b01=_0x158375;if(typeof _0x203b01?.['version']!=='number'||!SUPPORTED_LOCK_VERSIONS['includes'](_0x203b01[_0x4ecb96(0x16d)]))return{'kind':_0x4ecb96(0x15a),'reason':_0x4bcf3d+_0x4ecb96(0x16a)+String(_0x203b01?.[_0x4ecb96(0x16d)])};if(!_0x203b01['skills']||typeof _0x203b01[_0x4ecb96(0x161)]!==_0x4ecb96(0x166))return{'kind':'unusable','reason':_0x4bcf3d+'\x20has\x20no\x20skills\x20map'};return _0x203b01[_0x4ecb96(0x161)][_0x4d374d]?{'kind':_0x4ecb96(0x173)}:{'kind':_0x4ecb96(0x165)};}export function resolveInstalledSkill(_0x136961,_0x2d6e62){const _0x55c923=a147_0x1bf44e,_0x3aa119=_0x2d6e62?.[_0x55c923(0x163)]??homedir(),_0x5b84ba=_0x2d6e62?.['globalSkillsDirs']??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x55c923(0x162)](_0x3b6e78=>join(_0x3aa119,_0x3b6e78)),_0x2a631e=_0x2d6e62?.[_0x55c923(0x159)]??join(_0x3aa119,SKILL_LOCK_RELATIVE_PATH),_0x51ffbd=_0x5b84ba[_0x55c923(0x162)](_0xb02bba=>join(_0xb02bba,_0x136961,'SKILL.md')),_0x4adfc5=_0x51ffbd[_0x55c923(0x15b)](_0x23d823=>existsSync(_0x23d823));if(_0x4adfc5)return{'state':_0x55c923(0x172),'path':_0x4adfc5};const _0x427b51=readLockLookup(_0x2a631e,_0x136961);if(_0x427b51[_0x55c923(0x176)]===_0x55c923(0x15a))return{'state':'unverifiable','reason':_0x427b51[_0x55c923(0x15d)]};if(_0x427b51[_0x55c923(0x176)]===_0x55c923(0x173))return{'state':_0x55c923(0x155),'reason':_0x2a631e+_0x55c923(0x167)+_0x136961+'\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20'+('('+_0x51ffbd[_0x55c923(0x158)](',\x20')+')')};return{'state':_0x55c923(0x164),'checked':_0x51ffbd};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a148_0x113e(_0x3a677f,_0x393a28){_0x3a677f=_0x3a677f-0x16a;const _0x48e06d=a148_0x48e0();let _0x113e73=_0x48e06d[_0x3a677f];return _0x113e73;}(function(_0x31df11,_0x290721){const _0x59273b=a148_0x113e,_0x30ee10=_0x31df11();while(!![]){try{const _0x31a27e=parseInt(_0x59273b(0x16b))/0x1+parseInt(_0x59273b(0x171))/0x2+parseInt(_0x59273b(0x16c))/0x3+-parseInt(_0x59273b(0x16e))/0x4+parseInt(_0x59273b(0x170))/0x5+parseInt(_0x59273b(0x16a))/0x6+parseInt(_0x59273b(0x16d))/0x7*(-parseInt(_0x59273b(0x16f))/0x8);if(_0x31a27e===_0x290721)break;else _0x30ee10['push'](_0x30ee10['shift']());}catch(_0x54da3f){_0x30ee10['push'](_0x30ee10['shift']());}}}(a148_0x48e0,0x4eeeb));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a148_0x48e0(){const _0x5b30bd=['396952JasSRQ','3198425OfNCix','448422pWqRtt','1413234sKWhIh','56837gctHwI','1249704AUmtvo','168zRMiAd','234708FuYYcG'];a148_0x48e0=function(){return _0x5b30bd;};return a148_0x48e0();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|