@lovrabet/lovrabet-cli 2.2.3-beta.2 → 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_0x264d30=a115_0x1be9;(function(_0xa79de6,_0x453703){const _0x163169=a115_0x1be9,_0x5d4757=_0xa79de6();while(!![]){try{const _0x2cd483=-parseInt(_0x163169(0x11b))/0x1+parseInt(_0x163169(0xfb))/0x2+parseInt(_0x163169(0xef))/0x3*(-parseInt(_0x163169(0x10a))/0x4)+parseInt(_0x163169(0xf5))/0x5*(-parseInt(_0x163169(0xee))/0x6)+-parseInt(_0x163169(0x116))/0x7*(parseInt(_0x163169(0x105))/0x8)+parseInt(_0x163169(0x10f))/0x9+parseInt(_0x163169(0xf7))/0xa;if(_0x2cd483===_0x453703)break;else _0x5d4757['push'](_0x5d4757['shift']());}catch(_0xe38f44){_0x5d4757['push'](_0x5d4757['shift']());}}}(a115_0x44ff,0xee604));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';function a115_0x1be9(_0x47fddf,_0x126eb8){_0x47fddf=_0x47fddf-0xee;const _0x44ff52=a115_0x44ff();let _0x1be9d6=_0x44ff52[_0x47fddf];return _0x1be9d6;}import a115_0x71f367 from'fs-extra';import{CliErrors}from'../../errors.js';function a115_0x44ff(){const _0x28349d=['scopes','project','9216605urbVhY','metadataPath','50905310OSjmjk','push','runtime-observe','skipped','1141726YRtfdV','metadata-mismatch','accessKey','set','skill','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','removed','validation','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','slice','192mrPeTi','isSymbolicLink','activeSkillCodes','has','map','52vSiknp','agentsSkillsDir','name','contentHash','filter','8564571EqUOUO','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','skillCode','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','values','managedRoot','company','104216mLJpCA','scope','personal','updated','isDirectory','1879788qAEUcr','builtin','not-managed-symlink','trim','dir','created','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','pruneSkillCodes','skillRoots','linked-from-protected-root','env','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','6omGICx','359124fhpzbB','unchanged','appCode','lovrabet'];a115_0x44ff=function(){return _0x28349d;};return a115_0x44ff();}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_0x71f367,RESERVED_PROJECT_SKILL_CODES=new Set([a115_0x264d30(0xf2),a115_0x264d30(0xf9),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x11bd40,_0x3ae68a){const _0x471214=a115_0x264d30,_0x344bf3=new Map();for(const _0x141e98 of _0x11bd40){const _0x1d62bb=_0x141e98[_0x471214(0xff)][_0x471214(0x111)];if(!_0x1d62bb)continue;const _0x5c9a9b=_0x344bf3['get'](_0x1d62bb);(!_0x5c9a9b||_0x141e98[_0x471214(0x117)]===_0x471214(0x118))&&_0x344bf3[_0x471214(0xfe)](_0x1d62bb,_0x141e98);}const _0x5f59b5=[];for(const _0x2360b7 of _0x344bf3[_0x471214(0x113)]()){const _0x4c4efb=requireSkillCode(_0x2360b7['skill']),_0xf634ce=readMetadataIfPresent(_0x2360b7['metadataPath']);if(_0xf634ce?.['appCode']!==_0x3ae68a[_0x471214(0xf1)]||_0xf634ce[_0x471214(0x111)]!==_0x4c4efb)throw CliErrors['validation'](_0x471214(0x103)+_0x3ae68a[_0x471214(0xf1)]+':\x20'+_0x2360b7[_0x471214(0xf6)]);const _0x499cbf=runtimeSkillLinkName(_0x3ae68a,_0x4c4efb);for(const _0x1e9399 of _0x3ae68a[_0x471214(0x123)]){_0x5f59b5['push'](ensureManagedSymlink(resolve(_0x1e9399,_0x499cbf),_0x2360b7['dir'],_0x3ae68a,_0x4c4efb));}}return _0x5f59b5;}export function pruneStaleRuntimeSkillLinks(_0x2dd6cb,_0x477793,_0xa066d4){const _0x1a110f=a115_0x264d30,_0x65ec4=new Set([..._0x477793][_0x1a110f(0x109)](_0x2087da=>_0x2087da[_0x1a110f(0x11e)]())[_0x1a110f(0x10e)](Boolean)),_0x7f66d=_0xa066d4?new Set([..._0xa066d4][_0x1a110f(0x109)](_0xce3e4f=>_0xce3e4f[_0x1a110f(0x11e)]())[_0x1a110f(0x10e)](Boolean)):undefined,_0xa57d53=[];for(const _0x3b0171 of _0x2dd6cb[_0x1a110f(0x123)]){for(const _0x13a418 of managedTargetSkillLinkPaths(_0x3b0171,_0x2dd6cb)){const _0x2a512a=runtimeSkillCodeFromLink(_0x2dd6cb,_0x13a418);if(_0x7f66d&&!_0x7f66d[_0x1a110f(0x108)](_0x2a512a))continue;if(_0x65ec4[_0x1a110f(0x108)](_0x2a512a))continue;_0xa57d53[_0x1a110f(0xf8)](removeManagedSkillLink(_0x13a418,_0x2dd6cb,_0x2a512a));}}return _0xa57d53;}export function pruneStaleRuntimeSkillCache(_0x5a2461,_0x28a1d6={}){const _0x49a497=a115_0x264d30,_0x50745d=new Set([..._0x5a2461[_0x49a497(0x107)]]['map'](_0x132e98=>_0x132e98[_0x49a497(0x11e)]())['filter'](Boolean)),_0x210e3b=_0x5a2461[_0x49a497(0x122)]?new Set([..._0x5a2461['pruneSkillCodes']][_0x49a497(0x109)](_0x53ac3f=>_0x53ac3f[_0x49a497(0x11e)]())[_0x49a497(0x10e)](Boolean)):undefined,_0x1b1f89=_0x5a2461[_0x49a497(0xf3)]??[_0x49a497(0x118),_0x49a497(0x115)],_0x59606c=resolve(getRuntimeSkillCacheRoot(_0x5a2461[_0x49a497(0x125)],_0x5a2461[_0x49a497(0xfd)],_0x28a1d6),safePathSegment(_0x5a2461['appCode'],_0x49a497(0xf1))),_0x4650a6=[];for(const _0x3790c8 of _0x1b1f89){const _0x9d64bf=resolve(_0x59606c,_0x3790c8);if(!existsSync(_0x9d64bf))continue;for(const _0x1e1074 of readdirSync(_0x9d64bf,{'withFileTypes':!![]})){if(!_0x1e1074[_0x49a497(0x11a)]())continue;const _0x5cafe2=_0x1e1074['name'];if(_0x210e3b&&!_0x210e3b[_0x49a497(0x108)](_0x5cafe2))continue;if(_0x50745d[_0x49a497(0x108)](_0x5cafe2))continue;const _0x49bf86=resolve(_0x9d64bf,_0x5cafe2),_0x5a9e94=readMetadataIfPresent(resolve(_0x49bf86,METADATA_FILE));if(_0x5a9e94?.[_0x49a497(0xf1)]!==_0x5a2461[_0x49a497(0xf1)]||_0x5a9e94[_0x49a497(0x117)]!==_0x3790c8||_0x5a9e94[_0x49a497(0x111)]!==_0x5cafe2){_0x4650a6[_0x49a497(0xf8)]({'path':_0x49bf86,'action':_0x49a497(0xfa),'reason':_0x49a497(0xfc)});continue;}if(isLinkedFromAnyRoot(_0x49bf86,_0x5a2461['protectedLinkRoots']??[])){_0x4650a6[_0x49a497(0xf8)]({'path':_0x49bf86,'action':_0x49a497(0xfa),'reason':_0x49a497(0x124)});continue;}removeSync(_0x49bf86),_0x4650a6[_0x49a497(0xf8)]({'path':_0x49bf86,'action':_0x49a497(0x101)});}}return _0x4650a6;}export function linkGlobalRuntimeSkills(_0x2b15c1,_0x2473dc={}){const _0x3249e9=a115_0x264d30,_0x42fb0a=resolveSkillSyncPaths(_0x2473dc),_0x13c6c5=[];for(const _0x16d84f of _0x2b15c1){if(_0x16d84f[_0x3249e9(0x117)]!==_0x3249e9(0x11c))throw CliErrors[_0x3249e9(0x102)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x16d84f[_0x3249e9(0x117)]);const _0x4951bc=requireSkillCode(_0x16d84f[_0x3249e9(0xff)]),_0x5d81bf=copyManagedSkillDirectory(_0x16d84f[_0x3249e9(0x11f)],resolve(_0x42fb0a[_0x3249e9(0x10b)],_0x4951bc));_0x13c6c5[_0x3249e9(0xf8)]({..._0x5d81bf,'contentHash':_0x16d84f[_0x3249e9(0x10d)]});}return _0x13c6c5;}function ensureManagedSymlink(_0x187cc8,_0x43d4aa,_0x573e56,_0x332cce){const _0x171c12=a115_0x264d30;mkdirSync(dirname(_0x187cc8),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x187cc8)||isDanglingSymlink(_0x187cc8)){const _0x2d45bf=lstatSync(_0x187cc8);if(!_0x2d45bf['isSymbolicLink']())throw CliErrors[_0x171c12(0x102)](_0x171c12(0x121)+_0x187cc8);const _0x504da1=resolveSymlinkTarget(_0x187cc8);if(!isPathInside(realOrResolved(_0x504da1),realOrResolved(_0x573e56[_0x171c12(0x114)])))throw CliErrors[_0x171c12(0x102)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x187cc8);if(realOrResolved(_0x504da1)===realOrResolved(_0x43d4aa))return{'path':_0x187cc8,'target':_0x43d4aa,'action':_0x171c12(0xf0)};const _0x453d5b=readMetadataIfPresent(resolve(_0x504da1,METADATA_FILE));if(_0x573e56['scope']===_0x171c12(0xf4)&&(_0x453d5b?.['appCode']!==_0x573e56[_0x171c12(0xf1)]||_0x453d5b[_0x171c12(0x111)]!==_0x332cce))throw CliErrors[_0x171c12(0x102)]('Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20'+_0x187cc8);return unlinkSync(_0x187cc8),symlinkSync(_0x43d4aa,_0x187cc8,'dir'),{'path':_0x187cc8,'target':_0x43d4aa,'action':'updated'};}return symlinkSync(_0x43d4aa,_0x187cc8,_0x171c12(0x11f)),{'path':_0x187cc8,'target':_0x43d4aa,'action':'created'};}function managedTargetSkillLinkPaths(_0x569e69,_0x4625ba){const _0x26806d=a115_0x264d30;if(!existsSync(_0x569e69))return[];const _0x352bd2=_0x4625ba[_0x26806d(0xf1)]+'--';return readdirSync(_0x569e69,{'withFileTypes':!![]})[_0x26806d(0x10e)](_0x39b5f3=>_0x4625ba[_0x26806d(0x117)]===_0x26806d(0xf4)||_0x39b5f3[_0x26806d(0x10c)]['startsWith'](_0x352bd2))[_0x26806d(0x109)](_0x3a58bc=>resolve(_0x569e69,_0x3a58bc[_0x26806d(0x10c)]));}function removeManagedSkillLink(_0x2ab38c,_0x442da1,_0x4770ac){const _0x614db=a115_0x264d30,_0x1de461=lstatIfPresent(_0x2ab38c);if(!_0x1de461?.[_0x614db(0x106)]())return{'path':_0x2ab38c,'action':_0x614db(0xfa),'reason':_0x614db(0x11d)};const _0x42190e=resolveSymlinkTarget(_0x2ab38c);if(!isPathInside(realOrResolved(_0x42190e),realOrResolved(_0x442da1[_0x614db(0x114)])))return{'path':_0x2ab38c,'action':_0x614db(0xfa),'reason':'external-symlink'};const _0x43a949=readMetadataIfPresent(resolve(_0x42190e,METADATA_FILE));if(_0x442da1['scope']===_0x614db(0xf4)&&(_0x43a949?.['appCode']!==_0x442da1['appCode']||_0x43a949[_0x614db(0x111)]!==_0x4770ac))return{'path':_0x2ab38c,'action':_0x614db(0xfa),'reason':'metadata-mismatch'};return unlinkSync(_0x2ab38c),{'path':_0x2ab38c,'action':_0x614db(0x101)};}function isLinkedFromAnyRoot(_0x695102,_0x20b9e7){const _0x43ca97=a115_0x264d30,_0x18e778=realOrResolved(_0x695102);for(const _0x523014 of _0x20b9e7){if(!existsSync(_0x523014))continue;for(const _0xcb3ff4 of readdirSync(_0x523014,{'withFileTypes':!![]})){if(!_0xcb3ff4[_0x43ca97(0x106)]())continue;const _0x34b60e=resolve(_0x523014,_0xcb3ff4['name']);if(realOrResolved(resolveSymlinkTarget(_0x34b60e))===_0x18e778)return!![];}}return![];}function runtimeSkillLinkName(_0x358a3f,_0xdcd9ad){const _0x3e2525=a115_0x264d30,_0x5d22a5=safePathSegment(_0xdcd9ad,_0x3e2525(0x111));if(_0x358a3f[_0x3e2525(0x117)]==='project'&&RESERVED_PROJECT_SKILL_CODES['has'](_0x5d22a5))throw CliErrors[_0x3e2525(0x102)](_0x3e2525(0x100)+_0x5d22a5);return _0x358a3f['scope']===_0x3e2525(0xf4)?_0x5d22a5:_0x358a3f[_0x3e2525(0xf1)]+'--'+_0x5d22a5;}function runtimeSkillCodeFromLink(_0x177382,_0x10b1fd){const _0x27bad0=a115_0x264d30,_0x5b89dd=basename(_0x10b1fd);return _0x177382[_0x27bad0(0x117)]===_0x27bad0(0xf4)?_0x5b89dd:_0x5b89dd[_0x27bad0(0x104)]((_0x177382['appCode']+'--')['length']);}export function copyManagedSkillDirectory(_0x2c6cfb,_0xf28d5d){const _0x620ebd=a115_0x264d30,_0x3615ef=resolve(_0xf28d5d,METADATA_FILE),_0x287a2f=existsSync(_0xf28d5d);if(_0x287a2f){const _0x28b57a=lstatSync(_0xf28d5d);if(_0x28b57a[_0x620ebd(0x106)]())throw CliErrors['validation'](_0x620ebd(0x112)+_0xf28d5d);if(!_0x28b57a['isDirectory']())throw CliErrors[_0x620ebd(0x102)](_0x620ebd(0x110)+_0xf28d5d);const _0x54947f=readMetadataIfPresent(_0x3615ef);if(_0x54947f?.[_0x620ebd(0x117)]!=='builtin')throw CliErrors[_0x620ebd(0x102)](_0x620ebd(0x126)+_0xf28d5d);}ensureDirSync(dirname(_0xf28d5d));const _0x1a2cbe=_0x287a2f?readMetadataIfPresent(_0x3615ef)?.[_0x620ebd(0x10d)]:undefined,_0x5dedaf=readMetadataIfPresent(resolve(_0x2c6cfb,METADATA_FILE))?.[_0x620ebd(0x10d)];return _0x287a2f&&removeSync(_0xf28d5d),copySkillDirectory(_0x2c6cfb,_0xf28d5d),{'path':_0xf28d5d,'target':_0x2c6cfb,'action':!_0x287a2f?_0x620ebd(0x120):_0x1a2cbe===_0x5dedaf?_0x620ebd(0xf0):_0x620ebd(0x119)};}function copySkillDirectory(_0x9913fd,_0x5bc083){copySync(_0x9913fd,_0x5bc083,{'dereference':![],'overwrite':!![],'filter'(_0x50c347){const _0x2c32dc=a115_0x1be9;if(lstatSync(_0x50c347)['isSymbolicLink']())throw CliErrors[_0x2c32dc(0x102)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x50c347);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
|
-
|
|
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 a121_0xed93(){const _0x403098=['74CyJaiN','\x20has\x20scope=\x22','12517DtOXNx','boolean','1500336YcaBHb','6XzXMqs','company','skillCode','trim','refreshedAt','isDirectory','files','validation','4225711btwmyn','string','version','path','(unknown)','ignoreMetadataScope','30rNixsm','sourceSessionId','excludedFilePaths','2470641GvLopY','slice','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataAppCodeMismatch','pushedAt','scope','ignoreInvalidMetadata','filter','tags','320cYrahE','301212QcZVfq','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Skill\x20directory\x20not\x20found:\x20','packageBase64','Skill\x20metadata\x20appCode\x20\x22','dir','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','number',',\x20or\x20directory\x20name.','isSymbolicLink','builtin','ignoreMetadataForPayload','description','utf8','skillName','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','targetScope','Invalid\x20','ignoreMetadataSkillCode','unknown','85812xFmMGQ','appCode','personal','startsWith','1782kaqOLC','\x20has\x20unsupported\x20scope\x20\x22','some','match','\x20name\x20for\x20SkillHub\x20slug\x20generation.','find','isFile','content','87993FVAuwp','displayName','Missing\x20','replace','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'];a121_0xed93=function(){return _0x403098;};return a121_0xed93();}(function(_0x2026ff,_0x2e7730){const _0x5c45ea=a121_0x156a,_0x3c30b9=_0x2026ff();while(!![]){try{const _0x4da3c9=parseInt(_0x5c45ea(0x1f0))/0x1*(-parseInt(_0x5c45ea(0x1ee))/0x2)+parseInt(_0x5c45ea(0x204))/0x3+parseInt(_0x5c45ea(0x20e))/0x4*(-parseInt(_0x5c45ea(0x201))/0x5)+-parseInt(_0x5c45ea(0x1f3))/0x6*(parseInt(_0x5c45ea(0x1fb))/0x7)+-parseInt(_0x5c45ea(0x1f2))/0x8+parseInt(_0x5c45ea(0x22f))/0x9*(parseInt(_0x5c45ea(0x20d))/0xa)+parseInt(_0x5c45ea(0x227))/0xb*(parseInt(_0x5c45ea(0x223))/0xc);if(_0x4da3c9===_0x2e7730)break;else _0x3c30b9['push'](_0x3c30b9['shift']());}catch(_0x3ee0c6){_0x3c30b9['push'](_0x3c30b9['shift']());}}}(a121_0xed93,0x8fba7));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';function a121_0x156a(_0x556e89,_0x5ad688){_0x556e89=_0x556e89-0x1eb;const _0xed93a8=a121_0xed93();let _0x156ad3=_0xed93a8[_0x556e89];return _0x156ad3;}import{parse as a121_0x3787fb}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(_0x2cb5ef,_0x18e017,_0x311a97={}){const _0x460369=a121_0x156a,_0x457311=resolvePushDirectoryRoot(_0x2cb5ef),_0x35fe6d=readPushMetadataIfPresent(resolve(_0x457311,METADATA_FILE),{'ignoreInvalidMetadata':_0x311a97[_0x460369(0x20a)]});if(_0x35fe6d?.[_0x460369(0x224)]&&_0x35fe6d[_0x460369(0x224)]!==_0x18e017&&!_0x311a97['allowAppCodeRetarget']&&!_0x311a97[_0x460369(0x207)])throw CliErrors[_0x460369(0x1fa)](_0x460369(0x213)+_0x35fe6d[_0x460369(0x224)]+_0x460369(0x1ed)+_0x18e017+'\x22.');const _0x4affb4=resolvePushSkillCode(_0x457311,_0x18e017,_0x35fe6d,_0x311a97);if(!_0x4affb4)throw CliErrors[_0x460369(0x1fa)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x460369(0x217));return{'dir':_0x457311,'skillCode':_0x4affb4,'metadata':_0x35fe6d};}export function readPushDirectory(_0x3de778,_0x40df0a,_0x3774a4={}){const _0x1f8a5e=a121_0x156a,_0x16c46c=resolvePushDirectoryIdentity(_0x3de778,_0x40df0a,_0x3774a4),_0x53d773=_0x16c46c[_0x1f8a5e(0x214)],_0x12e14a=resolve(_0x53d773,SKILL_FILE);if(!existsSync(_0x12e14a)||!lstatSync(_0x12e14a)[_0x1f8a5e(0x22d)]())throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x1eb)+SKILL_FILE+':\x20'+_0x12e14a);const _0x58c9a9=_0x16c46c[_0x1f8a5e(0x20f)],_0x5b7d03=_0x3774a4[_0x1f8a5e(0x21f)]??'personal';if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x58c9a9?.[_0x1f8a5e(0x209)]===_0x1f8a5e(0x219))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x21e)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.');if(!_0x3774a4[_0x1f8a5e(0x200)]&&_0x5b7d03==='personal'&&_0x58c9a9?.['scope']&&_0x58c9a9[_0x1f8a5e(0x209)]!==_0x1f8a5e(0x225))throw CliErrors[_0x1f8a5e(0x1fa)](_0x1f8a5e(0x206)+METADATA_FILE+_0x1f8a5e(0x1ef)+_0x58c9a9[_0x1f8a5e(0x209)]+'\x22.',_0x1f8a5e(0x210)+_0x53d773+_0x1f8a5e(0x215));const _0x2188de=scanSkillDirectory(_0x53d773,{'excludedFilePaths':_0x3774a4[_0x1f8a5e(0x203)]}),_0x380782=buildSkillPackage(_0x2188de),_0x4a9f23=readFileSync(_0x12e14a,_0x1f8a5e(0x21c)),_0x4837ae=_0x16c46c[_0x1f8a5e(0x1f5)],_0xfbce48=_0x3774a4[_0x1f8a5e(0x21a)]?undefined:_0x58c9a9,_0xf4be22=readSkillDisplayName(_0x4a9f23);return{'skillCode':_0x4837ae,'metadata':_0x58c9a9,'frontmatterDisplayName':_0xf4be22,'input':{'skillCode':_0x4837ae,'skillName':_0xf4be22??_0xfbce48?.[_0x1f8a5e(0x21d)],'description':_0xfbce48?.['description'],'content':_0x4a9f23,'files':_0x380782['manifest'],'packageBase64':_0x380782[_0x1f8a5e(0x212)],'tags':_0xfbce48?.['tags'],'version':_0xfbce48?.[_0x1f8a5e(0x1fd)],'sourceSessionId':_0xfbce48?.[_0x1f8a5e(0x202)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x31ea02,_0x437211,_0x5bc826,_0x3c6bc0={}){const _0x5ddab6=a121_0x156a,_0x27687e=resolvePushDirectoryRoot(_0x31ea02),_0x3d9813=readPushMetadataIfPresent(resolve(_0x27687e,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x118fc7=requireRemoteScope(_0x437211),_0x57d8d0=readLocalSkillContent(_0x27687e),_0x5e52b2={..._0x437211,'appCode':_0x437211[_0x5ddab6(0x224)]??_0x5bc826,'skillName':_0x437211['skillName']??_0x3d9813?.[_0x5ddab6(0x21d)],'description':_0x437211[_0x5ddab6(0x21b)]??_0x3d9813?.[_0x5ddab6(0x21b)],'tags':Array['isArray'](_0x437211['tags'])?_0x437211[_0x5ddab6(0x20c)]:_0x3d9813?.[_0x5ddab6(0x20c)],'sourceSessionId':_0x437211['sourceSessionId']??_0x3d9813?.[_0x5ddab6(0x202)],'content':_0x437211[_0x5ddab6(0x22e)]??_0x57d8d0},_0x5aaaa2=buildMetadata(_0x5e52b2,_0x118fc7,_0x5bc826,contentHash(_0x57d8d0),_0x3c6bc0[_0x5ddab6(0x1f7)]);writeJsonAtomic(resolve(_0x27687e,METADATA_FILE),_0x5aaaa2);}export function recordPushedRuntimeSkill(_0x1327ac,_0x1b31c7,_0x5208ac,_0x31bb4e={}){const _0x1b32c2=a121_0x156a,_0x204314=resolvePushDirectoryRoot(_0x1327ac),_0x488181=scanSkillDirectory(_0x204314),_0x5eb356=_0x488181[_0x1b32c2(0x22c)](_0x5eaeaa=>_0x5eaeaa[_0x1b32c2(0x1fe)]===SKILL_FILE),_0x4f06cb=_0x5eb356?fileText(_0x5eb356):'',_0x22ad32=tryNormalizePackageManifest(_0x1b31c7[_0x1b32c2(0x1f9)]),_0x3ee57b={..._0x1b31c7,'content':_0x1b31c7[_0x1b32c2(0x22e)]??_0x4f06cb,'files':_0x22ad32},_0x1af49c=_0x22ad32?normalizeLocalFiles(_0x488181)[_0x1b32c2(0x20b)](_0x6d98c5=>_0x22ad32[_0x1b32c2(0x1f9)][_0x1b32c2(0x229)](_0x2bed88=>_0x2bed88['path']===_0x6d98c5['path'])):undefined,_0x157656=buildMetadata(_0x3ee57b,_0x31bb4e[_0x1b32c2(0x209)]??_0x1b32c2(0x225),_0x5208ac,contentHash(_0x3ee57b[_0x1b32c2(0x22e)]??''),_0x31bb4e[_0x1b32c2(0x208)],_0x1af49c);writeJsonAtomic(resolve(_0x204314,METADATA_FILE),_0x157656);}export function deriveSkillCodeFromDirectory(_0x45446a,_0x5d7d69){const _0x13cf92=a121_0x156a,_0x21f1d8=basename(resolve(_0x45446a)),_0x169a57=_0x5d7d69+'--';return _0x21f1d8[_0x13cf92(0x226)](_0x169a57)?_0x21f1d8[_0x13cf92(0x205)](_0x169a57['length']):_0x21f1d8;}function resolvePushSkillCode(_0x3c5ffa,_0x4a4374,_0x1ffea1,_0x340bfe){const _0x3ae33a=a121_0x156a,_0x4367e1=deriveSkillCodeFromSkillFile(_0x3c5ffa)||deriveSkillCodeFromDirectory(_0x3c5ffa,_0x4a4374);if(_0x340bfe[_0x3ae33a(0x221)])return _0x4367e1;return _0x1ffea1?.[_0x3ae33a(0x1f5)]?.[_0x3ae33a(0x1f6)]()||_0x4367e1;}function deriveSkillCodeFromSkillFile(_0x44a707){const _0x3f6db8=a121_0x156a,_0x4c269d=resolve(_0x44a707,SKILL_FILE);if(!existsSync(_0x4c269d)||!lstatSync(_0x4c269d)[_0x3f6db8(0x22d)]())return undefined;const _0x132402=readFileSync(_0x4c269d,_0x3f6db8(0x21c)),_0x202bb9=_0x132402['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x202bb9)return undefined;const _0x593e25=parseFrontmatterObject(_0x202bb9[0x1]??''),_0x43977a=scalarToString(_0x593e25?.['name']);return _0x43977a?slugifySkillName(_0x43977a):undefined;}function readSkillDisplayName(_0xe7a35d){const _0x781057=a121_0x156a,_0x52ce46=_0xe7a35d[_0x781057(0x22a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x52ce46)return undefined;const _0x2342ed=parseFrontmatterObject(_0x52ce46[0x1]??'');return scalarToString(_0x2342ed?.[_0x781057(0x230)]);}function slugifySkillName(_0x44e5ab){const _0x54f732=a121_0x156a,_0x28f727=_0x44e5ab['trim']()['toLowerCase']()[_0x54f732(0x1ec)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x54f732(0x1ec)](/^-+/,'')[_0x54f732(0x1ec)](/-+$/,'')[_0x54f732(0x1ec)](/-{2,}/g,'-');if(!_0x28f727)throw CliErrors['validation'](_0x54f732(0x220)+SKILL_FILE+_0x54f732(0x22b));return _0x28f727;}function parseFrontmatterObject(_0x7d91de){try{const _0x257f56=a121_0x3787fb(_0x7d91de);return _0x257f56&&typeof _0x257f56==='object'&&!Array['isArray'](_0x257f56)?_0x257f56:undefined;}catch{return undefined;}}function scalarToString(_0x1d6dc6){const _0x5efdb5=a121_0x156a;if(typeof _0x1d6dc6===_0x5efdb5(0x1fc))return _0x1d6dc6['trim']();if(typeof _0x1d6dc6===_0x5efdb5(0x216)||typeof _0x1d6dc6===_0x5efdb5(0x1f1))return String(_0x1d6dc6);return undefined;}function resolvePushDirectoryRoot(_0x46a79a){const _0x18790f=a121_0x156a,_0x1b1e9d=resolve(_0x46a79a);if(!existsSync(_0x1b1e9d))throw CliErrors['validation'](_0x18790f(0x211)+_0x46a79a);const _0x5de6c8=lstatSync(_0x1b1e9d);if(_0x5de6c8['isDirectory']())return _0x1b1e9d;if(_0x5de6c8[_0x18790f(0x218)]()){const _0x1fdd28=realpathSync(_0x1b1e9d);if(lstatSync(_0x1fdd28)[_0x18790f(0x1f8)]())return _0x1fdd28;}throw CliErrors[_0x18790f(0x1fa)]('Skill\x20directory\x20not\x20found:\x20'+_0x46a79a);}function requireRemoteScope(_0x435bfd){const _0x4bb9d8=a121_0x156a;if(_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x225)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x1f4)||_0x435bfd[_0x4bb9d8(0x209)]===_0x4bb9d8(0x219))return _0x435bfd[_0x4bb9d8(0x209)];throw CliErrors[_0x4bb9d8(0x1fa)]('Remote\x20Skill\x20'+(_0x435bfd[_0x4bb9d8(0x1f5)]||_0x4bb9d8(0x1ff))+_0x4bb9d8(0x228)+(_0x435bfd[_0x4bb9d8(0x209)]??_0x4bb9d8(0x222))+'\x22.');}function readLocalSkillContent(_0x5cc9b0){const _0x3dc91f=a121_0x156a,_0x4f3959=resolve(_0x5cc9b0,SKILL_FILE);return existsSync(_0x4f3959)&&lstatSync(_0x4f3959)[_0x3dc91f(0x22d)]()?readFileSync(_0x4f3959,_0x3dc91f(0x21c)):'';}function readPushMetadataIfPresent(_0x2ef8a3,_0x113e87={}){const _0x3a02f3=a121_0x156a;try{return readMetadataIfPresent(_0x2ef8a3);}catch(_0x5aaac7){if(_0x113e87[_0x3a02f3(0x20a)])return undefined;throw _0x5aaac7;}}
|
|
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
|
-
|
|
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()});
|