@lovrabet/lovrabet-cli 2.2.5-beta.2 → 2.2.6-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/README.md +3 -3
- 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.d.ts +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.d.ts +2 -2
- 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.d.ts +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.d.ts +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 +6 -6
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.d.ts +3 -3
- 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.d.ts +3 -3
- 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 +2 -2
- package/skills/lovrabet/SKILL.md +19 -18
- package/skills/lovrabet/guides/dataset-and-data-workflow.md +2 -2
- package/skills/lovrabet/guides/sql-and-bff-workflow.md +7 -5
- package/skills/lovrabet/references/dataset-discovery-workflow.md +2 -2
- package/skills/lovrabet/references/lovrabet-app-config.md +1 -1
- package/skills/lovrabet/references/lovrabet-bff-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-file-workflow.md +1 -1
- package/skills/lovrabet/references/lovrabet-personal-bff-workflow.md +35 -7
- package/skills/lovrabet/references/lovrabet-schedule-workflow.md +7 -6
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const a135_0x12ff76=a135_0x4bfa;(function(_0x5917bc,_0x343b92){const _0x5398a9=a135_0x4bfa,_0x444364=_0x5917bc();while(!![]){try{const _0x5bbafc=-parseInt(_0x5398a9(0x1b6))/0x1*(parseInt(_0x5398a9(0x1c4))/0x2)+-parseInt(_0x5398a9(0x1a8))/0x3*(parseInt(_0x5398a9(0x1ce))/0x4)+-parseInt(_0x5398a9(0x1b4))/0x5+-parseInt(_0x5398a9(0x1aa))/0x6*(parseInt(_0x5398a9(0x1af))/0x7)+parseInt(_0x5398a9(0x1cc))/0x8+parseInt(_0x5398a9(0x1ac))/0x9+parseInt(_0x5398a9(0x1bf))/0xa*(parseInt(_0x5398a9(0x1b7))/0xb);if(_0x5bbafc===_0x343b92)break;else _0x444364['push'](_0x444364['shift']());}catch(_0x366413){_0x444364['push'](_0x444364['shift']());}}}(a135_0x26fc,0x8853c));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x29292e from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a135_0x26fc(){const _0x578b23=['3946176sEApHz','lovrabet','736deWlcs','builtin','has','scopes','updated','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','secret-retriever','trim','skillRoots','created','scope','metadataPath','linked-from-protected-root','skill','appCode','pruneSkillCodes','not-managed-symlink','name','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','isSymbolicLink','skipped','map','14502XFdwLW','validation','1038144xxdYEM','accessKey','2968056ctokio','contentHash','metadata-mismatch','14tCqsij','unchanged','protectedLinkRoots','activeSkillCodes','length','4977395NaGDYq','personal','70997Kjuyth','27096322pfmlTF','dir','isDirectory','slice','filter','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','get','10zlVeJa','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','project','startsWith','company','14QLzHWS','agentsSkillsDir','push','skillCode','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'];a135_0x26fc=function(){return _0x578b23;};return a135_0x26fc();}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a135_0x29292e,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x12ff76(0x1cd),'runtime-observe',a135_0x12ff76(0x1d4)]);export function linkEffectiveRuntimeSkills(_0x291562,_0xafa199){const _0x221c8a=a135_0x12ff76,_0x21b72a=new Map();for(const _0x2d047a of _0x291562){const _0x138a26=_0x2d047a[_0x221c8a(0x19f)]['skillCode'];if(!_0x138a26)continue;const _0x423d42=_0x21b72a[_0x221c8a(0x1be)](_0x138a26);(!_0x423d42||_0x2d047a[_0x221c8a(0x1d8)]===_0x221c8a(0x1b5))&&_0x21b72a['set'](_0x138a26,_0x2d047a);}const _0x29dcc4=[];for(const _0x483006 of _0x21b72a['values']()){const _0x1e9f68=requireSkillCode(_0x483006[_0x221c8a(0x19f)]),_0x451fe9=readMetadataIfPresent(_0x483006[_0x221c8a(0x19d)]);if(_0x451fe9?.[_0x221c8a(0x1a0)]!==_0xafa199[_0x221c8a(0x1a0)]||_0x451fe9[_0x221c8a(0x1c7)]!==_0x1e9f68)throw CliErrors[_0x221c8a(0x1a9)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0xafa199[_0x221c8a(0x1a0)]+':\x20'+_0x483006[_0x221c8a(0x19d)]);const _0x58637f=runtimeSkillLinkName(_0xafa199,_0x1e9f68);for(const _0x225b57 of _0xafa199['skillRoots']){_0x29dcc4[_0x221c8a(0x1c6)](ensureManagedSymlink(resolve(_0x225b57,_0x58637f),_0x483006[_0x221c8a(0x1b8)],_0xafa199,_0x1e9f68));}}return _0x29dcc4;}export function pruneStaleRuntimeSkillLinks(_0x385cdf,_0xa6df57,_0x9ba978){const _0x19d96c=a135_0x12ff76,_0x105d46=new Set([..._0xa6df57][_0x19d96c(0x1a7)](_0x41fe86=>_0x41fe86[_0x19d96c(0x1d5)]())[_0x19d96c(0x1bb)](Boolean)),_0x503a77=_0x9ba978?new Set([..._0x9ba978][_0x19d96c(0x1a7)](_0x150890=>_0x150890[_0x19d96c(0x1d5)]())[_0x19d96c(0x1bb)](Boolean)):undefined,_0x12097d=[];for(const _0x2a5b59 of _0x385cdf[_0x19d96c(0x1d6)]){for(const _0x4efe5a of managedTargetSkillLinkPaths(_0x2a5b59,_0x385cdf)){const _0xcf0db8=runtimeSkillCodeFromLink(_0x385cdf,_0x4efe5a);if(_0x503a77&&!_0x503a77['has'](_0xcf0db8))continue;if(_0x105d46['has'](_0xcf0db8))continue;_0x12097d['push'](removeManagedSkillLink(_0x4efe5a,_0x385cdf,_0xcf0db8));}}return _0x12097d;}export function pruneStaleRuntimeSkillCache(_0x4acb81,_0x2dd32c={}){const _0x2701e7=a135_0x12ff76,_0x531235=new Set([..._0x4acb81[_0x2701e7(0x1b2)]][_0x2701e7(0x1a7)](_0x5f484d=>_0x5f484d[_0x2701e7(0x1d5)]())['filter'](Boolean)),_0x202119=_0x4acb81['pruneSkillCodes']?new Set([..._0x4acb81[_0x2701e7(0x1a1)]][_0x2701e7(0x1a7)](_0x50e33e=>_0x50e33e[_0x2701e7(0x1d5)]())['filter'](Boolean)):undefined,_0x53c24b=_0x4acb81[_0x2701e7(0x1d1)]??[_0x2701e7(0x1b5),_0x2701e7(0x1c3)],_0x1e7518=resolve(getRuntimeSkillCacheRoot(_0x4acb81['env'],_0x4acb81[_0x2701e7(0x1ab)],_0x2dd32c),safePathSegment(_0x4acb81[_0x2701e7(0x1a0)],_0x2701e7(0x1a0))),_0x4cdfa9=[];for(const _0x114bf1 of _0x53c24b){const _0x3f887e=resolve(_0x1e7518,_0x114bf1);if(!existsSync(_0x3f887e))continue;for(const _0x5e6aeb of readdirSync(_0x3f887e,{'withFileTypes':!![]})){if(!_0x5e6aeb[_0x2701e7(0x1b9)]())continue;const _0x5f1c1b=_0x5e6aeb[_0x2701e7(0x1a3)];if(_0x202119&&!_0x202119['has'](_0x5f1c1b))continue;if(_0x531235[_0x2701e7(0x1d0)](_0x5f1c1b))continue;const _0x9b253d=resolve(_0x3f887e,_0x5f1c1b),_0x43e586=readMetadataIfPresent(resolve(_0x9b253d,METADATA_FILE));if(_0x43e586?.[_0x2701e7(0x1a0)]!==_0x4acb81['appCode']||_0x43e586[_0x2701e7(0x1d8)]!==_0x114bf1||_0x43e586[_0x2701e7(0x1c7)]!==_0x5f1c1b){_0x4cdfa9[_0x2701e7(0x1c6)]({'path':_0x9b253d,'action':_0x2701e7(0x1a6),'reason':_0x2701e7(0x1ae)});continue;}if(isLinkedFromAnyRoot(_0x9b253d,_0x4acb81[_0x2701e7(0x1b1)]??[])){_0x4cdfa9['push']({'path':_0x9b253d,'action':_0x2701e7(0x1a6),'reason':_0x2701e7(0x19e)});continue;}removeSync(_0x9b253d),_0x4cdfa9['push']({'path':_0x9b253d,'action':_0x2701e7(0x1c9)});}}return _0x4cdfa9;}export function linkGlobalRuntimeSkills(_0x1ee5d8,_0x55783a={}){const _0x562eed=a135_0x12ff76,_0x4f6281=resolveSkillSyncPaths(_0x55783a),_0x1bf3b9=[];for(const _0xb31918 of _0x1ee5d8){if(_0xb31918['scope']!==_0x562eed(0x1cf))throw CliErrors['validation'](_0x562eed(0x1bc)+_0xb31918[_0x562eed(0x1d8)]);const _0x302d67=requireSkillCode(_0xb31918[_0x562eed(0x19f)]),_0x2ad019=copyManagedSkillDirectory(_0xb31918[_0x562eed(0x1b8)],resolve(_0x4f6281[_0x562eed(0x1c5)],_0x302d67));_0x1bf3b9[_0x562eed(0x1c6)]({..._0x2ad019,'contentHash':_0xb31918[_0x562eed(0x1ad)]});}return _0x1bf3b9;}function ensureManagedSymlink(_0x2d4d95,_0x3894c1,_0x26db12,_0x1cb78d){const _0x4f9f77=a135_0x12ff76;mkdirSync(dirname(_0x2d4d95),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x2d4d95)||isDanglingSymlink(_0x2d4d95)){const _0x142067=lstatSync(_0x2d4d95);if(!_0x142067['isSymbolicLink']())throw CliErrors[_0x4f9f77(0x1a9)](_0x4f9f77(0x1bd)+_0x2d4d95);const _0x599c0b=resolveSymlinkTarget(_0x2d4d95);if(!isPathInside(realOrResolved(_0x599c0b),realOrResolved(_0x26db12['managedRoot'])))throw CliErrors[_0x4f9f77(0x1a9)](_0x4f9f77(0x1a4)+_0x2d4d95);if(realOrResolved(_0x599c0b)===realOrResolved(_0x3894c1))return{'path':_0x2d4d95,'target':_0x3894c1,'action':_0x4f9f77(0x1b0)};const _0x163bd8=readMetadataIfPresent(resolve(_0x599c0b,METADATA_FILE));if(_0x26db12[_0x4f9f77(0x1d8)]==='project'&&(_0x163bd8?.['appCode']!==_0x26db12['appCode']||_0x163bd8['skillCode']!==_0x1cb78d))throw CliErrors[_0x4f9f77(0x1a9)](_0x4f9f77(0x1d3)+_0x2d4d95);return unlinkSync(_0x2d4d95),symlinkSync(_0x3894c1,_0x2d4d95,_0x4f9f77(0x1b8)),{'path':_0x2d4d95,'target':_0x3894c1,'action':_0x4f9f77(0x1d2)};}return symlinkSync(_0x3894c1,_0x2d4d95,_0x4f9f77(0x1b8)),{'path':_0x2d4d95,'target':_0x3894c1,'action':_0x4f9f77(0x1d7)};}function managedTargetSkillLinkPaths(_0x2c6657,_0x23bbec){const _0x55f02b=a135_0x12ff76;if(!existsSync(_0x2c6657))return[];const _0x9cbc32=_0x23bbec['appCode']+'--';return readdirSync(_0x2c6657,{'withFileTypes':!![]})[_0x55f02b(0x1bb)](_0x3876e3=>_0x23bbec[_0x55f02b(0x1d8)]==='project'||_0x3876e3[_0x55f02b(0x1a3)][_0x55f02b(0x1c2)](_0x9cbc32))[_0x55f02b(0x1a7)](_0x26a843=>resolve(_0x2c6657,_0x26a843['name']));}function removeManagedSkillLink(_0x33a39c,_0x49c79b,_0x377b04){const _0x32f1d8=a135_0x12ff76,_0x17df6b=lstatIfPresent(_0x33a39c);if(!_0x17df6b?.[_0x32f1d8(0x1a5)]())return{'path':_0x33a39c,'action':_0x32f1d8(0x1a6),'reason':_0x32f1d8(0x1a2)};const _0x17fa7e=resolveSymlinkTarget(_0x33a39c);if(!isPathInside(realOrResolved(_0x17fa7e),realOrResolved(_0x49c79b['managedRoot'])))return{'path':_0x33a39c,'action':_0x32f1d8(0x1a6),'reason':'external-symlink'};const _0x132b00=readMetadataIfPresent(resolve(_0x17fa7e,METADATA_FILE));if(_0x49c79b[_0x32f1d8(0x1d8)]===_0x32f1d8(0x1c1)&&(_0x132b00?.['appCode']!==_0x49c79b[_0x32f1d8(0x1a0)]||_0x132b00[_0x32f1d8(0x1c7)]!==_0x377b04))return{'path':_0x33a39c,'action':_0x32f1d8(0x1a6),'reason':_0x32f1d8(0x1ae)};return unlinkSync(_0x33a39c),{'path':_0x33a39c,'action':_0x32f1d8(0x1c9)};}function isLinkedFromAnyRoot(_0x2a40eb,_0x35a8bd){const _0x26b615=a135_0x12ff76,_0x141fc9=realOrResolved(_0x2a40eb);for(const _0xc61906 of _0x35a8bd){if(!existsSync(_0xc61906))continue;for(const _0x12305c of readdirSync(_0xc61906,{'withFileTypes':!![]})){if(!_0x12305c[_0x26b615(0x1a5)]())continue;const _0x300845=resolve(_0xc61906,_0x12305c[_0x26b615(0x1a3)]);if(realOrResolved(resolveSymlinkTarget(_0x300845))===_0x141fc9)return!![];}}return![];}function runtimeSkillLinkName(_0xc4d49f,_0x43ad6f){const _0x4615f3=a135_0x12ff76,_0x2ed9ec=safePathSegment(_0x43ad6f,_0x4615f3(0x1c7));if(_0xc4d49f['scope']==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x4615f3(0x1d0)](_0x2ed9ec))throw CliErrors[_0x4615f3(0x1a9)](_0x4615f3(0x1cb)+_0x2ed9ec);return _0xc4d49f['scope']==='project'?_0x2ed9ec:_0xc4d49f[_0x4615f3(0x1a0)]+'--'+_0x2ed9ec;}function a135_0x4bfa(_0x4cf6e4,_0x1f5946){_0x4cf6e4=_0x4cf6e4-0x19d;const _0x26fc71=a135_0x26fc();let _0x4bfa47=_0x26fc71[_0x4cf6e4];return _0x4bfa47;}function runtimeSkillCodeFromLink(_0x4b19f7,_0xc5ac7e){const _0x1c9f81=a135_0x12ff76,_0x14a197=basename(_0xc5ac7e);return _0x4b19f7[_0x1c9f81(0x1d8)]===_0x1c9f81(0x1c1)?_0x14a197:_0x14a197[_0x1c9f81(0x1ba)]((_0x4b19f7[_0x1c9f81(0x1a0)]+'--')[_0x1c9f81(0x1b3)]);}export function copyManagedSkillDirectory(_0x510936,_0x56eb51){const _0x159d04=a135_0x12ff76,_0x107ddf=resolve(_0x56eb51,METADATA_FILE),_0x3b4047=existsSync(_0x56eb51);if(_0x3b4047){const _0x1fcad6=lstatSync(_0x56eb51);if(_0x1fcad6[_0x159d04(0x1a5)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x56eb51);if(!_0x1fcad6[_0x159d04(0x1b9)]())throw CliErrors[_0x159d04(0x1a9)](_0x159d04(0x1ca)+_0x56eb51);const _0x503351=readMetadataIfPresent(_0x107ddf);if(_0x503351?.[_0x159d04(0x1d8)]!==_0x159d04(0x1cf))throw CliErrors[_0x159d04(0x1a9)](_0x159d04(0x1c0)+_0x56eb51);}ensureDirSync(dirname(_0x56eb51));const _0x3dfc56=_0x3b4047?readMetadataIfPresent(_0x107ddf)?.[_0x159d04(0x1ad)]:undefined,_0x2d1b0a=readMetadataIfPresent(resolve(_0x510936,METADATA_FILE))?.['contentHash'];return _0x3b4047&&removeSync(_0x56eb51),copySkillDirectory(_0x510936,_0x56eb51),{'path':_0x56eb51,'target':_0x510936,'action':!_0x3b4047?_0x159d04(0x1d7):_0x3dfc56===_0x2d1b0a?'unchanged':_0x159d04(0x1d2)};}function copySkillDirectory(_0x4d62f0,_0x5478bb){copySync(_0x4d62f0,_0x5478bb,{'dereference':![],'overwrite':!![],'filter'(_0x3464b2){const _0x68b795=a135_0x4bfa;if(lstatSync(_0x3464b2)[_0x68b795(0x1a5)]())throw CliErrors[_0x68b795(0x1a9)](_0x68b795(0x1c8)+_0x3464b2);return!![];}});}
|
|
1
|
+
const a135_0x7fe241=a135_0x114d;(function(_0x61ad6f,_0x3a7514){const _0x47e559=a135_0x114d,_0x3b3f94=_0x61ad6f();while(!![]){try{const _0x2d0b7c=parseInt(_0x47e559(0x123))/0x1+parseInt(_0x47e559(0x131))/0x2+parseInt(_0x47e559(0x133))/0x3+-parseInt(_0x47e559(0x10d))/0x4+-parseInt(_0x47e559(0x130))/0x5+-parseInt(_0x47e559(0x10f))/0x6+parseInt(_0x47e559(0x12e))/0x7*(parseInt(_0x47e559(0x143))/0x8);if(_0x2d0b7c===_0x3a7514)break;else _0x3b3f94['push'](_0x3b3f94['shift']());}catch(_0x3dd6c9){_0x3b3f94['push'](_0x3b3f94['shift']());}}}(a135_0x2a73,0x5e136));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a135_0x791dbf from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a135_0x2a73(){const _0x57fb2a=['1109547LoCFlg','scope','personal','unchanged','not-managed-symlink','created','agentsSkillsDir','updated','builtin','activeSkillCodes','isDirectory','accessKey','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','startsWith','dir','map','8IIeErX','secret-retriever','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','1904660SriLFk','removed','3786414jqWlyI','project','metadataPath','appCode','lovrabet','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','name','isSymbolicLink','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','pruneSkillCodes','contentHash','filter','set','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','skipped','runtime-observe','trim','push','length','skillCode','282729xYsZGp','company','values','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','external-symlink','managedRoot','get','slice','metadata-mismatch','has','9361898jzhMUg','validation','3810480pZtaBl','529344RYgFts','skillRoots'];a135_0x2a73=function(){return _0x57fb2a;};return a135_0x2a73();}import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a135_0x114d(_0x29f78b,_0x53f09f){_0x29f78b=_0x29f78b-0x10d;const _0x2a7393=a135_0x2a73();let _0x114d6e=_0x2a7393[_0x29f78b];return _0x114d6e;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a135_0x791dbf,RESERVED_PROJECT_SKILL_CODES=new Set([a135_0x7fe241(0x113),a135_0x7fe241(0x11e),a135_0x7fe241(0x144)]);export function linkEffectiveRuntimeSkills(_0x54589f,_0x100abe){const _0x52aaf5=a135_0x7fe241,_0x485e12=new Map();for(const _0x5bb264 of _0x54589f){const _0x273fbb=_0x5bb264['skill'][_0x52aaf5(0x122)];if(!_0x273fbb)continue;const _0xd00c5=_0x485e12[_0x52aaf5(0x12a)](_0x273fbb);(!_0xd00c5||_0x5bb264['scope']===_0x52aaf5(0x135))&&_0x485e12[_0x52aaf5(0x11b)](_0x273fbb,_0x5bb264);}const _0xc5620=[];for(const _0x5981e7 of _0x485e12[_0x52aaf5(0x125)]()){const _0x19398a=requireSkillCode(_0x5981e7['skill']),_0x51f625=readMetadataIfPresent(_0x5981e7[_0x52aaf5(0x111)]);if(_0x51f625?.[_0x52aaf5(0x112)]!==_0x100abe['appCode']||_0x51f625[_0x52aaf5(0x122)]!==_0x19398a)throw CliErrors[_0x52aaf5(0x12f)]('Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20'+_0x100abe[_0x52aaf5(0x112)]+':\x20'+_0x5981e7[_0x52aaf5(0x111)]);const _0x6af7a9=runtimeSkillLinkName(_0x100abe,_0x19398a);for(const _0x4cdc29 of _0x100abe['skillRoots']){_0xc5620[_0x52aaf5(0x120)](ensureManagedSymlink(resolve(_0x4cdc29,_0x6af7a9),_0x5981e7[_0x52aaf5(0x141)],_0x100abe,_0x19398a));}}return _0xc5620;}export function pruneStaleRuntimeSkillLinks(_0x29d4be,_0x1429ac,_0x995684){const _0x1df7fd=a135_0x7fe241,_0x1b5f46=new Set([..._0x1429ac][_0x1df7fd(0x142)](_0x118ba2=>_0x118ba2['trim']())[_0x1df7fd(0x11a)](Boolean)),_0x548c51=_0x995684?new Set([..._0x995684][_0x1df7fd(0x142)](_0x5df799=>_0x5df799['trim']())[_0x1df7fd(0x11a)](Boolean)):undefined,_0x3fe409=[];for(const _0x40b9bf of _0x29d4be[_0x1df7fd(0x132)]){for(const _0x24adab of managedTargetSkillLinkPaths(_0x40b9bf,_0x29d4be)){const _0xd5ef0a=runtimeSkillCodeFromLink(_0x29d4be,_0x24adab);if(_0x548c51&&!_0x548c51[_0x1df7fd(0x12d)](_0xd5ef0a))continue;if(_0x1b5f46[_0x1df7fd(0x12d)](_0xd5ef0a))continue;_0x3fe409[_0x1df7fd(0x120)](removeManagedSkillLink(_0x24adab,_0x29d4be,_0xd5ef0a));}}return _0x3fe409;}export function pruneStaleRuntimeSkillCache(_0x3b69a4,_0xd04171={}){const _0x205107=a135_0x7fe241,_0x4e1fb9=new Set([..._0x3b69a4[_0x205107(0x13c)]]['map'](_0x12cc45=>_0x12cc45[_0x205107(0x11f)]())[_0x205107(0x11a)](Boolean)),_0x41a600=_0x3b69a4['pruneSkillCodes']?new Set([..._0x3b69a4[_0x205107(0x118)]]['map'](_0x40314c=>_0x40314c['trim']())[_0x205107(0x11a)](Boolean)):undefined,_0x54e469=_0x3b69a4['scopes']??[_0x205107(0x135),_0x205107(0x124)],_0x3a79b1=resolve(getRuntimeSkillCacheRoot(_0x3b69a4['env'],_0x3b69a4[_0x205107(0x13e)],_0xd04171),safePathSegment(_0x3b69a4[_0x205107(0x112)],_0x205107(0x112))),_0x554aa8=[];for(const _0x45fbe1 of _0x54e469){const _0x19e4d8=resolve(_0x3a79b1,_0x45fbe1);if(!existsSync(_0x19e4d8))continue;for(const _0x4d01c5 of readdirSync(_0x19e4d8,{'withFileTypes':!![]})){if(!_0x4d01c5[_0x205107(0x13d)]())continue;const _0x2b3161=_0x4d01c5['name'];if(_0x41a600&&!_0x41a600[_0x205107(0x12d)](_0x2b3161))continue;if(_0x4e1fb9[_0x205107(0x12d)](_0x2b3161))continue;const _0x50ad26=resolve(_0x19e4d8,_0x2b3161),_0x479e42=readMetadataIfPresent(resolve(_0x50ad26,METADATA_FILE));if(_0x479e42?.[_0x205107(0x112)]!==_0x3b69a4[_0x205107(0x112)]||_0x479e42[_0x205107(0x134)]!==_0x45fbe1||_0x479e42[_0x205107(0x122)]!==_0x2b3161){_0x554aa8[_0x205107(0x120)]({'path':_0x50ad26,'action':_0x205107(0x11d),'reason':_0x205107(0x12c)});continue;}if(isLinkedFromAnyRoot(_0x50ad26,_0x3b69a4['protectedLinkRoots']??[])){_0x554aa8[_0x205107(0x120)]({'path':_0x50ad26,'action':_0x205107(0x11d),'reason':'linked-from-protected-root'});continue;}removeSync(_0x50ad26),_0x554aa8[_0x205107(0x120)]({'path':_0x50ad26,'action':_0x205107(0x10e)});}}return _0x554aa8;}export function linkGlobalRuntimeSkills(_0x5b39fb,_0x254857={}){const _0x2c2faa=a135_0x7fe241,_0x38c80c=resolveSkillSyncPaths(_0x254857),_0x5236ff=[];for(const _0x31bab9 of _0x5b39fb){if(_0x31bab9[_0x2c2faa(0x134)]!==_0x2c2faa(0x13b))throw CliErrors[_0x2c2faa(0x12f)](_0x2c2faa(0x13f)+_0x31bab9[_0x2c2faa(0x134)]);const _0x154d9f=requireSkillCode(_0x31bab9['skill']),_0xb8b417=copyManagedSkillDirectory(_0x31bab9[_0x2c2faa(0x141)],resolve(_0x38c80c[_0x2c2faa(0x139)],_0x154d9f));_0x5236ff[_0x2c2faa(0x120)]({..._0xb8b417,'contentHash':_0x31bab9['contentHash']});}return _0x5236ff;}function ensureManagedSymlink(_0x3dbfc4,_0x4c81cb,_0x4c9fbb,_0x339360){const _0x560a17=a135_0x7fe241;mkdirSync(dirname(_0x3dbfc4),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x3dbfc4)||isDanglingSymlink(_0x3dbfc4)){const _0x3f2f9e=lstatSync(_0x3dbfc4);if(!_0x3f2f9e[_0x560a17(0x116)]())throw CliErrors[_0x560a17(0x12f)](_0x560a17(0x126)+_0x3dbfc4);const _0x1bb27f=resolveSymlinkTarget(_0x3dbfc4);if(!isPathInside(realOrResolved(_0x1bb27f),realOrResolved(_0x4c9fbb[_0x560a17(0x129)])))throw CliErrors[_0x560a17(0x12f)](_0x560a17(0x117)+_0x3dbfc4);if(realOrResolved(_0x1bb27f)===realOrResolved(_0x4c81cb))return{'path':_0x3dbfc4,'target':_0x4c81cb,'action':_0x560a17(0x136)};const _0xd48640=readMetadataIfPresent(resolve(_0x1bb27f,METADATA_FILE));if(_0x4c9fbb[_0x560a17(0x134)]===_0x560a17(0x110)&&(_0xd48640?.[_0x560a17(0x112)]!==_0x4c9fbb[_0x560a17(0x112)]||_0xd48640['skillCode']!==_0x339360))throw CliErrors[_0x560a17(0x12f)]('Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20'+_0x3dbfc4);return unlinkSync(_0x3dbfc4),symlinkSync(_0x4c81cb,_0x3dbfc4,'dir'),{'path':_0x3dbfc4,'target':_0x4c81cb,'action':_0x560a17(0x13a)};}return symlinkSync(_0x4c81cb,_0x3dbfc4,_0x560a17(0x141)),{'path':_0x3dbfc4,'target':_0x4c81cb,'action':_0x560a17(0x138)};}function managedTargetSkillLinkPaths(_0x52f4c2,_0x170aaa){const _0x54ee5e=a135_0x7fe241;if(!existsSync(_0x52f4c2))return[];const _0x4dc904=_0x170aaa[_0x54ee5e(0x112)]+'--';return readdirSync(_0x52f4c2,{'withFileTypes':!![]})[_0x54ee5e(0x11a)](_0x510fd0=>_0x170aaa[_0x54ee5e(0x134)]===_0x54ee5e(0x110)||_0x510fd0[_0x54ee5e(0x115)][_0x54ee5e(0x140)](_0x4dc904))['map'](_0x2cc2f3=>resolve(_0x52f4c2,_0x2cc2f3[_0x54ee5e(0x115)]));}function removeManagedSkillLink(_0x38b9eb,_0x210880,_0x431444){const _0x5c470f=a135_0x7fe241,_0x4b07a7=lstatIfPresent(_0x38b9eb);if(!_0x4b07a7?.[_0x5c470f(0x116)]())return{'path':_0x38b9eb,'action':_0x5c470f(0x11d),'reason':_0x5c470f(0x137)};const _0x5e7e5f=resolveSymlinkTarget(_0x38b9eb);if(!isPathInside(realOrResolved(_0x5e7e5f),realOrResolved(_0x210880[_0x5c470f(0x129)])))return{'path':_0x38b9eb,'action':'skipped','reason':_0x5c470f(0x128)};const _0x5dae0d=readMetadataIfPresent(resolve(_0x5e7e5f,METADATA_FILE));if(_0x210880[_0x5c470f(0x134)]===_0x5c470f(0x110)&&(_0x5dae0d?.['appCode']!==_0x210880[_0x5c470f(0x112)]||_0x5dae0d[_0x5c470f(0x122)]!==_0x431444))return{'path':_0x38b9eb,'action':'skipped','reason':_0x5c470f(0x12c)};return unlinkSync(_0x38b9eb),{'path':_0x38b9eb,'action':_0x5c470f(0x10e)};}function isLinkedFromAnyRoot(_0x4765ab,_0x2c2042){const _0x4036a5=a135_0x7fe241,_0x10c607=realOrResolved(_0x4765ab);for(const _0x565e6b of _0x2c2042){if(!existsSync(_0x565e6b))continue;for(const _0x2b9184 of readdirSync(_0x565e6b,{'withFileTypes':!![]})){if(!_0x2b9184['isSymbolicLink']())continue;const _0x28d165=resolve(_0x565e6b,_0x2b9184[_0x4036a5(0x115)]);if(realOrResolved(resolveSymlinkTarget(_0x28d165))===_0x10c607)return!![];}}return![];}function runtimeSkillLinkName(_0x3c0684,_0x222feb){const _0x586e57=a135_0x7fe241,_0x4090c3=safePathSegment(_0x222feb,_0x586e57(0x122));if(_0x3c0684[_0x586e57(0x134)]===_0x586e57(0x110)&&RESERVED_PROJECT_SKILL_CODES[_0x586e57(0x12d)](_0x4090c3))throw CliErrors['validation'](_0x586e57(0x11c)+_0x4090c3);return _0x3c0684[_0x586e57(0x134)]===_0x586e57(0x110)?_0x4090c3:_0x3c0684[_0x586e57(0x112)]+'--'+_0x4090c3;}function runtimeSkillCodeFromLink(_0xfbcd52,_0x2df26f){const _0x192544=a135_0x7fe241,_0x222bbe=basename(_0x2df26f);return _0xfbcd52['scope']===_0x192544(0x110)?_0x222bbe:_0x222bbe[_0x192544(0x12b)]((_0xfbcd52['appCode']+'--')[_0x192544(0x121)]);}export function copyManagedSkillDirectory(_0x2e87ad,_0x5b113e){const _0x4bf8ac=a135_0x7fe241,_0x3a23b9=resolve(_0x5b113e,METADATA_FILE),_0x4f7a41=existsSync(_0x5b113e);if(_0x4f7a41){const _0x96ca83=lstatSync(_0x5b113e);if(_0x96ca83[_0x4bf8ac(0x116)]())throw CliErrors[_0x4bf8ac(0x12f)](_0x4bf8ac(0x114)+_0x5b113e);if(!_0x96ca83[_0x4bf8ac(0x13d)]())throw CliErrors[_0x4bf8ac(0x12f)](_0x4bf8ac(0x145)+_0x5b113e);const _0xfb7cc5=readMetadataIfPresent(_0x3a23b9);if(_0xfb7cc5?.[_0x4bf8ac(0x134)]!==_0x4bf8ac(0x13b))throw CliErrors[_0x4bf8ac(0x12f)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x5b113e);}ensureDirSync(dirname(_0x5b113e));const _0xd1b62e=_0x4f7a41?readMetadataIfPresent(_0x3a23b9)?.[_0x4bf8ac(0x119)]:undefined,_0x24cb53=readMetadataIfPresent(resolve(_0x2e87ad,METADATA_FILE))?.[_0x4bf8ac(0x119)];return _0x4f7a41&&removeSync(_0x5b113e),copySkillDirectory(_0x2e87ad,_0x5b113e),{'path':_0x5b113e,'target':_0x2e87ad,'action':!_0x4f7a41?_0x4bf8ac(0x138):_0xd1b62e===_0x24cb53?'unchanged':_0x4bf8ac(0x13a)};}function copySkillDirectory(_0x40f7c2,_0x4a9f8e){copySync(_0x40f7c2,_0x4a9f8e,{'dereference':![],'overwrite':!![],'filter'(_0x85a04){const _0x4e3ccd=a135_0x114d;if(lstatSync(_0x85a04)['isSymbolicLink']())throw CliErrors[_0x4e3ccd(0x12f)](_0x4e3ccd(0x127)+_0x85a04);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x15f60f,_0x9e0aec){const _0x57a7f4=a136_0x573a,_0x3e0b0f=_0x15f60f();while(!![]){try{const _0x3c6f38=parseInt(_0x57a7f4(0x1a6))/0x1*(parseInt(_0x57a7f4(0x1ab))/0x2)+parseInt(_0x57a7f4(0x19b))/0x3*(parseInt(_0x57a7f4(0x184))/0x4)+-parseInt(_0x57a7f4(0x195))/0x5*(parseInt(_0x57a7f4(0x187))/0x6)+parseInt(_0x57a7f4(0x190))/0x7+parseInt(_0x57a7f4(0x1ac))/0x8+parseInt(_0x57a7f4(0x1a8))/0x9+-parseInt(_0x57a7f4(0x189))/0xa*(parseInt(_0x57a7f4(0x199))/0xb);if(_0x3c6f38===_0x9e0aec)break;else _0x3e0b0f['push'](_0x3e0b0f['shift']());}catch(_0x182cc6){_0x3e0b0f['push'](_0x3e0b0f['shift']());}}}(a136_0xb5c9,0x40207));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x24757e,_0x40aee3,_0x541353={}){const _0x341663=a136_0x573a,_0x34ed9a=safePathSegment(_0x24757e['appCode'],_0x341663(0x191));if(_0x40aee3['appCode']!==_0x34ed9a)throw CliErrors[_0x341663(0x18a)](_0x341663(0x1a5)+_0x40aee3[_0x341663(0x191)]+_0x341663(0x1a4)+_0x34ed9a);const _0x122fb2=normalizeRuntimeSkillScopes(_0x24757e[_0x341663(0x19c)]),_0x1a303c=new Set(_0x122fb2),_0x2c2db2=_0x24757e[_0x341663(0x185)]?.[_0x341663(0x198)](),_0x531225=new Map(),_0x447f1c=resolve(getRuntimeSkillCacheRoot(_0x24757e[_0x341663(0x188)],_0x24757e['accessKey'],_0x541353),_0x34ed9a);for(const _0x1b628d of _0x122fb2){for(const _0x2160cb of localSkillEntryDirs(resolve(_0x447f1c,_0x1b628d))){collectLocalRuntimeSkill(_0x531225,_0x2160cb,{'appCode':_0x34ed9a,'scopes':_0x1a303c,'code':_0x2c2db2,'source':'cache'});}}for(const _0x335864 of _0x40aee3[_0x341663(0x1aa)]){for(const _0x3243d2 of localSkillLinkCandidates(_0x335864,_0x40aee3,_0x1a303c)){collectLocalRuntimeSkill(_0x531225,_0x3243d2,{'appCode':_0x34ed9a,'scopes':_0x1a303c,'code':_0x2c2db2,'source':'link','linkedPath':_0x3243d2});}}return Array[_0x341663(0x18c)](_0x531225[_0x341663(0x1a1)]())[_0x341663(0x1b2)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x299eb7){const _0x363478=a136_0x573a;if(!existsSync(_0x299eb7))return[];return readdirSync(_0x299eb7,{'withFileTypes':!![]})[_0x363478(0x193)](_0x452ee3=>_0x452ee3['isDirectory']()||_0x452ee3['isSymbolicLink']())[_0x363478(0x1a7)](_0x17dcb4=>resolve(_0x299eb7,_0x17dcb4[_0x363478(0x19f)]));}function localSkillLinkCandidates(_0x3aeb19,_0x325580,_0x5da3dd){const _0x104688=a136_0x573a;if(!existsSync(_0x3aeb19))return[];const _0x1f3fa8=_0x325580[_0x104688(0x191)]+'--';return readdirSync(_0x3aeb19,{'withFileTypes':!![]})[_0x104688(0x193)](_0x260b3a=>_0x260b3a[_0x104688(0x18d)]()||_0x260b3a[_0x104688(0x1a9)]())[_0x104688(0x193)](_0x280616=>_0x325580[_0x104688(0x1ae)]===_0x104688(0x19e)||_0x280616[_0x104688(0x19f)][_0x104688(0x19d)](_0x1f3fa8)||_0x5da3dd[_0x104688(0x19a)](_0x104688(0x18e)))['map'](_0x497593=>resolve(_0x3aeb19,_0x497593[_0x104688(0x19f)]));}function a136_0xb5c9(){const _0x57e6ef=['localeCompare','2050564lKpQPF','code','includes','18gWyTOl','env','688630JiNWpk','validation','tags','from','isDirectory','builtin','get','1610651QqHIdv','appCode','dir','filter','isArray','596770MPSDaw','set','cacheDir','trim','187nNrQBH','has','3uaPCyz','scopes','startsWith','project','name','skillCode','values','linkedPath','skillMdPath','\x20!=\x20','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','4IQwdPt','map','3654981TxhRpn','isSymbolicLink','skillRoots','136496DJVhOl','2956488RELZUL','cache','scope','metadataPath','source','linkedPaths','sort'];a136_0xb5c9=function(){return _0x57e6ef;};return a136_0xb5c9();}function a136_0x573a(_0x4d28a4,_0x25a851){_0x4d28a4=_0x4d28a4-0x183;const _0xb5c916=a136_0xb5c9();let _0x573aff=_0xb5c916[_0x4d28a4];return _0x573aff;}function collectLocalRuntimeSkill(_0x5c6283,_0xc9575b,_0x375910){const _0x484c29=a136_0x573a,_0x89f6f9=resolve(_0xc9575b,METADATA_FILE),_0x4e8625=readMetadataIfPresent(_0x89f6f9);if(!_0x4e8625)return;if(_0x4e8625[_0x484c29(0x191)]!==_0x375910[_0x484c29(0x191)])return;if(!isRuntimeSkillScope(_0x4e8625[_0x484c29(0x1ae)])||!_0x375910[_0x484c29(0x19c)][_0x484c29(0x19a)](_0x4e8625['scope']))return;const _0x43fcef=_0x4e8625[_0x484c29(0x1a0)]?.[_0x484c29(0x198)]();if(!_0x43fcef)return;if(_0x375910[_0x484c29(0x185)]&&_0x43fcef!==_0x375910[_0x484c29(0x185)])return;const _0x4cc785=_0x4e8625[_0x484c29(0x1ae)]+':'+_0x43fcef,_0xcc8a96=_0x375910['linkedPath']?[_0x375910[_0x484c29(0x1a2)]]:[],_0x1fd5ac=_0x5c6283[_0x484c29(0x18f)](_0x4cc785);if(_0x1fd5ac){_0x375910[_0x484c29(0x1b0)]===_0x484c29(0x1ad)&&(_0x1fd5ac['dir']=_0xc9575b,_0x1fd5ac[_0x484c29(0x197)]=_0xc9575b,_0x1fd5ac[_0x484c29(0x1a3)]=resolve(_0xc9575b,SKILL_FILE),_0x1fd5ac[_0x484c29(0x1af)]=_0x89f6f9);for(const _0x5bed87 of _0xcc8a96){!_0x1fd5ac[_0x484c29(0x1b1)][_0x484c29(0x186)](_0x5bed87)&&_0x1fd5ac[_0x484c29(0x1b1)]['push'](_0x5bed87);}_0x1fd5ac[_0x484c29(0x1b1)][_0x484c29(0x1b2)]();return;}_0x5c6283[_0x484c29(0x196)](_0x4cc785,{..._0x4e8625,'tags':Array[_0x484c29(0x194)](_0x4e8625[_0x484c29(0x18b)])?_0x4e8625[_0x484c29(0x18b)]:[],'scope':_0x4e8625[_0x484c29(0x1ae)],'source':'local','dir':_0xc9575b,'cacheDir':_0x375910[_0x484c29(0x1b0)]===_0x484c29(0x1ad)?_0xc9575b:undefined,'skillMdPath':resolve(_0xc9575b,SKILL_FILE),'metadataPath':_0x89f6f9,'linkedPaths':_0xcc8a96});}function compareLocalRuntimeSkills(_0x3c0eee,_0x5e64a0){const _0x7be09c=a136_0x573a,_0x2a630c={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2a630c[_0x3c0eee[_0x7be09c(0x1ae)]]-_0x2a630c[_0x5e64a0[_0x7be09c(0x1ae)]]||_0x3c0eee[_0x7be09c(0x1a0)][_0x7be09c(0x183)](_0x5e64a0[_0x7be09c(0x1a0)])||_0x3c0eee[_0x7be09c(0x192)]['localeCompare'](_0x5e64a0['dir']);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a137_0x23c3(){const _0x1ba14f=['length','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','push','from','isFile','isSymbolicLink','object','Unsafe\x20Skill\x20file\x20path:\x20','add','content','replace','localeCompare','test','includes','108015ydkLiJ','sha256','2196812DSeQUo','Duplicate\x20Skill\x20file\x20path:\x20','trim','string','toLowerCase','set','utf8','compare','isArray','Skill\x20file\x20sha256\x20is\x20invalid:\x20','name','1271850flKHjo','1442996RkushN','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isDirectory','path','split','excludedFilePaths','sort','1195101ozEolp','size','values','70ztFWEe','554936LpdBDG','bytes','has','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','652626AUQdIT','validation'];a137_0x23c3=function(){return _0x1ba14f;};return a137_0x23c3();}(function(_0x516719,_0x3da8e1){const _0x207b8d=a137_0x4878,_0x124758=_0x516719();while(!![]){try{const _0x5d28c3=-parseInt(_0x207b8d(0x15d))/0x1+-parseInt(_0x207b8d(0x16b))/0x2+parseInt(_0x207b8d(0x173))/0x3+parseInt(_0x207b8d(0x15f))/0x4+-parseInt(_0x207b8d(0x16a))/0x5+-parseInt(_0x207b8d(0x17b))/0x6+-parseInt(_0x207b8d(0x176))/0x7*(-parseInt(_0x207b8d(0x177))/0x8);if(_0x5d28c3===_0x3da8e1)break;else _0x124758['push'](_0x124758['shift']());}catch(_0x3c954d){_0x124758['push'](_0x124758['shift']());}}}(a137_0x23c3,0x6d84a));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';function a137_0x4878(_0xef7dd8,_0x521210){_0xef7dd8=_0xef7dd8-0x15c;const _0x23c357=a137_0x23c3();let _0x4878b8=_0x23c357[_0xef7dd8];return _0x4878b8;}import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x3611f1){const _0x6320fd=a137_0x4878;return _0x3611f1[_0x6320fd(0x178)]??Buffer[_0x6320fd(0x180)](_0x3611f1[_0x6320fd(0x186)]??'','utf8');}export function fileText(_0x15ecac){const _0x4b3a5c=a137_0x4878;return fileContent(_0x15ecac)['toString'](_0x4b3a5c(0x165));}export function normalizeLocalFiles(_0x62d341){const _0x2f4636=a137_0x4878;if(!Array[_0x2f4636(0x167)](_0x62d341)||_0x62d341[_0x2f4636(0x17d)]===0x0)return[];const _0x52f8eb=new Map();for(const _0xc69235 of _0x62d341){if(!_0xc69235||typeof _0xc69235!==_0x2f4636(0x183)||typeof _0xc69235[_0x2f4636(0x16f)]!==_0x2f4636(0x162))throw CliErrors[_0x2f4636(0x17c)](_0x2f4636(0x16c));const _0x518aa1=normalizeSkillRelativePath(_0xc69235[_0x2f4636(0x16f)]);if(_0x52f8eb[_0x2f4636(0x179)](_0x518aa1))throw CliErrors['validation'](_0x2f4636(0x160)+_0x518aa1);if(_0xc69235['bytes']!==undefined&&!Buffer['isBuffer'](_0xc69235['bytes']))throw CliErrors[_0x2f4636(0x17c)](_0x2f4636(0x16d)+_0x518aa1);if(_0xc69235['bytes']===undefined&&typeof _0xc69235[_0x2f4636(0x186)]!==_0x2f4636(0x162))throw CliErrors[_0x2f4636(0x17c)](_0x2f4636(0x17e)+_0x518aa1);const _0x552e67=fileContent(_0xc69235);_0x52f8eb[_0x2f4636(0x164)](_0x518aa1,{'path':_0x518aa1,'bytes':_0x552e67});}return Array[_0x2f4636(0x180)](_0x52f8eb[_0x2f4636(0x175)]())[_0x2f4636(0x172)](compareSkillFiles);}export function normalizeManifestFiles(_0x101da6){const _0x3c7f20=a137_0x4878;if(!Array[_0x3c7f20(0x167)](_0x101da6)||_0x101da6['length']===0x0)return[];const _0x516bf4=new Map();for(const _0x3c20ee of _0x101da6){if(!_0x3c20ee||typeof _0x3c20ee!==_0x3c7f20(0x183)||typeof _0x3c20ee[_0x3c7f20(0x16f)]!==_0x3c7f20(0x162))throw CliErrors[_0x3c7f20(0x17c)](_0x3c7f20(0x16c));const _0x57a8e4=normalizeSkillRelativePath(_0x3c20ee[_0x3c7f20(0x16f)]);if(_0x516bf4[_0x3c7f20(0x179)](_0x57a8e4))throw CliErrors[_0x3c7f20(0x17c)](_0x3c7f20(0x160)+_0x57a8e4);if(!isSha256Hex(_0x3c20ee[_0x3c7f20(0x15e)]))throw CliErrors[_0x3c7f20(0x17c)](_0x3c7f20(0x168)+_0x57a8e4);if(!Number['isSafeInteger'](_0x3c20ee[_0x3c7f20(0x174)])||_0x3c20ee[_0x3c7f20(0x174)]<0x0)throw CliErrors[_0x3c7f20(0x17c)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x57a8e4);_0x516bf4[_0x3c7f20(0x164)](_0x57a8e4,{'path':_0x57a8e4,'sha256':_0x3c20ee[_0x3c7f20(0x15e)][_0x3c7f20(0x163)](),'size':_0x3c20ee[_0x3c7f20(0x174)]});}return Array[_0x3c7f20(0x180)](_0x516bf4[_0x3c7f20(0x175)]())[_0x3c7f20(0x172)](compareSkillFiles);}export function scanSkillDirectory(_0x187767,_0x257b34={}){const _0x70eaca=a137_0x4878,_0x38c30d=realpathSync(_0x187767),_0x5b98af=canonicalExcludedFilePaths(_0x257b34[_0x70eaca(0x171)]),_0x4f369f=[];function _0x4c7298(_0x5a4824){const _0x40f709=_0x70eaca,_0x560a40=readdirSync(_0x5a4824,{'withFileTypes':!![]})[_0x40f709(0x172)]((_0x234d0d,_0x396e69)=>_0x234d0d[_0x40f709(0x169)][_0x40f709(0x188)](_0x396e69[_0x40f709(0x169)]));for(const _0x3e2698 of _0x560a40){if(_0x3e2698[_0x40f709(0x16e)]()&&IGNORED_DIR_NAMES['has'](_0x3e2698[_0x40f709(0x169)]))continue;if(IGNORED_FILE_NAMES[_0x40f709(0x179)](_0x3e2698['name']))continue;const _0x32dbb7=resolve(_0x5a4824,_0x3e2698[_0x40f709(0x169)]);if(isExcludedFilePath(_0x32dbb7,_0x5b98af))continue;if(_0x3e2698[_0x40f709(0x182)]())throw CliErrors[_0x40f709(0x17c)](_0x40f709(0x17a)+_0x32dbb7);const _0x287925=toPosixPath(relative(_0x38c30d,_0x32dbb7));if(_0x3e2698[_0x40f709(0x16e)]()){_0x4c7298(_0x32dbb7);continue;}if(!_0x3e2698[_0x40f709(0x181)]())continue;validateSkillRelativePath(_0x287925);const _0x2c67b9=readFileSync(_0x32dbb7);_0x4f369f[_0x40f709(0x17f)]({'path':_0x287925,'bytes':_0x2c67b9});}}return _0x4c7298(_0x38c30d),normalizeLocalFiles(_0x4f369f);}function canonicalExcludedFilePaths(_0x447f97){const _0x37cff8=a137_0x4878,_0xf79110=new Set();for(const _0x511bae of _0x447f97??[]){const _0x454042=resolve(_0x511bae);_0xf79110[_0x37cff8(0x185)](_0x454042);try{_0xf79110[_0x37cff8(0x185)](realpathSync(_0x454042));}catch{}}return _0xf79110;}function isExcludedFilePath(_0x1b58f4,_0x432c19){const _0x322dd8=a137_0x4878;if(_0x432c19[_0x322dd8(0x179)](_0x1b58f4))return!![];if(_0x432c19[_0x322dd8(0x174)]===0x0)return![];try{return _0x432c19[_0x322dd8(0x179)](realpathSync(_0x1b58f4));}catch{return![];}}export function compareSkillFiles(_0x5108df,_0x2c2528){const _0x114002=a137_0x4878;if(_0x5108df[_0x114002(0x16f)]===SKILL_FILE)return _0x2c2528[_0x114002(0x16f)]===SKILL_FILE?0x0:-0x1;if(_0x2c2528[_0x114002(0x16f)]===SKILL_FILE)return 0x1;return Buffer[_0x114002(0x166)](Buffer[_0x114002(0x180)](_0x5108df[_0x114002(0x16f)],'utf8'),Buffer['from'](_0x2c2528[_0x114002(0x16f)],_0x114002(0x165)));}export function normalizeSkillRelativePath(_0x5b87ef){const _0x5243ac=a137_0x4878,_0x5470a5=toPosixPath(_0x5b87ef[_0x5243ac(0x161)]());return validateSkillRelativePath(_0x5470a5),_0x5470a5;}export function validateSkillRelativePath(_0x2a0118){const _0x3eb74a=a137_0x4878;if(!_0x2a0118||_0x2a0118['startsWith']('/')||_0x2a0118[_0x3eb74a(0x15c)]('//'))throw CliErrors[_0x3eb74a(0x17c)](_0x3eb74a(0x184)+_0x2a0118);for(const _0x5b2422 of _0x2a0118[_0x3eb74a(0x170)]('/')){if(!_0x5b2422||_0x5b2422==='.'||_0x5b2422==='..')throw CliErrors[_0x3eb74a(0x17c)](_0x3eb74a(0x184)+_0x2a0118);}}export function toPosixPath(_0x2ea571){const _0x28ca6d=a137_0x4878;return _0x2ea571[_0x28ca6d(0x187)](/\\/g,'/');}export function isSha256Hex(_0x576d50){const _0x426e1f=a137_0x4878;return typeof _0x576d50===_0x426e1f(0x162)&&/^[a-fA-F0-9]{64}$/[_0x426e1f(0x189)](_0x576d50);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x1d52cd,_0x1bfd21){const _0x2f8671=a138_0x349d,_0x46c439=_0x1d52cd();while(!![]){try{const _0x3ff3ec=-parseInt(_0x2f8671(0x122))/0x1*(parseInt(_0x2f8671(0x145))/0x2)+-parseInt(_0x2f8671(0x11d))/0x3*(-parseInt(_0x2f8671(0x125))/0x4)+parseInt(_0x2f8671(0x130))/0x5*(-parseInt(_0x2f8671(0x155))/0x6)+-parseInt(_0x2f8671(0x13e))/0x7*(parseInt(_0x2f8671(0x153))/0x8)+parseInt(_0x2f8671(0x138))/0x9+-parseInt(_0x2f8671(0x127))/0xa+parseInt(_0x2f8671(0x123))/0xb;if(_0x3ff3ec===_0x1bfd21)break;else _0x46c439['push'](_0x46c439['shift']());}catch(_0x20271a){_0x46c439['push'](_0x46c439['shift']());}}}(a138_0x54ff,0x2a854));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';function a138_0x54ff(){const _0xc6f583=['description:\x20','flow','displayName','trim','contentHash','find','16bmXYIY','filter','6SxIfpw','keys','skillName','length','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','toString','delete','201XdYXTX','set','match','entries','Runtime\x20Skill\x20package\x20is\x20missing\x20','157SXcGUa','6306080ooKgig','---\x0a','2516eUsJPL','---','1481740dEUZdW','validation','packageBytes','map','isFile','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','Managed\x20file\x20was\x20removed\x20locally:\x20','status','name','967790hrrQQN','accessKey','example','slice','\x0a---\x0a\x0a','fileHashes','utf8','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','863010NrwNeY','.\x20Changed\x20file:\x20','paths','version','test','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','453719LjTBxt','replace','appCode','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','displayName:\x20','env','pulledAt','838mlLrwN','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','path','schemaVersion','skillCode','scope','force','description'];a138_0x54ff=function(){return _0xc6f583;};return a138_0x54ff();}import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a138_0x349d(_0x2b3ea8,_0x3a1708){_0x2b3ea8=_0x2b3ea8-0x119;const _0x54ff92=a138_0x54ff();let _0x349d85=_0x54ff92[_0x2b3ea8];return _0x349d85;}export function materializeRuntimeSkill(_0x2b89df,_0x3368c0,_0x24156a){const _0x176859=a138_0x349d,_0x5d6d25=requireSkillCode(_0x2b89df),_0x4e5dc7=requirePackageBytes(_0x5d6d25,_0x24156a[_0x176859(0x129)]),_0x58cf0e=extractDownloadedPackage(_0x4e5dc7),_0x188bdc=_0x58cf0e[_0x176859(0x152)](_0x1a37b6=>_0x1a37b6['path']===SKILL_FILE);if(!_0x188bdc)throw CliErrors['validation'](_0x176859(0x121)+SKILL_FILE+':\x20'+_0x5d6d25);const _0x2ba848=withMaterializedSkillFrontmatter(_0x58cf0e,_0x2b89df,_0x5d6d25),_0x3467d2=_0x2ba848[_0x176859(0x152)](_0x19c072=>_0x19c072[_0x176859(0x147)]===SKILL_FILE),_0x3d6773=fileText(_0x3467d2),_0xbd1ac3=getRuntimeSkillDir(_0x24156a[_0x176859(0x143)],_0x24156a[_0x176859(0x131)],_0x24156a[_0x176859(0x140)],_0x3368c0,_0x5d6d25,_0x24156a[_0x176859(0x13a)]),_0x12376e=resolve(_0xbd1ac3,SKILL_FILE),_0x27759f=resolve(_0xbd1ac3,METADATA_FILE),_0x4af0e1=contentHash(_0x3d6773),_0x281be3=readMetadataIfPresent(_0x27759f)?.[_0x176859(0x135)];ensurePulledFilesCanBeOverwritten(_0xbd1ac3,_0x27759f,_0x2ba848,_0x24156a[_0x176859(0x14b)]===!![]),mkdirSync(_0xbd1ac3,{'recursive':!![],'mode':0x1c0});const _0x3fa871=existsSync(_0x12376e)?readFileSync(_0x12376e,_0x176859(0x136)):undefined;return materializeFiles(_0xbd1ac3,_0x2ba848),removeStaleManagedFiles(_0xbd1ac3,_0x281be3,_0x2ba848),writeJsonAtomic(_0x27759f,buildMetadata(_0x2b89df,_0x3368c0,_0x24156a['appCode'],_0x4af0e1,_0x24156a[_0x176859(0x144)],_0x2ba848,_0x4e5dc7)),{'skill':_0x2b89df,'scope':_0x3368c0,'dir':_0xbd1ac3,'skillMdPath':_0x12376e,'metadataPath':_0x27759f,'contentHash':_0x4af0e1,'changed':_0x3fa871!==_0x3d6773};}export function reuseMaterializedRuntimeSkill(_0xe3dcd0,_0x2d24e7,_0x168db4){const _0x2fbe20=a138_0x349d,_0x2cda94=_0xe3dcd0[_0x2fbe20(0x13b)]?.['trim']();if(!_0x2cda94)return undefined;const _0x3a26b3=requireSkillCode(_0xe3dcd0),_0x230f08=getRuntimeSkillDir(_0x168db4['env'],_0x168db4[_0x2fbe20(0x131)],_0x168db4[_0x2fbe20(0x140)],_0x2d24e7,_0x3a26b3,_0x168db4[_0x2fbe20(0x13a)]),_0x2aeb11=resolve(_0x230f08,SKILL_FILE),_0x47f98d=resolve(_0x230f08,METADATA_FILE),_0x13700c=readMetadataIfPresent(_0x47f98d);if(!_0x13700c||_0x13700c[_0x2fbe20(0x148)]!==0x2||_0x13700c['appCode']!==_0x168db4[_0x2fbe20(0x140)]||_0x13700c[_0x2fbe20(0x14a)]!==_0x2d24e7||_0x13700c[_0x2fbe20(0x149)]!==_0x3a26b3||_0x13700c[_0x2fbe20(0x13b)]!==_0x2cda94||_0x13700c['id']!==_0xe3dcd0['id']||_0x13700c['skillName']!==_0xe3dcd0[_0x2fbe20(0x157)]||_0x13700c[_0x2fbe20(0x14c)]!==_0xe3dcd0[_0x2fbe20(0x14c)]||_0x13700c[_0x2fbe20(0x132)]!==_0xe3dcd0[_0x2fbe20(0x132)]||_0x13700c[_0x2fbe20(0x12e)]!==_0xe3dcd0['status']||!_0x13700c['contentHash']||!_0x13700c[_0x2fbe20(0x135)]||!Object['hasOwn'](_0x13700c['fileHashes'],SKILL_FILE))return undefined;for(const [_0x50a12f,_0xfafc59]of Object[_0x2fbe20(0x120)](_0x13700c['fileHashes'])){if(!/^[a-f0-9]{64}$/['test'](_0xfafc59))return undefined;const _0x1c6d15=resolveManagedFilePath(_0x230f08,_0x50a12f);if(!existsSync(_0x1c6d15)||!lstatSync(_0x1c6d15)[_0x2fbe20(0x12b)]())return undefined;if(bufferSha256(readFileSync(_0x1c6d15))!==_0xfafc59)return undefined;}return{'skill':_0xe3dcd0,'scope':_0x2d24e7,'dir':_0x230f08,'skillMdPath':_0x2aeb11,'metadataPath':_0x47f98d,'contentHash':_0x13700c[_0x2fbe20(0x151)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x243d3d,_0x5aa4a3,_0x4ae812){const _0x356810=a138_0x349d,_0x3c2ab7=skillDisplayName(_0x5aa4a3,_0x4ae812),_0x1fe41f=_0x5aa4a3[_0x356810(0x14c)]?.[_0x356810(0x150)]()||_0x3c2ab7||_0x4ae812;return normalizeLocalFiles(_0x243d3d)[_0x356810(0x12a)](_0x50b9cd=>{const _0x22800d=_0x356810,_0x1b6f44=fileText(_0x50b9cd);if(_0x50b9cd[_0x22800d(0x147)]!==SKILL_FILE)return _0x50b9cd;if(hasYamlFrontmatter(_0x1b6f44))return{'path':_0x50b9cd[_0x22800d(0x147)],'content':withSyncedDisplayName(_0x1b6f44,_0x3c2ab7)};return{'path':_0x50b9cd[_0x22800d(0x147)],'content':prependSkillFrontmatter(_0x1b6f44,{'name':_0x4ae812,'displayName':_0x3c2ab7,'description':_0x1fe41f})};});}function hasYamlFrontmatter(_0xec4541){const _0x3852b1=a138_0x349d;return/^\uFEFF?---\s*\r?\n/[_0x3852b1(0x13c)](_0xec4541);}function prependSkillFrontmatter(_0x3247ff,_0x1cb547){const _0x3620b9=a138_0x349d,_0x5e710a=_0x3247ff[_0x3620b9(0x13f)](/^\uFEFF/,'');return[_0x3620b9(0x126),'name:\x20'+yamlString(_0x1cb547[_0x3620b9(0x12f)]),_0x1cb547[_0x3620b9(0x14f)]?_0x3620b9(0x142)+yamlString(_0x1cb547[_0x3620b9(0x14f)]):undefined,_0x3620b9(0x14d)+yamlString(_0x1cb547[_0x3620b9(0x14c)]),_0x3620b9(0x126),'',_0x5e710a][_0x3620b9(0x154)](_0x3bcd5a=>_0x3bcd5a!==undefined)['join']('\x0a');}function yamlString(_0xc3f512){const _0x20dca2=a138_0x349d;return JSON['stringify'](_0xc3f512['replace'](/\r/g,'')[_0x20dca2(0x150)]());}function skillDisplayName(_0x13322a,_0x2a6946){const _0x3f56de=a138_0x349d,_0x566f39=_0x13322a[_0x3f56de(0x157)]?.[_0x3f56de(0x150)]();return _0x566f39||_0x2a6946;}function withSyncedDisplayName(_0x5aec3e,_0x1efc36){const _0x24d0dd=a138_0x349d,_0x99e677=_0x5aec3e[_0x24d0dd(0x11f)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x99e677)return _0x5aec3e;const _0x3e1f27=_0x99e677[0x1]??'',_0xb1da06=_0x99e677[0x2]??'',_0x3c7a33=parseDocument(_0xb1da06);if(_0x3c7a33['errors'][_0x24d0dd(0x119)]>0x0||!isMap(_0x3c7a33['contents']))return _0x5aec3e;if(_0x1efc36)_0x3c7a33[_0x24d0dd(0x11e)]('displayName',_0x1efc36);else{if(_0x3c7a33['has']('displayName'))_0x3c7a33[_0x24d0dd(0x11c)](_0x24d0dd(0x14f));else return _0x5aec3e;}forceBlockCollections(_0x3c7a33['contents']);const _0x1b5748=_0x3c7a33[_0x24d0dd(0x11b)]({'lineWidth':0x0})['trimEnd'](),_0x257bce=_0x5aec3e[_0x24d0dd(0x133)](_0x99e677[0x0][_0x24d0dd(0x119)])[_0x24d0dd(0x13f)](/^\r?\n/,'');return _0x3e1f27+_0x24d0dd(0x124)+_0x1b5748+_0x24d0dd(0x134)+_0x257bce;}function forceBlockCollections(_0x416069){if(!isNode(_0x416069))return;visit(_0x416069,(_0x168b16,_0x27ca0c)=>{const _0x17ad0a=a138_0x349d;isCollection(_0x27ca0c)&&(_0x27ca0c[_0x17ad0a(0x14e)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x568cea,_0x580867,_0x24904a,_0x39b042){const _0x5d2aa6=a138_0x349d;if(_0x39b042||!existsSync(_0x580867))return;const _0x40e9e4=readMetadataIfPresent(_0x580867);if(!_0x40e9e4)return;const _0x4f13cc=_0x40e9e4[_0x5d2aa6(0x135)]&&Object[_0x5d2aa6(0x156)](_0x40e9e4[_0x5d2aa6(0x135)])[_0x5d2aa6(0x119)]>0x0?_0x40e9e4[_0x5d2aa6(0x135)]:undefined;if(_0x4f13cc)for(const [_0x939591,_0x35fc49]of Object[_0x5d2aa6(0x120)](_0x4f13cc)){const _0x564e4f=resolveManagedFilePath(_0x568cea,_0x939591);if(!existsSync(_0x564e4f))throw CliErrors[_0x5d2aa6(0x128)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x568cea,_0x5d2aa6(0x12d)+_0x939591);const _0x320593=lstatSync(_0x564e4f);if(!_0x320593[_0x5d2aa6(0x12b)]())throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x12c)+_0x568cea,_0x5d2aa6(0x13d)+_0x939591);const _0x39dc12=bufferSha256(readFileSync(_0x564e4f));if(_0x39dc12!==_0x35fc49)throw CliErrors[_0x5d2aa6(0x128)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x568cea+_0x5d2aa6(0x139)+_0x939591,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x939591);}else{const _0x55bbe9=resolve(_0x568cea,SKILL_FILE);if(existsSync(_0x55bbe9)&&_0x40e9e4[_0x5d2aa6(0x151)]){const _0x28e2d1=contentHash(readFileSync(_0x55bbe9,_0x5d2aa6(0x136)));if(_0x28e2d1!==_0x40e9e4['contentHash'])throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x146)+_0x55bbe9,_0x5d2aa6(0x11a));}}for(const _0x3269f8 of normalizeLocalFiles(_0x24904a)){if(_0x4f13cc?.[_0x3269f8['path']])continue;if(!_0x4f13cc&&_0x3269f8[_0x5d2aa6(0x147)]===SKILL_FILE)continue;const _0x13c69e=resolveManagedFilePath(_0x568cea,_0x3269f8[_0x5d2aa6(0x147)]);if(!existsSync(_0x13c69e))continue;const _0x171de4=lstatSync(_0x13c69e);if(!_0x171de4[_0x5d2aa6(0x12b)]())throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x12c)+_0x568cea,_0x5d2aa6(0x137)+_0x3269f8[_0x5d2aa6(0x147)]);const _0x42496e=bufferSha256(readFileSync(_0x13c69e));if(_0x42496e!==fileHash(_0x3269f8))throw CliErrors[_0x5d2aa6(0x128)](_0x5d2aa6(0x12c)+_0x568cea,_0x5d2aa6(0x141)+_0x3269f8[_0x5d2aa6(0x147)]);}}function materializeFiles(_0x1cb3b1,_0x1a5938){const _0x373bee=a138_0x349d;for(const _0x5eb459 of normalizeLocalFiles(_0x1a5938)){const _0x2388c4=resolveManagedFilePath(_0x1cb3b1,_0x5eb459[_0x373bee(0x147)]);mkdirSync(dirname(_0x2388c4),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2388c4,fileContent(_0x5eb459),0x180);}}function removeStaleManagedFiles(_0x604e05,_0x270e2e,_0x48f5c6){const _0x282ae4=a138_0x349d;if(!_0x270e2e)return;const _0x594839=new Set(normalizeLocalFiles(_0x48f5c6)[_0x282ae4(0x12a)](_0x32162d=>_0x32162d[_0x282ae4(0x147)]));for(const _0x491c03 of Object[_0x282ae4(0x156)](_0x270e2e)){if(_0x594839['has'](_0x491c03))continue;const _0xeec74e=resolveManagedFilePath(_0x604e05,_0x491c03);existsSync(_0xeec74e)&&lstatSync(_0xeec74e)[_0x282ae4(0x12b)]()&&rmSync(_0xeec74e,{'force':!![]});}}
|
|
1
|
+
(function(_0x5744c4,_0x172364){const _0xba348b=a138_0x21d6,_0x38fe71=_0x5744c4();while(!![]){try{const _0x545321=parseInt(_0xba348b(0xfb))/0x1+-parseInt(_0xba348b(0x12f))/0x2*(parseInt(_0xba348b(0x10d))/0x3)+-parseInt(_0xba348b(0x101))/0x4+parseInt(_0xba348b(0x119))/0x5*(parseInt(_0xba348b(0x108))/0x6)+-parseInt(_0xba348b(0x11f))/0x7+parseInt(_0xba348b(0xfc))/0x8+parseInt(_0xba348b(0x11b))/0x9*(parseInt(_0xba348b(0x123))/0xa);if(_0x545321===_0x172364)break;else _0x38fe71['push'](_0x38fe71['shift']());}catch(_0x160fb2){_0x38fe71['push'](_0x38fe71['shift']());}}}(a138_0x3187,0xe94fc));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';function a138_0x3187(){const _0xc0f93d=['length','delete','5847792ZMIQnw','appCode','description:\x20','name','match','34377IdzEbz','errors','test','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','isFile','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','set','entries','pulledAt','filter','paths','.\x20Changed\x20file:\x20','5DlnJgf','hasOwn','19020213ZuNocH','trim','displayName','join','3248770BhKnpc','example','fileHashes','has','10kNmzbR','Managed\x20file\x20was\x20removed\x20locally:\x20','status','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','replace','description','accessKey','contentHash','contents','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','---\x0a','keys','214pNfDkz','path','stringify','version','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','---','validation','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','map','618968rXRAkq','6565752ADPMKK','schemaVersion','skillCode','flow','utf8','7527236YXOweO','find','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','scope','displayName:\x20'];a138_0x3187=function(){return _0xc0f93d;};return a138_0x3187();}import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';function a138_0x21d6(_0x72a847,_0x433628){_0x72a847=_0x72a847-0xf8;const _0x31871c=a138_0x3187();let _0x21d640=_0x31871c[_0x72a847];return _0x21d640;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x46c0c2,_0x44c850,_0x1abb58){const _0x386f9c=a138_0x21d6,_0x53347e=requireSkillCode(_0x46c0c2),_0xc9d2b5=requirePackageBytes(_0x53347e,_0x1abb58['packageBytes']),_0x512699=extractDownloadedPackage(_0xc9d2b5),_0x453b03=_0x512699['find'](_0x2e759b=>_0x2e759b[_0x386f9c(0x130)]===SKILL_FILE);if(!_0x453b03)throw CliErrors[_0x386f9c(0x135)](_0x386f9c(0xf9)+SKILL_FILE+':\x20'+_0x53347e);const _0x21aff3=withMaterializedSkillFrontmatter(_0x512699,_0x46c0c2,_0x53347e),_0x4d795f=_0x21aff3[_0x386f9c(0x102)](_0x41fb0d=>_0x41fb0d[_0x386f9c(0x130)]===SKILL_FILE),_0x392cf5=fileText(_0x4d795f),_0x10ce12=getRuntimeSkillDir(_0x1abb58['env'],_0x1abb58['accessKey'],_0x1abb58['appCode'],_0x44c850,_0x53347e,_0x1abb58[_0x386f9c(0x117)]),_0x37f951=resolve(_0x10ce12,SKILL_FILE),_0x4e69d7=resolve(_0x10ce12,METADATA_FILE),_0x16d4e5=contentHash(_0x392cf5),_0x2e24d9=readMetadataIfPresent(_0x4e69d7)?.[_0x386f9c(0x121)];ensurePulledFilesCanBeOverwritten(_0x10ce12,_0x4e69d7,_0x21aff3,_0x1abb58['force']===!![]),mkdirSync(_0x10ce12,{'recursive':!![],'mode':0x1c0});const _0x3d870d=existsSync(_0x37f951)?readFileSync(_0x37f951,_0x386f9c(0x100)):undefined;return materializeFiles(_0x10ce12,_0x21aff3),removeStaleManagedFiles(_0x10ce12,_0x2e24d9,_0x21aff3),writeJsonAtomic(_0x4e69d7,buildMetadata(_0x46c0c2,_0x44c850,_0x1abb58['appCode'],_0x16d4e5,_0x1abb58[_0x386f9c(0x115)],_0x21aff3,_0xc9d2b5)),{'skill':_0x46c0c2,'scope':_0x44c850,'dir':_0x10ce12,'skillMdPath':_0x37f951,'metadataPath':_0x4e69d7,'contentHash':_0x16d4e5,'changed':_0x3d870d!==_0x392cf5};}export function reuseMaterializedRuntimeSkill(_0x2b1ed6,_0x4c9af2,_0x535b8d){const _0x3ea094=a138_0x21d6,_0x184083=_0x2b1ed6[_0x3ea094(0x132)]?.[_0x3ea094(0x11c)]();if(!_0x184083)return undefined;const _0x55cca8=requireSkillCode(_0x2b1ed6),_0x5e9b9f=getRuntimeSkillDir(_0x535b8d['env'],_0x535b8d[_0x3ea094(0x129)],_0x535b8d[_0x3ea094(0x109)],_0x4c9af2,_0x55cca8,_0x535b8d[_0x3ea094(0x117)]),_0x1dbd8b=resolve(_0x5e9b9f,SKILL_FILE),_0x50ebeb=resolve(_0x5e9b9f,METADATA_FILE),_0x4515dc=readMetadataIfPresent(_0x50ebeb);if(!_0x4515dc||_0x4515dc[_0x3ea094(0xfd)]!==0x2||_0x4515dc[_0x3ea094(0x109)]!==_0x535b8d[_0x3ea094(0x109)]||_0x4515dc[_0x3ea094(0x104)]!==_0x4c9af2||_0x4515dc[_0x3ea094(0xfe)]!==_0x55cca8||_0x4515dc[_0x3ea094(0x132)]!==_0x184083||_0x4515dc['id']!==_0x2b1ed6['id']||_0x4515dc['skillName']!==_0x2b1ed6[_0x3ea094(0xf8)]||_0x4515dc[_0x3ea094(0x128)]!==_0x2b1ed6['description']||_0x4515dc[_0x3ea094(0x120)]!==_0x2b1ed6['example']||_0x4515dc['status']!==_0x2b1ed6[_0x3ea094(0x125)]||!_0x4515dc[_0x3ea094(0x12a)]||!_0x4515dc[_0x3ea094(0x121)]||!Object[_0x3ea094(0x11a)](_0x4515dc[_0x3ea094(0x121)],SKILL_FILE))return undefined;for(const [_0x30c7ae,_0x12c76a]of Object[_0x3ea094(0x114)](_0x4515dc[_0x3ea094(0x121)])){if(!/^[a-f0-9]{64}$/['test'](_0x12c76a))return undefined;const _0x2a94b1=resolveManagedFilePath(_0x5e9b9f,_0x30c7ae);if(!existsSync(_0x2a94b1)||!lstatSync(_0x2a94b1)[_0x3ea094(0x111)]())return undefined;if(bufferSha256(readFileSync(_0x2a94b1))!==_0x12c76a)return undefined;}return{'skill':_0x2b1ed6,'scope':_0x4c9af2,'dir':_0x5e9b9f,'skillMdPath':_0x1dbd8b,'metadataPath':_0x50ebeb,'contentHash':_0x4515dc['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0x1c5f63,_0x579c99,_0x2927cc){const _0x1ce905=a138_0x21d6,_0x4135ca=skillDisplayName(_0x579c99,_0x2927cc),_0x46f97c=_0x579c99['description']?.[_0x1ce905(0x11c)]()||_0x4135ca||_0x2927cc;return normalizeLocalFiles(_0x1c5f63)[_0x1ce905(0xfa)](_0x3dfcba=>{const _0x1f5127=_0x1ce905,_0x58c362=fileText(_0x3dfcba);if(_0x3dfcba[_0x1f5127(0x130)]!==SKILL_FILE)return _0x3dfcba;if(hasYamlFrontmatter(_0x58c362))return{'path':_0x3dfcba[_0x1f5127(0x130)],'content':withSyncedDisplayName(_0x58c362,_0x4135ca)};return{'path':_0x3dfcba[_0x1f5127(0x130)],'content':prependSkillFrontmatter(_0x58c362,{'name':_0x2927cc,'displayName':_0x4135ca,'description':_0x46f97c})};});}function hasYamlFrontmatter(_0x4f6220){const _0x482008=a138_0x21d6;return/^\uFEFF?---\s*\r?\n/[_0x482008(0x10f)](_0x4f6220);}function prependSkillFrontmatter(_0x502584,_0x269cba){const _0x5d19f0=a138_0x21d6,_0x5ae4da=_0x502584['replace'](/^\uFEFF/,'');return['---','name:\x20'+yamlString(_0x269cba[_0x5d19f0(0x10b)]),_0x269cba['displayName']?_0x5d19f0(0x105)+yamlString(_0x269cba[_0x5d19f0(0x11d)]):undefined,_0x5d19f0(0x10a)+yamlString(_0x269cba[_0x5d19f0(0x128)]),_0x5d19f0(0x134),'',_0x5ae4da][_0x5d19f0(0x116)](_0x581c78=>_0x581c78!==undefined)[_0x5d19f0(0x11e)]('\x0a');}function yamlString(_0x1ce83e){const _0x2b0124=a138_0x21d6;return JSON[_0x2b0124(0x131)](_0x1ce83e[_0x2b0124(0x127)](/\r/g,'')[_0x2b0124(0x11c)]());}function skillDisplayName(_0x47cc83,_0xaf370e){const _0x230620=a138_0x21d6,_0x446132=_0x47cc83[_0x230620(0xf8)]?.[_0x230620(0x11c)]();return _0x446132||_0xaf370e;}function withSyncedDisplayName(_0x468cad,_0x1980fd){const _0x39521d=a138_0x21d6,_0x45b21f=_0x468cad[_0x39521d(0x10c)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x45b21f)return _0x468cad;const _0x380168=_0x45b21f[0x1]??'',_0x2f0beb=_0x45b21f[0x2]??'',_0x54e83f=parseDocument(_0x2f0beb);if(_0x54e83f[_0x39521d(0x10e)]['length']>0x0||!isMap(_0x54e83f[_0x39521d(0x12b)]))return _0x468cad;if(_0x1980fd)_0x54e83f[_0x39521d(0x113)](_0x39521d(0x11d),_0x1980fd);else{if(_0x54e83f['has'](_0x39521d(0x11d)))_0x54e83f[_0x39521d(0x107)](_0x39521d(0x11d));else return _0x468cad;}forceBlockCollections(_0x54e83f[_0x39521d(0x12b)]);const _0x2a143c=_0x54e83f['toString']({'lineWidth':0x0})['trimEnd'](),_0x3b391b=_0x468cad['slice'](_0x45b21f[0x0][_0x39521d(0x106)])[_0x39521d(0x127)](/^\r?\n/,'');return _0x380168+_0x39521d(0x12d)+_0x2a143c+'\x0a---\x0a\x0a'+_0x3b391b;}function forceBlockCollections(_0x4d4315){if(!isNode(_0x4d4315))return;visit(_0x4d4315,(_0x867592,_0x145dd0)=>{const _0x482d2b=a138_0x21d6;isCollection(_0x145dd0)&&(_0x145dd0[_0x482d2b(0xff)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x408d95,_0x3f5ccb,_0x2530a3,_0x270bf6){const _0x157234=a138_0x21d6;if(_0x270bf6||!existsSync(_0x3f5ccb))return;const _0x36245a=readMetadataIfPresent(_0x3f5ccb);if(!_0x36245a)return;const _0x48c5af=_0x36245a[_0x157234(0x121)]&&Object[_0x157234(0x12e)](_0x36245a[_0x157234(0x121)])[_0x157234(0x106)]>0x0?_0x36245a[_0x157234(0x121)]:undefined;if(_0x48c5af)for(const [_0x1da37a,_0x23872c]of Object[_0x157234(0x114)](_0x48c5af)){const _0x44a37d=resolveManagedFilePath(_0x408d95,_0x1da37a);if(!existsSync(_0x44a37d))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x408d95,_0x157234(0x124)+_0x1da37a);const _0x1c89c6=lstatSync(_0x44a37d);if(!_0x1c89c6[_0x157234(0x111)]())throw CliErrors[_0x157234(0x135)](_0x157234(0x126)+_0x408d95,_0x157234(0x133)+_0x1da37a);const _0x40d5b7=bufferSha256(readFileSync(_0x44a37d));if(_0x40d5b7!==_0x23872c)throw CliErrors[_0x157234(0x135)](_0x157234(0x126)+_0x408d95+_0x157234(0x118)+_0x1da37a,_0x157234(0x12c)+_0x1da37a);}else{const _0x2d7977=resolve(_0x408d95,SKILL_FILE);if(existsSync(_0x2d7977)&&_0x36245a[_0x157234(0x12a)]){const _0x42bbce=contentHash(readFileSync(_0x2d7977,_0x157234(0x100)));if(_0x42bbce!==_0x36245a[_0x157234(0x12a)])throw CliErrors[_0x157234(0x135)](_0x157234(0x110)+_0x2d7977,_0x157234(0x103));}}for(const _0x3a9eb9 of normalizeLocalFiles(_0x2530a3)){if(_0x48c5af?.[_0x3a9eb9[_0x157234(0x130)]])continue;if(!_0x48c5af&&_0x3a9eb9[_0x157234(0x130)]===SKILL_FILE)continue;const _0x3d9c09=resolveManagedFilePath(_0x408d95,_0x3a9eb9['path']);if(!existsSync(_0x3d9c09))continue;const _0x51b4e6=lstatSync(_0x3d9c09);if(!_0x51b4e6[_0x157234(0x111)]())throw CliErrors[_0x157234(0x135)](_0x157234(0x126)+_0x408d95,_0x157234(0x112)+_0x3a9eb9[_0x157234(0x130)]);const _0x3cc928=bufferSha256(readFileSync(_0x3d9c09));if(_0x3cc928!==fileHash(_0x3a9eb9))throw CliErrors[_0x157234(0x135)](_0x157234(0x126)+_0x408d95,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x3a9eb9[_0x157234(0x130)]);}}function materializeFiles(_0x576b48,_0x190e34){const _0x3dd3b5=a138_0x21d6;for(const _0x5107d1 of normalizeLocalFiles(_0x190e34)){const _0x1fbe49=resolveManagedFilePath(_0x576b48,_0x5107d1[_0x3dd3b5(0x130)]);mkdirSync(dirname(_0x1fbe49),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x1fbe49,fileContent(_0x5107d1),0x180);}}function removeStaleManagedFiles(_0x20c04a,_0xcc3d06,_0x45e967){const _0x3c501d=a138_0x21d6;if(!_0xcc3d06)return;const _0x190b20=new Set(normalizeLocalFiles(_0x45e967)[_0x3c501d(0xfa)](_0x3e8b2d=>_0x3e8b2d[_0x3c501d(0x130)]));for(const _0x56507a of Object[_0x3c501d(0x12e)](_0xcc3d06)){if(_0x190b20[_0x3c501d(0x122)](_0x56507a))continue;const _0x316866=resolveManagedFilePath(_0x20c04a,_0x56507a);existsSync(_0x316866)&&lstatSync(_0x316866)[_0x3c501d(0x111)]()&&rmSync(_0x316866,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x53a020,_0xaa03ed){const _0x14251d=a139_0x4838,_0x416636=_0x53a020();while(!![]){try{const _0x4ff947=-parseInt(_0x14251d(0x124))/0x1+parseInt(_0x14251d(0x118))/0x2+parseInt(_0x14251d(0x10e))/0x3+parseInt(_0x14251d(0x11b))/0x4+-parseInt(_0x14251d(0x117))/0x5+parseInt(_0x14251d(0x123))/0x6*(parseInt(_0x14251d(0x12d))/0x7)+-parseInt(_0x14251d(0x10d))/0x8;if(_0x4ff947===_0xaa03ed)break;else _0x416636['push'](_0x416636['shift']());}catch(_0x640f0b){_0x416636['push'](_0x416636['shift']());}}}(a139_0x55c3,0xedbac));function a139_0x55c3(){const _0x3e0a04=['files','status','zipSha256','userId','personal','7074dCwDxK','65849fgsWPa','parse','validation','object','sourceSessionId','utf8','tags','fromEntries','map','5334vDqOQD','297512eCojzc','3599409SVqxMv','hasUpstreamUpdate','description','string','toISOString','trim','manifest','readonly','forkedFromVersion','7345515OptvDv','864904WEPVtb','isArray','path','60912KrdicQ','length','example'];a139_0x55c3=function(){return _0x3e0a04;};return a139_0x55c3();}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a139_0x4838(_0x8237f5,_0xae3b3c){_0x8237f5=_0x8237f5-0x10d;const _0x55c3c2=a139_0x55c3();let _0x4838df=_0x55c3c2[_0x8237f5];return _0x4838df;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x5592c3,_0x1b404e,_0x9912a7,_0x98b07e,_0x5da72b,_0x2ed9b8,_0x2fa89f){const _0x4c8e1e=a139_0x4838,_0xb3b0b0=_0x2ed9b8?normalizeLocalFiles(_0x2ed9b8):[],_0x472d26=!_0x2fa89f&&_0xb3b0b0['length']>0x0?buildSkillPackage(_0xb3b0b0):undefined,_0x56d077=_0x2fa89f?bufferSha256(_0x2fa89f):_0x472d26?.['manifest'][_0x4c8e1e(0x120)],_0x32750e=_0x2fa89f?.['length']??_0x472d26?.[_0x4c8e1e(0x114)]['zipSize'],_0x5d79c9=_0xb3b0b0[_0x4c8e1e(0x11c)]>0x0?Object[_0x4c8e1e(0x12b)](_0xb3b0b0[_0x4c8e1e(0x12c)](_0x2de015=>[_0x2de015['path'],fileHash(_0x2de015)])):undefined;return{'schemaVersion':_0xb3b0b0[_0x4c8e1e(0x11c)]>0x0?0x2:0x1,'id':_0x5592c3['id'],'appCode':_0x9912a7,'skillCode':requireSkillCode(_0x5592c3),'skillName':_0x5592c3['skillName'],'description':_0x5592c3[_0x4c8e1e(0x110)],'example':_0x5592c3[_0x4c8e1e(0x11d)],'scope':_0x1b404e,'readonly':_0x1b404e!==_0x4c8e1e(0x122)||_0x5592c3[_0x4c8e1e(0x115)]===!![],'tenantCode':_0x5592c3['tenantCode'],'userId':_0x5592c3[_0x4c8e1e(0x121)],'version':_0x5592c3['version'],'status':_0x5592c3[_0x4c8e1e(0x11f)],'tags':Array['isArray'](_0x5592c3[_0x4c8e1e(0x12a)])?_0x5592c3['tags']:[],'hasUpstreamUpdate':_0x5592c3[_0x4c8e1e(0x10f)],'forkedFromSkillId':_0x5592c3['forkedFromSkillId'],'forkedFromVersion':_0x5592c3[_0x4c8e1e(0x116)],'sourceSessionId':_0x5592c3[_0x4c8e1e(0x128)],'contentHash':_0x98b07e,'fileHashes':_0x5d79c9,'treeHash':_0xb3b0b0[_0x4c8e1e(0x11c)]>0x0?fileTreeHash(localFilesToManifestFiles(_0xb3b0b0)):undefined,'ossPath':remoteManifestOssPath(_0x5592c3[_0x4c8e1e(0x11e)]),'zipSha256':_0x56d077,'zipSize':_0x32750e,'files':_0xb3b0b0[_0x4c8e1e(0x11c)]>0x0?_0xb3b0b0['map'](_0x498ab3=>({'path':_0x498ab3[_0x4c8e1e(0x11a)],'hash':fileHash(_0x498ab3),'size':fileContent(_0x498ab3)[_0x4c8e1e(0x11c)]})):undefined,'pulledAt':_0x5da72b??new Date()[_0x4c8e1e(0x112)]()};}export function requireSkillCode(_0x9f1d5e){const _0xd9f701=a139_0x4838,_0x1f373b=_0x9f1d5e['skillCode']?.[_0xd9f701(0x113)]();if(!_0x1f373b)throw CliErrors[_0xd9f701(0x126)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x1f373b;}export function readMetadataIfPresent(_0x3fc0dc){const _0x14fe12=a139_0x4838;if(!existsSync(_0x3fc0dc))return undefined;try{const _0x27f5f7=JSON[_0x14fe12(0x125)](readFileSync(_0x3fc0dc,_0x14fe12(0x129)));return _0x27f5f7;}catch{throw CliErrors[_0x14fe12(0x126)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x3fc0dc);}}function remoteManifestOssPath(_0x3cd512){const _0x4a9595=a139_0x4838;if(!_0x3cd512||typeof _0x3cd512!==_0x4a9595(0x127)||Array[_0x4a9595(0x119)](_0x3cd512))return undefined;const _0x16496c=_0x3cd512['ossPath'];return typeof _0x16496c===_0x4a9595(0x111)&&_0x16496c['trim']()?_0x16496c[_0x4a9595(0x113)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a140_0x28571c=a140_0x827f;function a140_0x1d81(){const _0x1b8e4d=['846gwEjkp','homeDirName','path\x20segment','trim','cache','skillCode','.claude','claudeSkillsDir','834172PfXFxB','592192fjoNEm','5997YCkHqP','84krusmY','.workbuddy','1865660hHfJYA','agentsSkillsDir','Unsafe\x20','filter','1868DhiZXO','skills','5078106zMnIOK','workbuddySkillsDir','includes','21748180WFgOhR','9035VjFlpF'];a140_0x1d81=function(){return _0x1b8e4d;};return a140_0x1d81();}(function(_0x2880e8,_0x5ea1d1){const _0x4e1096=a140_0x827f,_0x571bbf=_0x2880e8();while(!![]){try{const _0x14cb23=-parseInt(_0x4e1096(0x1ae))/0x1+parseInt(_0x4e1096(0x1b3))/0x2+parseInt(_0x4e1096(0x1b0))/0x3*(parseInt(_0x4e1096(0x19f))/0x4)+-parseInt(_0x4e1096(0x1a5))/0x5*(-parseInt(_0x4e1096(0x1a6))/0x6)+-parseInt(_0x4e1096(0x1b1))/0x7*(-parseInt(_0x4e1096(0x1af))/0x8)+parseInt(_0x4e1096(0x1a1))/0x9+-parseInt(_0x4e1096(0x1a4))/0xa;if(_0x14cb23===_0x5ea1d1)break;else _0x571bbf['push'](_0x571bbf['shift']());}catch(_0x499ebf){_0x571bbf['push'](_0x571bbf['shift']());}}}(a140_0x1d81,0x89dca));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(_0x1bd86f={}){const _0x176357=a140_0x827f,_0x18fc41=_0x1bd86f['homeDir']??homedir(),_0x3fda3f=resolve(_0x18fc41,PRODUCT_CONFIG[_0x176357(0x1a7)],_0x176357(0x1aa)),_0xe9ae19=trimmedEnv('SKILL_ROOT'),_0x13a285=trimmedEnv('CLAUDE_SKILL_ROOT'),_0xd775dd=resolve(_0x18fc41,_0x176357(0x1b2)),_0x590e8a=_0x1bd86f[_0x176357(0x1a2)]??(existsSync(_0xd775dd)?resolve(_0xd775dd,_0x176357(0x1a0)):undefined);return{'homeDir':_0x18fc41,'cacheRoot':_0x3fda3f,'managedRoot':resolve(_0x18fc41,PRODUCT_CONFIG[_0x176357(0x1a7)]),'agentsSkillsDir':_0x1bd86f[_0x176357(0x1b4)]??_0xe9ae19??resolve(_0x18fc41,'.agents',_0x176357(0x1a0)),'claudeSkillsDir':_0x1bd86f[_0x176357(0x1ad)]??_0x13a285??resolve(_0x18fc41,_0x176357(0x1ac),_0x176357(0x1a0)),'workbuddySkillsDir':_0x590e8a};}export function runtimeAgentSkillRoots(_0x21c119){const _0x2d776b=a140_0x827f;return[_0x21c119[_0x2d776b(0x1b4)],_0x21c119[_0x2d776b(0x1ad)],_0x21c119[_0x2d776b(0x1a2)]][_0x2d776b(0x19e)](_0x28e83c=>Boolean(_0x28e83c));}export function getRuntimeSkillCacheRoot(_0x2f5e9c,_0x819aed,_0x438503={}){const _0x21c33c=resolveSkillSyncPaths(_0x438503);return resolve(_0x21c33c['cacheRoot'],_0x2f5e9c,fingerprintAccessKey(_0x819aed),'skills');}export function getRuntimeSkillDir(_0x318781,_0x287a41,_0x51021b,_0x279f94,_0x2627b7,_0x3a2017={}){const _0x117c1e=a140_0x827f;return resolve(getRuntimeSkillCacheRoot(_0x318781,_0x287a41,_0x3a2017),safePathSegment(_0x51021b,'appCode'),_0x279f94,safePathSegment(_0x2627b7,_0x117c1e(0x1ab)));}export function safePathSegment(_0x1460bb,_0xa6f073=a140_0x28571c(0x1a8)){const _0x507e2d=a140_0x28571c;if(!_0x1460bb||_0x1460bb['includes']('/')||_0x1460bb['includes']('\x5c')||_0x1460bb[_0x507e2d(0x1a3)]('..'))throw CliErrors['validation'](_0x507e2d(0x19d)+_0xa6f073+'\x20for\x20local\x20path:\x20'+_0x1460bb);return _0x1460bb;}function a140_0x827f(_0x423ff4,_0x316c8e){_0x423ff4=_0x423ff4-0x19d;const _0x1d81c7=a140_0x1d81();let _0x827f60=_0x1d81c7[_0x423ff4];return _0x827f60;}function trimmedEnv(_0x59ec63){const _0x20bec4=a140_0x28571c,_0x318c37=productEnv(_0x59ec63)?.[_0x20bec4(0x1a9)]();return _0x318c37?_0x318c37:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3fa481,_0x3601b3){const _0x3df6c4=a141_0x316d,_0x5673da=_0x3fa481();while(!![]){try{const _0x3ecb46=parseInt(_0x3df6c4(0x1d4))/0x1*(parseInt(_0x3df6c4(0x1e3))/0x2)+parseInt(_0x3df6c4(0x1d7))/0x3+-parseInt(_0x3df6c4(0x209))/0x4*(parseInt(_0x3df6c4(0x1e5))/0x5)+parseInt(_0x3df6c4(0x1cf))/0x6*(parseInt(_0x3df6c4(0x1d3))/0x7)+-parseInt(_0x3df6c4(0x1d5))/0x8*(parseInt(_0x3df6c4(0x1dd))/0x9)+parseInt(_0x3df6c4(0x1cc))/0xa+-parseInt(_0x3df6c4(0x1ee))/0xb;if(_0x3ecb46===_0x3601b3)break;else _0x5673da['push'](_0x5673da['shift']());}catch(_0x5cca74){_0x5673da['push'](_0x5673da['shift']());}}}(a141_0x2a08,0xb7bd1));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x687a9f}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0xeadde4,_0x4fb8c6,_0x43b70c={}){const _0x374dbd=a141_0x316d,_0x403fb7=resolvePushDirectoryRoot(_0xeadde4),_0x7ad18c=readPushMetadataIfPresent(resolve(_0x403fb7,METADATA_FILE),{'ignoreInvalidMetadata':_0x43b70c[_0x374dbd(0x1e8)]});if(_0x7ad18c?.[_0x374dbd(0x1f7)]&&_0x7ad18c[_0x374dbd(0x1f7)]!==_0x4fb8c6&&!_0x43b70c[_0x374dbd(0x1fc)]&&!_0x43b70c['ignoreMetadataAppCodeMismatch'])throw CliErrors[_0x374dbd(0x1cb)]('Skill\x20metadata\x20appCode\x20\x22'+_0x7ad18c[_0x374dbd(0x1f7)]+_0x374dbd(0x1e9)+_0x4fb8c6+'\x22.');const _0x21fb0e=resolvePushSkillCode(_0x403fb7,_0x4fb8c6,_0x7ad18c,_0x43b70c);if(!_0x21fb0e)throw CliErrors[_0x374dbd(0x1cb)](_0x374dbd(0x1e4)+SKILL_FILE+',\x20'+METADATA_FILE+_0x374dbd(0x1f3));return{'dir':_0x403fb7,'skillCode':_0x21fb0e,'metadata':_0x7ad18c};}export function readPushDirectory(_0x6c23df,_0x2d6c48,_0x2435cb={}){const _0x4e1b54=a141_0x316d,_0x11b3e1=resolvePushDirectoryIdentity(_0x6c23df,_0x2d6c48,_0x2435cb),_0x4c4956=_0x11b3e1[_0x4e1b54(0x1d8)],_0x557f81=resolve(_0x4c4956,SKILL_FILE);if(!existsSync(_0x557f81)||!lstatSync(_0x557f81)[_0x4e1b54(0x1ff)]())throw CliErrors[_0x4e1b54(0x1cb)]('Missing\x20'+SKILL_FILE+':\x20'+_0x557f81);const _0x5443c5=_0x11b3e1[_0x4e1b54(0x1d9)],_0x29672e=_0x2435cb[_0x4e1b54(0x1eb)]??_0x4e1b54(0x203);if(!_0x2435cb[_0x4e1b54(0x206)]&&_0x5443c5?.['scope']===_0x4e1b54(0x1f1))throw CliErrors[_0x4e1b54(0x1cb)](_0x4e1b54(0x1d1)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x5443c5['scope']+'\x22.');if(!_0x2435cb['ignoreMetadataScope']&&_0x29672e==='personal'&&_0x5443c5?.[_0x4e1b54(0x1de)]&&_0x5443c5[_0x4e1b54(0x1de)]!==_0x4e1b54(0x203))throw CliErrors[_0x4e1b54(0x1cb)](_0x4e1b54(0x201)+METADATA_FILE+_0x4e1b54(0x1e0)+_0x5443c5[_0x4e1b54(0x1de)]+'\x22.',_0x4e1b54(0x1ce)+_0x4c4956+_0x4e1b54(0x1d2));const _0x235b4e=scanSkillDirectory(_0x4c4956,{'excludedFilePaths':_0x2435cb[_0x4e1b54(0x1fb)]}),_0x1f0264=buildSkillPackage(_0x235b4e),_0x3edbf0=readFileSync(_0x557f81,_0x4e1b54(0x1da)),_0x223fb6=_0x11b3e1[_0x4e1b54(0x1db)],_0x166ee0=_0x2435cb['ignoreMetadataForPayload']?undefined:_0x5443c5,_0x4890b4=readSkillDisplayName(_0x3edbf0);return{'skillCode':_0x223fb6,'metadata':_0x5443c5,'frontmatterDisplayName':_0x4890b4,'input':{'skillCode':_0x223fb6,'skillName':_0x4890b4??_0x166ee0?.[_0x4e1b54(0x205)],'description':_0x166ee0?.['description'],'content':_0x3edbf0,'files':_0x1f0264[_0x4e1b54(0x1ea)],'packageBase64':_0x1f0264[_0x4e1b54(0x1f5)],'tags':_0x166ee0?.[_0x4e1b54(0x1f6)],'version':_0x166ee0?.['version'],'sourceSessionId':_0x166ee0?.[_0x4e1b54(0x1f9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x486c2e,_0x429acf,_0x4ff22e,_0x3036b0={}){const _0x27f9d7=a141_0x316d,_0x49659c=resolvePushDirectoryRoot(_0x486c2e),_0xfd3270=readPushMetadataIfPresent(resolve(_0x49659c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x4072b0=requireRemoteScope(_0x429acf),_0x2700a4=readLocalSkillContent(_0x49659c),_0x488fe5={..._0x429acf,'appCode':_0x429acf[_0x27f9d7(0x1f7)]??_0x4ff22e,'skillName':_0x429acf['skillName']??_0xfd3270?.[_0x27f9d7(0x205)],'description':_0x429acf[_0x27f9d7(0x1e6)]??_0xfd3270?.['description'],'example':_0x429acf[_0x27f9d7(0x1f0)]??_0xfd3270?.[_0x27f9d7(0x1f0)],'tags':Array['isArray'](_0x429acf['tags'])?_0x429acf[_0x27f9d7(0x1f6)]:_0xfd3270?.[_0x27f9d7(0x1f6)],'sourceSessionId':_0x429acf[_0x27f9d7(0x1f9)]??_0xfd3270?.[_0x27f9d7(0x1f9)],'content':_0x429acf[_0x27f9d7(0x1d0)]??_0x2700a4},_0x32d5f0=buildMetadata(_0x488fe5,_0x4072b0,_0x4ff22e,contentHash(_0x2700a4),_0x3036b0[_0x27f9d7(0x1ef)]);writeJsonAtomic(resolve(_0x49659c,METADATA_FILE),_0x32d5f0);}export function recordPushedRuntimeSkill(_0x4d0399,_0x1107ef,_0x42e93e,_0x1ba7ef={}){const _0x2d831b=a141_0x316d,_0x3bd57e=resolvePushDirectoryRoot(_0x4d0399),_0x12e24e=scanSkillDirectory(_0x3bd57e),_0x5c375c=_0x12e24e['find'](_0x10c3a4=>_0x10c3a4['path']===SKILL_FILE),_0x5146cc=_0x5c375c?fileText(_0x5c375c):'',_0x155514=tryNormalizePackageManifest(_0x1107ef[_0x2d831b(0x1ed)]),_0x170826={..._0x1107ef,'content':_0x1107ef[_0x2d831b(0x1d0)]??_0x5146cc,'files':_0x155514},_0x469574=_0x155514?normalizeLocalFiles(_0x12e24e)[_0x2d831b(0x1ca)](_0x440775=>_0x155514[_0x2d831b(0x1ed)]['some'](_0x1b7ad5=>_0x1b7ad5[_0x2d831b(0x1d6)]===_0x440775[_0x2d831b(0x1d6)])):undefined,_0x319ae9=buildMetadata(_0x170826,_0x1ba7ef[_0x2d831b(0x1de)]??_0x2d831b(0x203),_0x42e93e,contentHash(_0x170826[_0x2d831b(0x1d0)]??''),_0x1ba7ef[_0x2d831b(0x1df)],_0x469574);writeJsonAtomic(resolve(_0x3bd57e,METADATA_FILE),_0x319ae9);}export function deriveSkillCodeFromDirectory(_0x3b8e89,_0x506c52){const _0xdd49c8=a141_0x316d,_0x540de0=basename(resolve(_0x3b8e89)),_0x4cafa7=_0x506c52+'--';return _0x540de0[_0xdd49c8(0x1fe)](_0x4cafa7)?_0x540de0[_0xdd49c8(0x1c8)](_0x4cafa7['length']):_0x540de0;}function resolvePushSkillCode(_0x44137a,_0x32be26,_0x37fc62,_0x4980dd){const _0xf815d5=a141_0x316d,_0x8a15f8=deriveSkillCodeFromSkillFile(_0x44137a)||deriveSkillCodeFromDirectory(_0x44137a,_0x32be26);if(_0x4980dd[_0xf815d5(0x1e1)])return _0x8a15f8;return _0x37fc62?.[_0xf815d5(0x1db)]?.[_0xf815d5(0x1cd)]()||_0x8a15f8;}function deriveSkillCodeFromSkillFile(_0x805976){const _0x2eba57=a141_0x316d,_0x32c6fe=resolve(_0x805976,SKILL_FILE);if(!existsSync(_0x32c6fe)||!lstatSync(_0x32c6fe)[_0x2eba57(0x1ff)]())return undefined;const _0x112c2a=readFileSync(_0x32c6fe,'utf8'),_0x54518d=_0x112c2a[_0x2eba57(0x1dc)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x54518d)return undefined;const _0xc71e26=parseFrontmatterObject(_0x54518d[0x1]??''),_0x170edb=scalarToString(_0xc71e26?.[_0x2eba57(0x208)]);return _0x170edb?slugifySkillName(_0x170edb):undefined;}function readSkillDisplayName(_0x4990ee){const _0x1d6011=a141_0x316d,_0x51b829=_0x4990ee[_0x1d6011(0x1dc)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x51b829)return undefined;const _0x1c91a1=parseFrontmatterObject(_0x51b829[0x1]??'');return scalarToString(_0x1c91a1?.[_0x1d6011(0x1f8)]);}function a141_0x316d(_0xadbd2a,_0xec0f81){_0xadbd2a=_0xadbd2a-0x1c7;const _0x2a08b1=a141_0x2a08();let _0x316d67=_0x2a08b1[_0xadbd2a];return _0x316d67;}function slugifySkillName(_0x2f8a05){const _0x4d4464=a141_0x316d,_0x42e7a1=_0x2f8a05['trim']()[_0x4d4464(0x1ec)]()[_0x4d4464(0x1c9)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4d4464(0x1c9)](/^-+/,'')[_0x4d4464(0x1c9)](/-+$/,'')[_0x4d4464(0x1c9)](/-{2,}/g,'-');if(!_0x42e7a1)throw CliErrors[_0x4d4464(0x1cb)](_0x4d4464(0x207)+SKILL_FILE+_0x4d4464(0x1c7));return _0x42e7a1;}function parseFrontmatterObject(_0x3ebd60){const _0xf10de8=a141_0x316d;try{const _0x11c853=a141_0x687a9f(_0x3ebd60);return _0x11c853&&typeof _0x11c853==='object'&&!Array[_0xf10de8(0x204)](_0x11c853)?_0x11c853:undefined;}catch{return undefined;}}function scalarToString(_0x130698){const _0x5961ff=a141_0x316d;if(typeof _0x130698===_0x5961ff(0x1e2))return _0x130698[_0x5961ff(0x1cd)]();if(typeof _0x130698==='number'||typeof _0x130698==='boolean')return String(_0x130698);return undefined;}function resolvePushDirectoryRoot(_0x2bc677){const _0x3a4777=a141_0x316d,_0x365fea=resolve(_0x2bc677);if(!existsSync(_0x365fea))throw CliErrors[_0x3a4777(0x1cb)](_0x3a4777(0x1f4)+_0x2bc677);const _0x232e70=lstatSync(_0x365fea);if(_0x232e70[_0x3a4777(0x1e7)]())return _0x365fea;if(_0x232e70[_0x3a4777(0x1fd)]()){const _0x5caeeb=realpathSync(_0x365fea);if(lstatSync(_0x5caeeb)[_0x3a4777(0x1e7)]())return _0x5caeeb;}throw CliErrors[_0x3a4777(0x1cb)](_0x3a4777(0x1f4)+_0x2bc677);}function requireRemoteScope(_0x3e624c){const _0x58bcea=a141_0x316d;if(_0x3e624c[_0x58bcea(0x1de)]==='personal'||_0x3e624c[_0x58bcea(0x1de)]===_0x58bcea(0x200)||_0x3e624c[_0x58bcea(0x1de)]===_0x58bcea(0x1f1))return _0x3e624c['scope'];throw CliErrors[_0x58bcea(0x1cb)](_0x58bcea(0x202)+(_0x3e624c[_0x58bcea(0x1db)]||_0x58bcea(0x1fa))+_0x58bcea(0x1f2)+(_0x3e624c[_0x58bcea(0x1de)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x5cfe02){const _0x318bd4=a141_0x316d,_0x57bcb0=resolve(_0x5cfe02,SKILL_FILE);return existsSync(_0x57bcb0)&&lstatSync(_0x57bcb0)['isFile']()?readFileSync(_0x57bcb0,_0x318bd4(0x1da)):'';}function a141_0x2a08(){const _0x5609c8=['targetScope','toLowerCase','files','16140762gMfEbx','refreshedAt','example','builtin','\x20has\x20unsupported\x20scope\x20\x22',',\x20or\x20directory\x20name.','Skill\x20directory\x20not\x20found:\x20','packageBase64','tags','appCode','displayName','sourceSessionId','(unknown)','excludedFilePaths','allowAppCodeRetarget','isSymbolicLink','startsWith','isFile','company','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Remote\x20Skill\x20','personal','isArray','skillName','ignoreMetadataScope','Invalid\x20','name','4LbGUsD','\x20name\x20for\x20SkillHub\x20slug\x20generation.','slice','replace','filter','validation','765530pGabcS','trim','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','3010908KXPbAu','content','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','14KsiWQn','1223153XdVOgD','32kTCvvA','path','3559029SNQdvs','dir','metadata','utf8','skillCode','match','67923hKaZSh','scope','pushedAt','\x20has\x20scope=\x22','ignoreMetadataSkillCode','string','2EXJyMD','Unable\x20to\x20resolve\x20skillCode\x20from\x20','6197810xRJDPQ','description','isDirectory','ignoreInvalidMetadata','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','manifest'];a141_0x2a08=function(){return _0x5609c8;};return a141_0x2a08();}function readPushMetadataIfPresent(_0xc0a4ce,_0x43b39d={}){const _0xc2f04d=a141_0x316d;try{return readMetadataIfPresent(_0xc0a4ce);}catch(_0x1c48ea){if(_0x43b39d[_0xc2f04d(0x1e8)])return undefined;throw _0x1c48ea;}}
|
|
1
|
+
(function(_0x5bed56,_0x385752){const _0x2c2678=a141_0x2f84,_0x399166=_0x5bed56();while(!![]){try{const _0x3f798c=-parseInt(_0x2c2678(0x1ee))/0x1+-parseInt(_0x2c2678(0x1de))/0x2*(-parseInt(_0x2c2678(0x1b2))/0x3)+parseInt(_0x2c2678(0x1ce))/0x4*(parseInt(_0x2c2678(0x1aa))/0x5)+parseInt(_0x2c2678(0x1ae))/0x6*(parseInt(_0x2c2678(0x1b6))/0x7)+-parseInt(_0x2c2678(0x1c9))/0x8+-parseInt(_0x2c2678(0x1b9))/0x9+parseInt(_0x2c2678(0x1df))/0xa*(parseInt(_0x2c2678(0x1cf))/0xb);if(_0x3f798c===_0x385752)break;else _0x399166['push'](_0x399166['shift']());}catch(_0x5f15d1){_0x399166['push'](_0x399166['shift']());}}}(a141_0xd604,0x4497a));function a141_0xd604(){const _0x1d64b7=['10YXrnBb','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','isArray','Missing\x20','Skill\x20directory\x20not\x20found:\x20','slice','replace','scope','skillCode','description','ignoreInvalidMetadata','unknown','isFile','Invalid\x20','pushedAt','46545HiBjcN','refreshedAt','isDirectory','12570ZxSEQu','\x20has\x20scope=\x22','files','\x20has\x20unsupported\x20scope\x20\x22','6oLchZD','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','example','metadata','15ZjcTKG','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','tags','some','717864gNrHFZ','content','object','1543608BhTyGK','ignoreMetadataAppCodeMismatch','find','filter','displayName','manifest','utf8','sourceSessionId','version','company','string','builtin','allowAppCodeRetarget','targetScope','trim','packageBase64','1777744uzNBrZ','Remote\x20Skill\x20','personal','ignoreMetadataScope','length','436CaExAQ','941336AMXsXz','ignoreMetadataForPayload','skillName','excludedFilePaths','startsWith','Unable\x20to\x20resolve\x20skillCode\x20from\x20','appCode','boolean','toLowerCase','ignoreMetadataSkillCode','match','path','dir','isSymbolicLink','validation','103630IbbIND'];a141_0xd604=function(){return _0x1d64b7;};return a141_0xd604();}import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a141_0x550d9e}from'yaml';import{CliErrors}from'../../errors.js';function a141_0x2f84(_0x130141,_0x4d6e2f){_0x130141=_0x130141-0x1a9;const _0xd604c6=a141_0xd604();let _0x2f8494=_0xd604c6[_0x130141];return _0x2f8494;}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(_0x17c94a,_0x58a091,_0x429c55={}){const _0x4a6ee0=a141_0x2f84,_0x3bc1e8=resolvePushDirectoryRoot(_0x17c94a),_0x36d445=readPushMetadataIfPresent(resolve(_0x3bc1e8,METADATA_FILE),{'ignoreInvalidMetadata':_0x429c55['ignoreInvalidMetadata']});if(_0x36d445?.['appCode']&&_0x36d445[_0x4a6ee0(0x1d5)]!==_0x58a091&&!_0x429c55[_0x4a6ee0(0x1c5)]&&!_0x429c55[_0x4a6ee0(0x1ba)])throw CliErrors[_0x4a6ee0(0x1dd)]('Skill\x20metadata\x20appCode\x20\x22'+_0x36d445['appCode']+_0x4a6ee0(0x1e0)+_0x58a091+'\x22.');const _0x30a350=resolvePushSkillCode(_0x3bc1e8,_0x58a091,_0x36d445,_0x429c55);if(!_0x30a350)throw CliErrors[_0x4a6ee0(0x1dd)](_0x4a6ee0(0x1d4)+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x3bc1e8,'skillCode':_0x30a350,'metadata':_0x36d445};}export function readPushDirectory(_0xeb32c1,_0x4aa4d5,_0x168231={}){const _0x4ec9ff=a141_0x2f84,_0xd1d13d=resolvePushDirectoryIdentity(_0xeb32c1,_0x4aa4d5,_0x168231),_0x19b0b3=_0xd1d13d[_0x4ec9ff(0x1db)],_0x4b7964=resolve(_0x19b0b3,SKILL_FILE);if(!existsSync(_0x4b7964)||!lstatSync(_0x4b7964)[_0x4ec9ff(0x1eb)]())throw CliErrors[_0x4ec9ff(0x1dd)](_0x4ec9ff(0x1e2)+SKILL_FILE+':\x20'+_0x4b7964);const _0x3733b9=_0xd1d13d[_0x4ec9ff(0x1b1)],_0x543c94=_0x168231[_0x4ec9ff(0x1c6)]??'personal';if(!_0x168231[_0x4ec9ff(0x1cc)]&&_0x3733b9?.[_0x4ec9ff(0x1e6)]==='builtin')throw CliErrors['validation'](_0x4ec9ff(0x1af)+METADATA_FILE+_0x4ec9ff(0x1ab)+_0x3733b9['scope']+'\x22.');if(!_0x168231[_0x4ec9ff(0x1cc)]&&_0x543c94==='personal'&&_0x3733b9?.['scope']&&_0x3733b9[_0x4ec9ff(0x1e6)]!==_0x4ec9ff(0x1cb))throw CliErrors[_0x4ec9ff(0x1dd)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x3733b9[_0x4ec9ff(0x1e6)]+'\x22.',_0x4ec9ff(0x1b3)+_0x19b0b3+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x135611=scanSkillDirectory(_0x19b0b3,{'excludedFilePaths':_0x168231[_0x4ec9ff(0x1d2)]}),_0x4d4ed5=buildSkillPackage(_0x135611),_0x52678c=readFileSync(_0x4b7964,'utf8'),_0x10dfb5=_0xd1d13d[_0x4ec9ff(0x1e7)],_0x55b248=_0x168231[_0x4ec9ff(0x1d0)]?undefined:_0x3733b9,_0x18d856=readSkillDisplayName(_0x52678c);return{'skillCode':_0x10dfb5,'metadata':_0x3733b9,'frontmatterDisplayName':_0x18d856,'input':{'skillCode':_0x10dfb5,'skillName':_0x18d856??_0x55b248?.[_0x4ec9ff(0x1d1)],'description':_0x55b248?.[_0x4ec9ff(0x1e8)],'content':_0x52678c,'files':_0x4d4ed5[_0x4ec9ff(0x1be)],'packageBase64':_0x4d4ed5[_0x4ec9ff(0x1c8)],'tags':_0x55b248?.[_0x4ec9ff(0x1b4)],'version':_0x55b248?.[_0x4ec9ff(0x1c1)],'sourceSessionId':_0x55b248?.[_0x4ec9ff(0x1c0)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3d78f8,_0x4adb3b,_0x27de5b,_0x32ba3d={}){const _0x478d52=a141_0x2f84,_0x5ccdb2=resolvePushDirectoryRoot(_0x3d78f8),_0x162347=readPushMetadataIfPresent(resolve(_0x5ccdb2,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0xb2cac3=requireRemoteScope(_0x4adb3b),_0x10d6b5=readLocalSkillContent(_0x5ccdb2),_0x5ddf48={..._0x4adb3b,'appCode':_0x4adb3b[_0x478d52(0x1d5)]??_0x27de5b,'skillName':_0x4adb3b[_0x478d52(0x1d1)]??_0x162347?.[_0x478d52(0x1d1)],'description':_0x4adb3b[_0x478d52(0x1e8)]??_0x162347?.[_0x478d52(0x1e8)],'example':_0x4adb3b[_0x478d52(0x1b0)]??_0x162347?.['example'],'tags':Array[_0x478d52(0x1e1)](_0x4adb3b[_0x478d52(0x1b4)])?_0x4adb3b['tags']:_0x162347?.[_0x478d52(0x1b4)],'sourceSessionId':_0x4adb3b[_0x478d52(0x1c0)]??_0x162347?.['sourceSessionId'],'content':_0x4adb3b['content']??_0x10d6b5},_0x5135b=buildMetadata(_0x5ddf48,_0xb2cac3,_0x27de5b,contentHash(_0x10d6b5),_0x32ba3d[_0x478d52(0x1ef)]);writeJsonAtomic(resolve(_0x5ccdb2,METADATA_FILE),_0x5135b);}export function recordPushedRuntimeSkill(_0x4449b6,_0x1ee77e,_0x5e1ec1,_0x426583={}){const _0x5a0666=a141_0x2f84,_0x4dc67a=resolvePushDirectoryRoot(_0x4449b6),_0x59f27c=scanSkillDirectory(_0x4dc67a),_0xccd0bb=_0x59f27c[_0x5a0666(0x1bb)](_0x5f3920=>_0x5f3920[_0x5a0666(0x1da)]===SKILL_FILE),_0x495fab=_0xccd0bb?fileText(_0xccd0bb):'',_0x59eb89=tryNormalizePackageManifest(_0x1ee77e['files']),_0x1bbda4={..._0x1ee77e,'content':_0x1ee77e[_0x5a0666(0x1b7)]??_0x495fab,'files':_0x59eb89},_0x1cb280=_0x59eb89?normalizeLocalFiles(_0x59f27c)[_0x5a0666(0x1bc)](_0x1a7d24=>_0x59eb89[_0x5a0666(0x1ac)][_0x5a0666(0x1b5)](_0x1f1db3=>_0x1f1db3['path']===_0x1a7d24[_0x5a0666(0x1da)])):undefined,_0x183f71=buildMetadata(_0x1bbda4,_0x426583[_0x5a0666(0x1e6)]??_0x5a0666(0x1cb),_0x5e1ec1,contentHash(_0x1bbda4[_0x5a0666(0x1b7)]??''),_0x426583[_0x5a0666(0x1ed)],_0x1cb280);writeJsonAtomic(resolve(_0x4dc67a,METADATA_FILE),_0x183f71);}export function deriveSkillCodeFromDirectory(_0x3f45a0,_0x550dfb){const _0x441bad=a141_0x2f84,_0x53dfcf=basename(resolve(_0x3f45a0)),_0x433d0a=_0x550dfb+'--';return _0x53dfcf[_0x441bad(0x1d3)](_0x433d0a)?_0x53dfcf[_0x441bad(0x1e4)](_0x433d0a[_0x441bad(0x1cd)]):_0x53dfcf;}function resolvePushSkillCode(_0x4db2bd,_0x384a84,_0x10fa97,_0x1f0354){const _0x547b9b=a141_0x2f84,_0x41f5e7=deriveSkillCodeFromSkillFile(_0x4db2bd)||deriveSkillCodeFromDirectory(_0x4db2bd,_0x384a84);if(_0x1f0354[_0x547b9b(0x1d8)])return _0x41f5e7;return _0x10fa97?.[_0x547b9b(0x1e7)]?.[_0x547b9b(0x1c7)]()||_0x41f5e7;}function deriveSkillCodeFromSkillFile(_0x4bdf60){const _0x37fbd4=a141_0x2f84,_0x1efb74=resolve(_0x4bdf60,SKILL_FILE);if(!existsSync(_0x1efb74)||!lstatSync(_0x1efb74)[_0x37fbd4(0x1eb)]())return undefined;const _0x25cc9f=readFileSync(_0x1efb74,'utf8'),_0x12c1c0=_0x25cc9f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x12c1c0)return undefined;const _0x250e57=parseFrontmatterObject(_0x12c1c0[0x1]??''),_0x4e7e53=scalarToString(_0x250e57?.['name']);return _0x4e7e53?slugifySkillName(_0x4e7e53):undefined;}function readSkillDisplayName(_0x5b4e2b){const _0x4f618d=a141_0x2f84,_0x9c0197=_0x5b4e2b[_0x4f618d(0x1d9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x9c0197)return undefined;const _0x30de31=parseFrontmatterObject(_0x9c0197[0x1]??'');return scalarToString(_0x30de31?.[_0x4f618d(0x1bd)]);}function slugifySkillName(_0xfca931){const _0x26f60c=a141_0x2f84,_0x59f1bd=_0xfca931[_0x26f60c(0x1c7)]()[_0x26f60c(0x1d7)]()[_0x26f60c(0x1e5)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x26f60c(0x1e5)](/^-+/,'')[_0x26f60c(0x1e5)](/-+$/,'')[_0x26f60c(0x1e5)](/-{2,}/g,'-');if(!_0x59f1bd)throw CliErrors[_0x26f60c(0x1dd)](_0x26f60c(0x1ec)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x59f1bd;}function parseFrontmatterObject(_0x47dbad){const _0x5c1f81=a141_0x2f84;try{const _0x5e8972=a141_0x550d9e(_0x47dbad);return _0x5e8972&&typeof _0x5e8972===_0x5c1f81(0x1b8)&&!Array['isArray'](_0x5e8972)?_0x5e8972:undefined;}catch{return undefined;}}function scalarToString(_0x37cd4b){const _0x5d4bdb=a141_0x2f84;if(typeof _0x37cd4b===_0x5d4bdb(0x1c3))return _0x37cd4b[_0x5d4bdb(0x1c7)]();if(typeof _0x37cd4b==='number'||typeof _0x37cd4b===_0x5d4bdb(0x1d6))return String(_0x37cd4b);return undefined;}function resolvePushDirectoryRoot(_0x3081e5){const _0x2ad061=a141_0x2f84,_0x1bb7cb=resolve(_0x3081e5);if(!existsSync(_0x1bb7cb))throw CliErrors[_0x2ad061(0x1dd)](_0x2ad061(0x1e3)+_0x3081e5);const _0x2dc814=lstatSync(_0x1bb7cb);if(_0x2dc814[_0x2ad061(0x1a9)]())return _0x1bb7cb;if(_0x2dc814[_0x2ad061(0x1dc)]()){const _0x1bba6c=realpathSync(_0x1bb7cb);if(lstatSync(_0x1bba6c)[_0x2ad061(0x1a9)]())return _0x1bba6c;}throw CliErrors[_0x2ad061(0x1dd)](_0x2ad061(0x1e3)+_0x3081e5);}function requireRemoteScope(_0x5b0774){const _0x298374=a141_0x2f84;if(_0x5b0774[_0x298374(0x1e6)]===_0x298374(0x1cb)||_0x5b0774['scope']===_0x298374(0x1c2)||_0x5b0774[_0x298374(0x1e6)]===_0x298374(0x1c4))return _0x5b0774['scope'];throw CliErrors[_0x298374(0x1dd)](_0x298374(0x1ca)+(_0x5b0774['skillCode']||'(unknown)')+_0x298374(0x1ad)+(_0x5b0774[_0x298374(0x1e6)]??_0x298374(0x1ea))+'\x22.');}function readLocalSkillContent(_0x486b42){const _0x133836=a141_0x2f84,_0x522e1c=resolve(_0x486b42,SKILL_FILE);return existsSync(_0x522e1c)&&lstatSync(_0x522e1c)[_0x133836(0x1eb)]()?readFileSync(_0x522e1c,_0x133836(0x1bf)):'';}function readPushMetadataIfPresent(_0x9cbb9e,_0x365ce6={}){const _0x3759d0=a141_0x2f84;try{return readMetadataIfPresent(_0x9cbb9e);}catch(_0x43d4e8){if(_0x365ce6[_0x3759d0(0x1e9)])return undefined;throw _0x43d4e8;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1dac8e,_0x3bf7ee){const _0x237b6d=a142_0x4de1,_0x35691a=_0x1dac8e();while(!![]){try{const _0x1a7ed4=parseInt(_0x237b6d(0x1ec))/0x1*(parseInt(_0x237b6d(0x1f0))/0x2)+parseInt(_0x237b6d(0x1e2))/0x3*(-parseInt(_0x237b6d(0x1f1))/0x4)+parseInt(_0x237b6d(0x1eb))/0x5*(parseInt(_0x237b6d(0x1e6))/0x6)+-parseInt(_0x237b6d(0x1e4))/0x7*(parseInt(_0x237b6d(0x1e1))/0x8)+-parseInt(_0x237b6d(0x1e5))/0x9+parseInt(_0x237b6d(0x1e7))/0xa*(-parseInt(_0x237b6d(0x1ef))/0xb)+parseInt(_0x237b6d(0x1e9))/0xc;if(_0x1a7ed4===_0x3bf7ee)break;else _0x35691a['push'](_0x35691a['shift']());}catch(_0x444cf0){_0x35691a['push'](_0x35691a['shift']());}}}(a142_0x9fb2,0x74528));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x5e56fd){const _0x13fb9e=a142_0x4de1,_0x1be531=_0x5e56fd&&_0x5e56fd[_0x13fb9e(0x1e8)]>0x0?_0x5e56fd:['personal','company',_0x13fb9e(0x1ed)],_0x130fb1=[];for(const _0x3cfd9a of _0x1be531){if(!isRuntimeSkillScope(_0x3cfd9a))throw CliErrors[_0x13fb9e(0x1e3)](_0x13fb9e(0x1ea)+_0x3cfd9a);!_0x130fb1['includes'](_0x3cfd9a)&&_0x130fb1[_0x13fb9e(0x1e0)](_0x3cfd9a);}return _0x130fb1;}function a142_0x4de1(_0x8aee7e,_0x5add26){_0x8aee7e=_0x8aee7e-0x1e0;const _0x9fb22=a142_0x9fb2();let _0x4de13a=_0x9fb22[_0x8aee7e];return _0x4de13a;}export function isRuntimeSkillScope(_0x12a587){const _0x3a073e=a142_0x4de1;return _0x12a587===_0x3a073e(0x1ee)||_0x12a587===_0x3a073e(0x1f2)||_0x12a587==='builtin';}function a142_0x9fb2(){const _0x5aad47=['builtin','personal','22zJpimb','87586BMZQvr','8svdsbG','company','push','88024dsCuFR','240981EBPqXK','validation','35rhIFKD','7761519jGpFBN','858mYYYVE','1325380uvdaFL','length','13793964EpnMMJ','Unsupported\x20runtime\x20Skill\x20scope:\x20','17305MHCPWL','4YIDiJe'];a142_0x9fb2=function(){return _0x5aad47;};return a142_0x9fb2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5273a5,_0x468069){const _0x6e34e1=a144_0x3310,_0x2d006e=_0x5273a5();while(!![]){try{const _0x25d6e2=-parseInt(_0x6e34e1(0xb5))/0x1+parseInt(_0x6e34e1(0xb8))/0x2*(parseInt(_0x6e34e1(0xbf))/0x3)+parseInt(_0x6e34e1(0xbd))/0x4+-parseInt(_0x6e34e1(0xc5))/0x5+-parseInt(_0x6e34e1(0xbc))/0x6+-parseInt(_0x6e34e1(0xb9))/0x7*(parseInt(_0x6e34e1(0xc2))/0x8)+parseInt(_0x6e34e1(0xba))/0x9*(parseInt(_0x6e34e1(0xbe))/0xa);if(_0x25d6e2===_0x468069)break;else _0x2d006e['push'](_0x2d006e['shift']());}catch(_0x4413c8){_0x2d006e['push'](_0x2d006e['shift']());}}}(a144_0x526c,0x806bc));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a144_0x3310(_0x549c87,_0xf75e09){_0x549c87=_0x549c87-0xb3;const _0x526cc9=a144_0x526c();let _0x331065=_0x526cc9[_0x549c87];return _0x331065;}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0x6237bd){const _0x32069e=a144_0x3310,_0x16a33d={};for(const _0x2c35cc of normalizeLocalFiles(_0x6237bd)){_0x16a33d[_0x2c35cc['path']]=fileContent(_0x2c35cc);}return Buffer[_0x32069e(0xbb)](zipSync(_0x16a33d,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x4dafed){const _0xedce84=a144_0x3310;if(_0x4dafed[_0xedce84(0xb7)]<0x16)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x1cc8e7;try{_0x1cc8e7=unzipSync(_0x4dafed,{'filter'(_0x50c8d3){const _0x43d240=_0xedce84,_0xd441ad=normalizeSkillRelativePath(_0x50c8d3[_0x43d240(0xb3)]);if(_0xd441ad[_0x43d240(0xc6)]('/'))throw CliErrors[_0x43d240(0xc3)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0xd441ad);return!![];}});}catch(_0x5da964){if(isRuntimeSkillValidationError(_0x5da964))throw _0x5da964;throw CliErrors['validation'](_0xedce84(0xb6));}return Object[_0xedce84(0xc4)](_0x1cc8e7)['map'](([_0x15a858,_0x56c896])=>({'path':normalizeSkillRelativePath(_0x15a858),'bytes':Buffer[_0xedce84(0xbb)](_0x56c896)}))[_0xedce84(0xb4)](compareSkillFiles);}function a144_0x526c(){const _0x12703f=['1246224SDasId','3207064dbinea','410DELeCU','33qceYCP','object','validation_error','1064kZKRxu','validation','entries','5053470rqzhet','endsWith','name','sort','331962echfYy','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','138538xSUnAp','14161iBjPSZ','171594lhsSQR','from'];a144_0x526c=function(){return _0x12703f;};return a144_0x526c();}function isRuntimeSkillValidationError(_0x29f6e7){const _0x1c2f18=a144_0x3310;return typeof _0x29f6e7===_0x1c2f18(0xc0)&&_0x29f6e7!==null&&'code'in _0x29f6e7&&_0x29f6e7['code']===_0x1c2f18(0xc1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40cbcd,_0x45af35){const _0x49ae19=a145_0x15ab,_0x4c7954=_0x40cbcd();while(!![]){try{const _0x2543ab=-parseInt(_0x49ae19(0xb0))/0x1*(-parseInt(_0x49ae19(0x90))/0x2)+parseInt(_0x49ae19(0xa1))/0x3+parseInt(_0x49ae19(0xaf))/0x4*(-parseInt(_0x49ae19(0x97))/0x5)+parseInt(_0x49ae19(0xa5))/0x6+-parseInt(_0x49ae19(0xa7))/0x7+-parseInt(_0x49ae19(0x96))/0x8+-parseInt(_0x49ae19(0x91))/0x9*(-parseInt(_0x49ae19(0x9b))/0xa);if(_0x2543ab===_0x45af35)break;else _0x4c7954['push'](_0x4c7954['shift']());}catch(_0x48ed44){_0x4c7954['push'](_0x4c7954['shift']());}}}(a145_0x1e2c,0x342b0));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(_0x3fd34){const _0x49b134=a145_0x15ab,_0x492c9a=normalizeLocalFiles(_0x3fd34);if(!_0x492c9a['some'](_0xaad9d9=>_0xaad9d9[_0x49b134(0xad)]===SKILL_FILE))throw CliErrors[_0x49b134(0xa9)](_0x49b134(0xa3)+SKILL_FILE+_0x49b134(0x93));const _0x45ff95=localFilesToManifestFiles(_0x492c9a),_0x28c82d=createDeterministicZipPackage(_0x492c9a);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x45ff95),'zipSha256':bufferSha256(_0x28c82d),'zipSize':_0x28c82d[_0x49b134(0xb6)],'files':_0x45ff95},'packageBytes':_0x28c82d,'packageBase64':_0x28c82d['toString'](_0x49b134(0xa4))};}function a145_0x1e2c(){const _0x4d2ed9=['Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','30552bqmDcu','10DPDzOw','zipSha256','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','isSafeInteger','20ZnKBrd','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','zipSize','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','bytes','Runtime\x20Skill\x20package\x20is\x20missing\x20','408423FgJuez','toLowerCase','Missing\x20','base64','1062282aYRfSe','trim','1074654yvxrqH','map','validation','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','string','path','some','622940fNCXvl','271517yfalUc','schemaVersion','isArray','sha256','object','Runtime\x20Skill\x20package\x20size\x20mismatch.','length','files','size','push','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','set','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','treeSha256','2lNcpOv','440037sdNoFF','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','\x20in\x20Skill\x20file\x20package.','ossPath'];a145_0x1e2c=function(){return _0x4d2ed9;};return a145_0x1e2c();}export function verifyRuntimeSkillPackage(_0x17a9e8,_0x4b6a83){const _0xc51465=a145_0x15ab,_0x33cdb5=normalizePackageManifest(_0x17a9e8,{'requireOssPath':![]});if(!_0x33cdb5)throw CliErrors[_0xc51465(0xa9)](_0xc51465(0xaa));return extractAndVerifyPackage(_0x33cdb5,_0x4b6a83);}function a145_0x15ab(_0x72aa09,_0x4a7659){_0x72aa09=_0x72aa09-0x8a;const _0x1e2cf8=a145_0x1e2c();let _0x15ab12=_0x1e2cf8[_0x72aa09];return _0x15ab12;}export function verifyRuntimeSkillBundle(_0x38d87c,_0x23cfe5){const _0x1a8f7c=a145_0x15ab,_0x4a4d84=normalizePackageManifest(_0x38d87c,{'requireOssPath':![]});if(!_0x4a4d84)throw CliErrors['validation'](_0x1a8f7c(0xaa));return extractAndVerifyPackageFiles(_0x4a4d84,_0x23cfe5);}export function tryNormalizePackageManifest(_0xa7d831){return normalizePackageManifest(_0xa7d831,{'requireOssPath':![]});}export function requirePackageBytes(_0x345b37,_0x518573){const _0x405561=a145_0x15ab;if(!_0x518573||_0x518573['length']===0x0)throw CliErrors['validation'](_0x405561(0x99)+_0x345b37);return _0x518573;}export function extractDownloadedPackage(_0x40b13a){const _0x5d227e=a145_0x15ab,_0x391080=parseZipPackage(_0x40b13a)[_0x5d227e(0xa8)](_0x1c32ff=>({'path':_0x1c32ff[_0x5d227e(0xad)],'bytes':_0x1c32ff[_0x5d227e(0x9f)]}));if(!_0x391080[_0x5d227e(0xae)](_0x1de0c1=>_0x1de0c1[_0x5d227e(0xad)]===SKILL_FILE))throw CliErrors[_0x5d227e(0xa9)](_0x5d227e(0xa0)+SKILL_FILE+'.');return normalizeLocalFiles(_0x391080);}export function localFilesToManifestFiles(_0x44ed1e){const _0x4a0cd6=a145_0x15ab;return normalizeLocalFiles(_0x44ed1e)[_0x4a0cd6(0xa8)](_0x13baaa=>({'path':_0x13baaa[_0x4a0cd6(0xad)],'sha256':fileHash(_0x13baaa),'size':fileContent(_0x13baaa)[_0x4a0cd6(0xb6)]}));}function normalizePackageManifest(_0x334024,_0x13a4eb){const _0x48439e=a145_0x15ab;if(!_0x334024||typeof _0x334024!==_0x48439e(0xb4)||Array[_0x48439e(0xb2)](_0x334024))return undefined;const _0x3221db=_0x334024,_0x8c761c=typeof _0x3221db[_0x48439e(0x94)]===_0x48439e(0xac)?_0x3221db[_0x48439e(0x94)][_0x48439e(0xa6)]():undefined;if(_0x13a4eb['requireOssPath']&&!_0x8c761c)return undefined;if(!Array[_0x48439e(0xb2)](_0x3221db[_0x48439e(0xb7)])||_0x3221db[_0x48439e(0xb7)][_0x48439e(0xb6)]===0x0)return undefined;if(!isSha256Hex(_0x3221db['treeSha256']))throw CliErrors['validation'](_0x48439e(0xab));if(!isSha256Hex(_0x3221db[_0x48439e(0x98)]))throw CliErrors[_0x48439e(0xa9)](_0x48439e(0x8e));if(!Number[_0x48439e(0x9a)](_0x3221db[_0x48439e(0x9d)])||_0x3221db[_0x48439e(0x9d)]<0x0)throw CliErrors[_0x48439e(0xa9)]('Runtime\x20Skill\x20package\x20size\x20is\x20invalid.');const _0x28e09d=normalizeManifestFiles(_0x3221db[_0x48439e(0xb7)]);if(!_0x28e09d[_0x48439e(0xae)](_0x162520=>_0x162520[_0x48439e(0xad)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x14d8a0=fileTreeHash(_0x28e09d);if(_0x14d8a0!==_0x3221db[_0x48439e(0x8f)][_0x48439e(0xa2)]())throw CliErrors[_0x48439e(0xa9)](_0x48439e(0x95));return{'schemaVersion':Number[_0x48439e(0x9a)](_0x3221db['schemaVersion'])?_0x3221db[_0x48439e(0xb1)]:0x2,'ossPath':_0x8c761c,'treeSha256':_0x14d8a0,'zipSha256':_0x3221db[_0x48439e(0x98)][_0x48439e(0xa2)](),'zipSize':_0x3221db['zipSize'],'files':_0x28e09d};}function extractAndVerifyPackage(_0x25bc54,_0x31f67e){const _0x3f9119=a145_0x15ab,_0xa99c37=normalizePackageManifest(_0x25bc54,{'requireOssPath':![]});if(!_0xa99c37)throw CliErrors[_0x3f9119(0xa9)](_0x3f9119(0xaa));if(_0x31f67e[_0x3f9119(0xb6)]!==_0xa99c37[_0x3f9119(0x9d)])throw CliErrors[_0x3f9119(0xa9)](_0x3f9119(0xb5));const _0x1fda13=bufferSha256(_0x31f67e);if(_0x1fda13!==_0xa99c37[_0x3f9119(0x98)])throw CliErrors[_0x3f9119(0xa9)](_0x3f9119(0x9e));return extractAndVerifyPackageFiles(_0xa99c37,_0x31f67e);}function extractAndVerifyPackageFiles(_0x35c4a4,_0x571306){const _0x1cda09=a145_0x15ab,_0x17cfec=parseZipPackage(_0x571306);if(_0x17cfec[_0x1cda09(0xb6)]!==_0x35c4a4[_0x1cda09(0xb7)][_0x1cda09(0xb6)])throw CliErrors[_0x1cda09(0xa9)](_0x1cda09(0x92));const _0x9d72b1=new Map();for(const _0x1ed04e of _0x17cfec){if(_0x9d72b1['has'](_0x1ed04e[_0x1cda09(0xad)]))throw CliErrors[_0x1cda09(0xa9)]('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x1ed04e['path']);_0x9d72b1[_0x1cda09(0x8d)](_0x1ed04e[_0x1cda09(0xad)],_0x1ed04e);}const _0x55dcbc=[];for(const _0x44df83 of _0x35c4a4['files']){const _0x15c4a9=_0x9d72b1['get'](_0x44df83['path']);if(!_0x15c4a9)throw CliErrors[_0x1cda09(0xa9)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x44df83[_0x1cda09(0xad)]);if(_0x15c4a9['bytes'][_0x1cda09(0xb6)]!==_0x44df83[_0x1cda09(0x8a)])throw CliErrors['validation'](_0x1cda09(0x9c)+_0x44df83[_0x1cda09(0xad)]);const _0x4b7396=bufferSha256(_0x15c4a9[_0x1cda09(0x9f)]);if(_0x4b7396!==_0x44df83[_0x1cda09(0xb3)])throw CliErrors[_0x1cda09(0xa9)](_0x1cda09(0x8c)+_0x44df83[_0x1cda09(0xad)]);_0x55dcbc[_0x1cda09(0x8b)]({'path':_0x44df83[_0x1cda09(0xad)],'bytes':_0x15c4a9[_0x1cda09(0x9f)]});}return normalizeLocalFiles(_0x55dcbc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e3e42,_0x31913a){var _0x23c078=a146_0x4c14,_0x17d634=_0x3e3e42();while(!![]){try{var _0x25e2e2=parseInt(_0x23c078(0x16d))/0x1+-parseInt(_0x23c078(0x16f))/0x2*(-parseInt(_0x23c078(0x168))/0x3)+parseInt(_0x23c078(0x16a))/0x4+parseInt(_0x23c078(0x16b))/0x5+-parseInt(_0x23c078(0x167))/0x6*(parseInt(_0x23c078(0x16c))/0x7)+-parseInt(_0x23c078(0x166))/0x8+-parseInt(_0x23c078(0x16e))/0x9*(parseInt(_0x23c078(0x169))/0xa);if(_0x25e2e2===_0x31913a)break;else _0x17d634['push'](_0x17d634['shift']());}catch(_0x5adbe7){_0x17d634['push'](_0x17d634['shift']());}}}(a146_0x4187,0xb9c54));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_0x4187(){var _0x347844=['1028852uttyEg','3397600cMvEIq','7rhJaKf','793950IltiJi','9RjWwtI','112550xjKQKe','2349856YFzUlJ','5903418ScHufv','39saDFxq','4237070eiRaVI'];a146_0x4187=function(){return _0x347844;};return a146_0x4187();}export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';function a146_0x4c14(_0x2dc844,_0x33509c){_0x2dc844=_0x2dc844-0x166;var _0x418773=a146_0x4187();var _0x4c1496=_0x418773[_0x2dc844];return _0x4c1496;}export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a147_0x305831=a147_0x4c9a;(function(_0x327d13,_0x20fe1b){const _0x228979=a147_0x4c9a,_0x473135=_0x327d13();while(!![]){try{const _0x5b004b=parseInt(_0x228979(0x16b))/0x1*(parseInt(_0x228979(0x187))/0x2)+parseInt(_0x228979(0x186))/0x3+-parseInt(_0x228979(0x17a))/0x4*(parseInt(_0x228979(0x189))/0x5)+-parseInt(_0x228979(0x173))/0x6*(-parseInt(_0x228979(0x17e))/0x7)+parseInt(_0x228979(0x18e))/0x8*(parseInt(_0x228979(0x18d))/0x9)+-parseInt(_0x228979(0x17f))/0xa+-parseInt(_0x228979(0x18c))/0xb;if(_0x5b004b===_0x20fe1b)break;else _0x473135['push'](_0x473135['shift']());}catch(_0x15af91){_0x473135['push'](_0x473135['shift']());}}}(a147_0x5a77,0x79715));function a147_0x5a77(){const _0xe9abd6=['find','\x20records\x20\x22','absent','message','lockFile','SKILL.md','2651151tXWQrJ','218hldVlM','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','293215blifBe','reason','.agents','14794714fhgAtN','288621mJGiEd','208ohDAfo','number','kind','parse','\x20has\x20no\x20skills\x20map','2741NyutzN','home','includes','version','join','recorded','skills','\x20uses\x20unsupported\x20version\x20','1758tNVKOD','globalSkillsDirs','map','.claude','\x20is\x20unreadable:\x20','unverifiable','not-recorded','4oMPFji','.skill-lock.json','present','unusable','18494xHATED','8893400SUTadU'];a147_0x5a77=function(){return _0xe9abd6;};return a147_0x5a77();}import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';function a147_0x4c9a(_0x48fd80,_0x50fe58){_0x48fd80=_0x48fd80-0x168;const _0x5a777e=a147_0x5a77();let _0x4c9a85=_0x5a777e[_0x48fd80];return _0x4c9a85;}export const SKILL_LOCK_RELATIVE_PATH=join(a147_0x305831(0x18b),a147_0x305831(0x17b));export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a147_0x305831(0x18b),a147_0x305831(0x171)),join(a147_0x305831(0x176),a147_0x305831(0x171))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x319d60,_0x529571){const _0x550550=a147_0x305831;if(!existsSync(_0x319d60))return{'kind':_0x550550(0x179)};let _0x3d5637;try{_0x3d5637=JSON[_0x550550(0x169)](readFileSync(_0x319d60,'utf8'));}catch(_0x159f47){return{'kind':_0x550550(0x17d),'reason':_0x319d60+_0x550550(0x177)+_0x159f47[_0x550550(0x183)]};}const _0x4f8b13=_0x3d5637;if(typeof _0x4f8b13?.['version']!==_0x550550(0x18f)||!SUPPORTED_LOCK_VERSIONS[_0x550550(0x16d)](_0x4f8b13[_0x550550(0x16e)]))return{'kind':'unusable','reason':_0x319d60+_0x550550(0x172)+String(_0x4f8b13?.[_0x550550(0x16e)])};if(!_0x4f8b13[_0x550550(0x171)]||typeof _0x4f8b13[_0x550550(0x171)]!=='object')return{'kind':_0x550550(0x17d),'reason':_0x319d60+_0x550550(0x16a)};return _0x4f8b13[_0x550550(0x171)][_0x529571]?{'kind':_0x550550(0x170)}:{'kind':_0x550550(0x179)};}export function resolveInstalledSkill(_0x1612ee,_0x3822bc){const _0x2c3bc7=a147_0x305831,_0x2eb971=_0x3822bc?.[_0x2c3bc7(0x16c)]??homedir(),_0x127161=_0x3822bc?.[_0x2c3bc7(0x174)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x2c3bc7(0x175)](_0x41a7=>join(_0x2eb971,_0x41a7)),_0x2e2db0=_0x3822bc?.[_0x2c3bc7(0x184)]??join(_0x2eb971,SKILL_LOCK_RELATIVE_PATH),_0x39dd8b=_0x127161['map'](_0x419130=>join(_0x419130,_0x1612ee,_0x2c3bc7(0x185))),_0x406b08=_0x39dd8b[_0x2c3bc7(0x180)](_0x581381=>existsSync(_0x581381));if(_0x406b08)return{'state':_0x2c3bc7(0x17c),'path':_0x406b08};const _0x104417=readLockLookup(_0x2e2db0,_0x1612ee);if(_0x104417[_0x2c3bc7(0x168)]==='unusable')return{'state':_0x2c3bc7(0x178),'reason':_0x104417[_0x2c3bc7(0x18a)]};if(_0x104417[_0x2c3bc7(0x168)]==='recorded')return{'state':_0x2c3bc7(0x178),'reason':_0x2e2db0+_0x2c3bc7(0x181)+_0x1612ee+_0x2c3bc7(0x188)+('('+_0x39dd8b[_0x2c3bc7(0x16f)](',\x20')+')')};return{'state':_0x2c3bc7(0x182),'checked':_0x39dd8b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbd9aa8,_0x4f60ef){const _0x37f56c=a148_0x55f4,_0x3076d7=_0xbd9aa8();while(!![]){try{const _0x1d3757=parseInt(_0x37f56c(0xe9))/0x1+parseInt(_0x37f56c(0xe1))/0x2*(-parseInt(_0x37f56c(0xe3))/0x3)+parseInt(_0x37f56c(0xe2))/0x4*(parseInt(_0x37f56c(0xeb))/0x5)+parseInt(_0x37f56c(0xe7))/0x6+parseInt(_0x37f56c(0xe6))/0x7*(parseInt(_0x37f56c(0xea))/0x8)+parseInt(_0x37f56c(0xe5))/0x9+-parseInt(_0x37f56c(0xe4))/0xa*(parseInt(_0x37f56c(0xe8))/0xb);if(_0x1d3757===_0x4f60ef)break;else _0x3076d7['push'](_0x3076d7['shift']());}catch(_0x252005){_0x3076d7['push'](_0x3076d7['shift']());}}}(a148_0x5c6b,0xa1ee5));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a148_0x55f4(_0x3f0232,_0x41261e){_0x3f0232=_0x3f0232-0xe1;const _0x5c6b15=a148_0x5c6b();let _0x55f484=_0x5c6b15[_0x3f0232];return _0x55f484;}function a148_0x5c6b(){const _0x932941=['6298092VPigiR','9852447XdnyOb','350945TMVQJa','8zhBGzp','35kLmKrM','12fXmlco','674736PFbKUl','637662QPJYmD','10ovzEaB','1955511fxfKRf','249032niAcni'];a148_0x5c6b=function(){return _0x932941;};return a148_0x5c6b();}
|