@lovrabet/lovrabet-cli 2.3.0-beta.4 → 2.3.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.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/domain-config.js +1 -1
- package/lib/config/schema.d.ts +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.d.ts +1 -0
- 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.d.ts +9 -7
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x1c03b9=a133_0x330f;(function(_0x28819c,_0x13da33){const _0x4fd9b9=a133_0x330f,_0x3a23bd=_0x28819c();while(!![]){try{const _0x3ed669=parseInt(_0x4fd9b9(0x1f9))/0x1*(parseInt(_0x4fd9b9(0x1ec))/0x2)+-parseInt(_0x4fd9b9(0x1df))/0x3+-parseInt(_0x4fd9b9(0x1f2))/0x4*(-parseInt(_0x4fd9b9(0x1d0))/0x5)+-parseInt(_0x4fd9b9(0x1da))/0x6+-parseInt(_0x4fd9b9(0x1d9))/0x7*(parseInt(_0x4fd9b9(0x1e1))/0x8)+-parseInt(_0x4fd9b9(0x1fd))/0x9*(parseInt(_0x4fd9b9(0x1e7))/0xa)+parseInt(_0x4fd9b9(0x1d3))/0xb*(parseInt(_0x4fd9b9(0x1f8))/0xc);if(_0x3ed669===_0x13da33)break;else _0x3a23bd['push'](_0x3a23bd['shift']());}catch(_0x51df8b){_0x3a23bd['push'](_0x3a23bd['shift']());}}}(a133_0x491c,0x1e36b));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a133_0x4663fa}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';import{resolveInstalledSkill}from'../skills/skill-presence.js';export const LOVRABET_SKILL_SOURCE=a133_0x4663fa;export const LOVRABET_SKILL_GIT_SOURCE=PRODUCT_CONFIG[a133_0x1c03b9(0x1dc)];export const LOVRABET_GLOBAL_SKILL_NAME=PRODUCT_CONFIG[a133_0x1c03b9(0x1de)];export function resolveGlobalSkillName(_0x5c5ac4){const _0x1cb01d=a133_0x1c03b9;switch(_0x5c5ac4[_0x1cb01d(0x1f4)]()){case LOVRABET_SKILL_SOURCE:case LOVRABET_SKILL_GIT_SOURCE:return LOVRABET_GLOBAL_SKILL_NAME;default:return undefined;}}function a133_0x330f(_0x19e48f,_0xc1e23){_0x19e48f=_0x19e48f-0x1c8;const _0x491ce4=a133_0x491c();let _0x330fcc=_0x491ce4[_0x19e48f];return _0x330fcc;}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a133_0x1c03b9(0x1eb)]);const CHILD_OUTPUT_MAX_BUFFER=0x10*0x400*0x400;function a133_0x491c(){const _0x5a0dd7=['expectedSkillName','skipNpxSkillsEnvSuffix','33622yPaSVi','\x20failed\x20target(s)','!\x20Could\x20not\x20verify\x20\x22','\x22\x20install\x20state:\x20','Installer\x20reported\x20','error','284ZFlFiZ','reason','trim','INSTALL_PARTIAL','SPAWN_FAILED','Skill\x20\x22','7587348MZCjPp','2QKFPcE','EACCES','absent','unverifiable','398421YOyiUJ','warn','state','npx','EPERM','status','code','checked','pipe','12210zgLbvZ','presence','stderr','11cAEkUw','stdout','log','ENOENT','unknown','signal','17941jCtVjy','1378752StpgEr','CHILD_TERMINATED','internalSkillSource','SKILL_NOT_INSTALLED','globalSkillName','601635KWATxA','stdio','752iAKhWT','CHILD_EXIT_NONZERO','NPX_NOT_FOUND','join','add','toString','10XFuIKa','PERMISSION_DENIED','npx\x20terminated\x20by\x20signal\x20'];a133_0x491c=function(){return _0x5a0dd7;};return a133_0x491c();}function failure(_0x1f20f2,_0x38a9ec,_0x5596db){return{'ok':![],'status':_0x38a9ec,'code':_0x1f20f2,'error':'['+_0x1f20f2+']\x20'+_0x5596db};}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x20a496,_0x2d746a=LOVRABET_SKILL_SOURCE,_0x525faf){const _0x56b736=a133_0x1c03b9;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x11039a=resolveNpmBin(_0x56b736(0x1ca)),_0x453425=['-y','skills@latest',_0x56b736(0x1e5),_0x2d746a,'-g','-y'],_0x5db483=[_0x11039a,..._0x453425]['join']('\x20');console[_0x56b736(0x1d5)]('*\x20'+_0x5db483);const _0x451c44={...process.env};delete _0x451c44['npm_config_global'],delete _0x451c44['NPM_CONFIG_GLOBAL'];const _0x4ade7d=spawnSync(_0x11039a,_0x453425,{'cwd':_0x20a496,'stdio':_0x56b736(0x1cf),'env':_0x451c44,'shell':![],'maxBuffer':CHILD_OUTPUT_MAX_BUFFER}),_0x424a0f=[_0x4ade7d[_0x56b736(0x1d4)]?_0x4ade7d[_0x56b736(0x1d4)][_0x56b736(0x1e6)]():'',_0x4ade7d['stderr']?_0x4ade7d[_0x56b736(0x1d2)][_0x56b736(0x1e6)]():'']['filter'](Boolean)[_0x56b736(0x1e4)]('\x0a')[_0x56b736(0x1f4)]();_0x525faf?.[_0x56b736(0x1e0)]!==_0x56b736(0x1cf)&&_0x424a0f&&console['log'](_0x424a0f);if(_0x4ade7d[_0x56b736(0x1f1)]){const _0x2320cc=_0x4ade7d[_0x56b736(0x1f1)],_0x307ad9=_0x2320cc[_0x56b736(0x1cd)]===_0x56b736(0x1d6)?_0x56b736(0x1e3):_0x2320cc[_0x56b736(0x1cd)]===_0x56b736(0x1cb)||_0x2320cc[_0x56b736(0x1cd)]===_0x56b736(0x1fa)?_0x56b736(0x1e8):_0x56b736(0x1f6);return failure(_0x307ad9,_0x4ade7d[_0x56b736(0x1cc)],_0x2320cc['message']);}if(_0x4ade7d[_0x56b736(0x1d8)])return failure(_0x56b736(0x1db),_0x4ade7d[_0x56b736(0x1cc)],_0x56b736(0x1e9)+_0x4ade7d[_0x56b736(0x1d8)]);if(_0x4ade7d['status']!==0x0)return failure(_0x56b736(0x1e2),_0x4ade7d['status'],_0x424a0f||'exit\x20'+(_0x4ade7d[_0x56b736(0x1cc)]??_0x56b736(0x1d7)));const _0x825b2=_0x525faf?.[_0x56b736(0x1ea)]??resolveGlobalSkillName(_0x2d746a),_0x5b6a74=_0x825b2?resolveInstalledSkill(_0x825b2,_0x525faf?.[_0x56b736(0x1d1)]):undefined,_0xc02a65=_0x424a0f['match'](/Failed to install\s+(\d+)/i);if(_0xc02a65&&Number(_0xc02a65[0x1])>0x0){const _0xa820da=_0x56b736(0x1f0)+_0xc02a65[0x1]+_0x56b736(0x1ed)+(_0x424a0f?':\x0a'+_0x424a0f:'');if(_0x5b6a74?.[_0x56b736(0x1c9)]==='present')return console['warn']('!\x20'+_0xa820da),{'ok':!![],'status':0x0};return failure(_0x56b736(0x1f5),0x0,_0xa820da);}if(_0x825b2&&_0x5b6a74){if(_0x5b6a74[_0x56b736(0x1c9)]===_0x56b736(0x1fb))return failure(_0x56b736(0x1dd),0x0,_0x56b736(0x1f7)+_0x825b2+'\x22\x20not\x20found\x20after\x20install\x20(checked\x20'+_0x5b6a74[_0x56b736(0x1ce)][_0x56b736(0x1e4)](',\x20')+')');_0x5b6a74['state']===_0x56b736(0x1fc)&&console[_0x56b736(0x1c8)](_0x56b736(0x1ee)+_0x825b2+_0x56b736(0x1ef)+_0x5b6a74[_0x56b736(0x1f3)]);}return{'ok':!![],'status':0x0};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x19dbfe=a134_0x3670;(function(_0x24a612,_0x22a59d){const _0x2e64eb=a134_0x3670,_0x5d55c4=_0x24a612();while(!![]){try{const _0x599380=-parseInt(_0x2e64eb(0x84))/0x1*(parseInt(_0x2e64eb(0x92))/0x2)+parseInt(_0x2e64eb(0x87))/0x3*(parseInt(_0x2e64eb(0x8e))/0x4)+-parseInt(_0x2e64eb(0x7f))/0x5*(parseInt(_0x2e64eb(0x89))/0x6)+-parseInt(_0x2e64eb(0x8f))/0x7+parseInt(_0x2e64eb(0x91))/0x8*(parseInt(_0x2e64eb(0x8d))/0x9)+-parseInt(_0x2e64eb(0x81))/0xa+-parseInt(_0x2e64eb(0x88))/0xb*(-parseInt(_0x2e64eb(0x86))/0xc);if(_0x599380===_0x22a59d)break;else _0x5d55c4['push'](_0x5d55c4['shift']());}catch(_0x32f255){_0x5d55c4['push'](_0x5d55c4['shift']());}}}(a134_0x2677,0x964a6));function a134_0x3670(_0x407231,_0x3a6563){_0x407231=_0x407231-0x7f;const _0x267775=a134_0x2677();let _0x3670b5=_0x267775[_0x407231];return _0x3670b5;}export const METADATA_FILE=a134_0x19dbfe(0x83);function a134_0x2677(){const _0x2a3b08=['dist','.cache','9wKvitM','176TqzXbe','6247941ycZWVD','build','1980672umDSbJ','129244Mectzy','.turbo','.DS_Store','12280UfGBYe','.svn','8741310WbjVaC','.next','lovrabet.skill.json','1DmHgWk','.git','72IrdgAz','46365Hipxtu','3055547VjWDde','360LEKVXW','coverage'];a134_0x2677=function(){return _0x2a3b08;};return a134_0x2677();}export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a134_0x19dbfe(0x94)]);export const IGNORED_DIR_NAMES=new Set([a134_0x19dbfe(0x85),'.hg',a134_0x19dbfe(0x80),'node_modules',a134_0x19dbfe(0x82),a134_0x19dbfe(0x8b),a134_0x19dbfe(0x90),a134_0x19dbfe(0x8a),a134_0x19dbfe(0x93),a134_0x19dbfe(0x8c)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4f5cfe,_0x31bebf){const _0x2dc2f9=a135_0x1d16,_0x900743=_0x4f5cfe();while(!![]){try{const _0x4584c7=-parseInt(_0x2dc2f9(0xfa))/0x1+-parseInt(_0x2dc2f9(0x100))/0x2+-parseInt(_0x2dc2f9(0xf6))/0x3+parseInt(_0x2dc2f9(0xf7))/0x4*(-parseInt(_0x2dc2f9(0xf8))/0x5)+parseInt(_0x2dc2f9(0x105))/0x6*(parseInt(_0x2dc2f9(0xfb))/0x7)+-parseInt(_0x2dc2f9(0x104))/0x8*(-parseInt(_0x2dc2f9(0xfd))/0x9)+-parseInt(_0x2dc2f9(0x106))/0xa*(-parseInt(_0x2dc2f9(0x103))/0xb);if(_0x4584c7===_0x31bebf)break;else _0x900743['push'](_0x900743['shift']());}catch(_0x56b96d){_0x900743['push'](_0x900743['shift']());}}}(a135_0x2e1a,0x32db9));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x5cfbfc,_0xca78cb){const _0x25a405=a135_0x1d16,_0x298511=normalizeSkillRelativePath(_0xca78cb),_0x3cbebd=realOrResolved(_0x5cfbfc),_0x1d11a1=resolve(_0x3cbebd,..._0x298511[_0x25a405(0xfc)]('/'));if(!isPathInside(_0x1d11a1,_0x3cbebd))throw CliErrors[_0x25a405(0xf3)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0xca78cb);return ensureNoSymlinkInManagedPath(_0x3cbebd,_0x298511),_0x1d11a1;}function a135_0x1d16(_0x260a38,_0x3f554c){_0x260a38=_0x260a38-0xf3;const _0x2e1a7d=a135_0x2e1a();let _0x1d16d6=_0x2e1a7d[_0x260a38];return _0x1d16d6;}export function ensureNoSymlinkInManagedPath(_0x59a391,_0x40f56d){const _0x582ab6=a135_0x1d16;let _0x32bb5e=_0x59a391;for(const _0x291624 of _0x40f56d['split']('/')){_0x32bb5e=resolve(_0x32bb5e,_0x291624);const _0x551f37=lstatIfPresent(_0x32bb5e);if(_0x551f37?.[_0x582ab6(0xf5)]())throw CliErrors[_0x582ab6(0xf3)](_0x582ab6(0x102)+_0x40f56d);}}export function isDanglingSymlink(_0x26b847){try{return lstatSync(_0x26b847)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0xe6a825){const _0x1cd4dd=readlinkSync(_0xe6a825);return isAbsolute(_0x1cd4dd)?_0x1cd4dd:resolve(dirname(_0xe6a825),_0x1cd4dd);}export function isPathInside(_0x276944,_0x46bc23){const _0x8ff39e=a135_0x1d16,_0x507829=_0x276944['endsWith'](sep)?_0x276944:''+_0x276944+sep,_0x36f3e5=_0x46bc23[_0x8ff39e(0xf4)](sep)?_0x46bc23:''+_0x46bc23+sep;return _0x276944===_0x46bc23||_0x507829[_0x8ff39e(0xfe)](_0x36f3e5);}export function realOrResolved(_0x53bf5f){try{return realpathSync(_0x53bf5f);}catch{return resolve(_0x53bf5f);}}function a135_0x2e1a(){const _0x558d3d=['2956275Wshymu','startsWith','utf8','560412VhkhEi','.tmp','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','3037089uoHeLF','8uBqmkG','156378rsIMzj','10gAixWt','validation','endsWith','isSymbolicLink','779301DOELIs','100388GKaOzr','35mEHxrh','from','19428ntprOx','91AQWNlH','split'];a135_0x2e1a=function(){return _0x558d3d;};return a135_0x2e1a();}export function lstatIfPresent(_0x42beb3){try{return lstatSync(_0x42beb3);}catch{return undefined;}}export function writeTextAtomic(_0x561ba2,_0x79da14,_0x74d3d8){const _0x56704b=a135_0x1d16;writeBytesAtomic(_0x561ba2,Buffer[_0x56704b(0xf9)](_0x79da14,_0x56704b(0xff)),_0x74d3d8);}export function writeBytesAtomic(_0x144063,_0x144d7e,_0x1213c9){const _0x31a8d6=a135_0x1d16,_0x4a9daf=_0x144063+_0x31a8d6(0x101);try{writeFileSync(_0x4a9daf,_0x144d7e,{'mode':_0x1213c9}),renameSync(_0x4a9daf,_0x144063);}catch(_0xcea32){try{rmSync(_0x4a9daf,{'force':!![]});}catch{}throw _0xcea32;}}export function writeJsonAtomic(_0x578e02,_0x6a03c2){writeTextAtomic(_0x578e02,JSON['stringify'](_0x6a03c2,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18e005,_0x4f9bc9){const _0x57010=a136_0x1149,_0x257d20=_0x18e005();while(!![]){try{const _0x58555b=-parseInt(_0x57010(0x66))/0x1*(-parseInt(_0x57010(0x74))/0x2)+-parseInt(_0x57010(0x71))/0x3*(-parseInt(_0x57010(0x72))/0x4)+-parseInt(_0x57010(0x76))/0x5*(parseInt(_0x57010(0x6e))/0x6)+-parseInt(_0x57010(0x6c))/0x7*(-parseInt(_0x57010(0x75))/0x8)+-parseInt(_0x57010(0x6a))/0x9+-parseInt(_0x57010(0x73))/0xa+parseInt(_0x57010(0x6d))/0xb;if(_0x58555b===_0x4f9bc9)break;else _0x257d20['push'](_0x257d20['shift']());}catch(_0x34f370){_0x257d20['push'](_0x257d20['shift']());}}}(a136_0x1491,0x1c344));import{createHash}from'node:crypto';function a136_0x1149(_0x67c1a,_0x467ce9){_0x67c1a=_0x67c1a-0x66;const _0x14913c=a136_0x1491();let _0x114915=_0x14913c[_0x67c1a];return _0x114915;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x21dbff){const _0x5bec2d=a136_0x1149;return createHash(_0x5bec2d(0x6f))['update'](_0x21dbff)[_0x5bec2d(0x69)](_0x5bec2d(0x6b));}function a136_0x1491(){const _0x19e6cd=['7YGmAFI','694804xIIjfR','6414JKifQx','sha256','update','9ZrfHHK','12708TQiXjE','41860lfdnSd','2KFObzE','1675232RDjwdy','1020VWtkEL','121289VTkpev','path','size','digest','590418mnaYYM','hex'];a136_0x1491=function(){return _0x19e6cd;};return a136_0x1491();}export function fileHash(_0x1fbf78){return bufferSha256(fileContent(_0x1fbf78));}export function bufferSha256(_0x42aa3d){return createHash('sha256')['update'](_0x42aa3d)['digest']('hex');}export function fileTreeHash(_0x4e2012){const _0x134c2e=a136_0x1149,_0x993834=createHash(_0x134c2e(0x6f));for(const _0x2f70fb of normalizeManifestFiles(_0x4e2012)){_0x993834[_0x134c2e(0x70)](_0x2f70fb[_0x134c2e(0x67)]),_0x993834[_0x134c2e(0x70)]('\x00'),_0x993834[_0x134c2e(0x70)](_0x2f70fb[_0x134c2e(0x6f)]),_0x993834[_0x134c2e(0x70)]('\x00'),_0x993834['update'](String(_0x2f70fb[_0x134c2e(0x68)])),_0x993834[_0x134c2e(0x70)]('\x00');}return _0x993834['digest']('hex');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a137_0x7adf(_0x4a2223,_0xf0ba35){_0x4a2223=_0x4a2223-0x1f4;const _0xe60d1d=a137_0xe60d();let _0x7adfc=_0xe60d1d[_0x4a2223];return _0x7adfc;}function a137_0xe60d(){const _0x1532dd=['project','1436LMELly','13991700kaSyzZ','263406DARLeL','450EdCXDD','37244durOHb','16PgqwVm','552150Mxvcem','78eyVHiP','appCode','global','managedRoot','.agents','skills','cwd','1119839xoGnei','284740ZTCYzA'];a137_0xe60d=function(){return _0x1532dd;};return a137_0xe60d();}const a137_0x44825e=a137_0x7adf;(function(_0x3ca448,_0x3170d9){const _0x31bb4e=a137_0x7adf,_0x4d232a=_0x3ca448();while(!![]){try{const _0x185f6d=-parseInt(_0x31bb4e(0x1fa))/0x1+parseInt(_0x31bb4e(0x200))/0x2*(-parseInt(_0x31bb4e(0x203))/0x3)+parseInt(_0x31bb4e(0x1fc))/0x4*(-parseInt(_0x31bb4e(0x1ff))/0x5)+parseInt(_0x31bb4e(0x1fe))/0x6+-parseInt(_0x31bb4e(0x1f9))/0x7*(parseInt(_0x31bb4e(0x201))/0x8)+-parseInt(_0x31bb4e(0x202))/0x9+parseInt(_0x31bb4e(0x1fd))/0xa;if(_0x185f6d===_0x3170d9)break;else _0x4d232a['push'](_0x4d232a['shift']());}catch(_0x15d045){_0x4d232a['push'](_0x4d232a['shift']());}}}(a137_0xe60d,0x3f9c1));import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x3ce809,_0x4bbde7=a137_0x44825e(0x1f4),_0x1fc05b={}){const _0x1f248b=a137_0x44825e,_0x3ad750=resolveSkillSyncPaths(_0x1fc05b),_0x240251=safePathSegment(_0x3ce809,_0x1f248b(0x204)),_0x98bff=_0x4bbde7===_0x1f248b(0x1fb)?[resolve(_0x1fc05b[_0x1f248b(0x1f8)]??process[_0x1f248b(0x1f8)](),_0x1f248b(0x1f6),_0x1f248b(0x1f7))]:runtimeAgentSkillRoots(_0x3ad750);return Object['freeze']({'scope':_0x4bbde7,'appCode':_0x240251,'skillRoots':Object['freeze'](_0x98bff),'managedRoot':_0x3ad750[_0x1f248b(0x1f5)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a138_0x2c9d85=a138_0x41db;(function(_0x10dc5b,_0x28589a){const _0x4a4d81=a138_0x41db,_0x5a7c7c=_0x10dc5b();while(!![]){try{const _0x15345e=parseInt(_0x4a4d81(0xc5))/0x1*(-parseInt(_0x4a4d81(0xe2))/0x2)+parseInt(_0x4a4d81(0xdb))/0x3*(parseInt(_0x4a4d81(0xc6))/0x4)+parseInt(_0x4a4d81(0xb2))/0x5+parseInt(_0x4a4d81(0xb1))/0x6+parseInt(_0x4a4d81(0xb0))/0x7+-parseInt(_0x4a4d81(0xd8))/0x8+-parseInt(_0x4a4d81(0xbf))/0x9;if(_0x15345e===_0x28589a)break;else _0x5a7c7c['push'](_0x5a7c7c['shift']());}catch(_0x5edea7){_0x5a7c7c['push'](_0x5a7c7c['shift']());}}}(a138_0x37df,0x247bb));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a138_0x41db(_0x3fd8eb,_0x26ff95){_0x3fd8eb=_0x3fd8eb-0xae;const _0x37df63=a138_0x37df();let _0x41db56=_0x37df63[_0x3fd8eb];return _0x41db56;}import{basename,dirname,resolve}from'node:path';import a138_0x4340d7 from'fs-extra';function a138_0x37df(){const _0xd99389=['map','agentsSkillsDir','set','project','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','name','removed','skipped','102543iitLTI','1343778Nhghtz','1241015eIRKvK','managedRoot','updated','protectedLinkRoots','contentHash','company','secret-retriever','lovrabet','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','length','skillCode','unchanged','filter','1944450xlhORk','validation','metadata-mismatch','pruneSkillCodes','skill','activeSkillCodes','28229DLQvqa','48548ThibSu','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','startsWith','get','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','env','push','trim','created','scopes','appCode','has','accessKey','metadataPath','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','1137544QSUdTs','builtin','linked-from-protected-root','54LUoDwz','scope','skillRoots','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','not-managed-symlink','runtime-observe','isDirectory','14zOjvMQ','isSymbolicLink'];a138_0x37df=function(){return _0xd99389;};return a138_0x37df();}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a138_0x4340d7,RESERVED_PROJECT_SKILL_CODES=new Set([a138_0x2c9d85(0xb9),a138_0x2c9d85(0xe0),a138_0x2c9d85(0xb8)]);export function linkEffectiveRuntimeSkills(_0x4b4d3d,_0x5309bd){const _0x26913d=a138_0x2c9d85,_0x5bec09=new Map();for(const _0x57ab13 of _0x4b4d3d){const _0x4cb143=_0x57ab13[_0x26913d(0xc3)][_0x26913d(0xbc)];if(!_0x4cb143)continue;const _0x15c107=_0x5bec09[_0x26913d(0xcc)](_0x4cb143);(!_0x15c107||_0x57ab13[_0x26913d(0xdc)]==='personal')&&_0x5bec09[_0x26913d(0xe6)](_0x4cb143,_0x57ab13);}const _0x3c099e=[];for(const _0x5d90f4 of _0x5bec09['values']()){const _0x5502d4=requireSkillCode(_0x5d90f4[_0x26913d(0xc3)]),_0x29a638=readMetadataIfPresent(_0x5d90f4[_0x26913d(0xd6)]);if(_0x29a638?.[_0x26913d(0xd3)]!==_0x5309bd[_0x26913d(0xd3)]||_0x29a638[_0x26913d(0xbc)]!==_0x5502d4)throw CliErrors[_0x26913d(0xc0)](_0x26913d(0xba)+_0x5309bd[_0x26913d(0xd3)]+':\x20'+_0x5d90f4[_0x26913d(0xd6)]);const _0x5cb583=runtimeSkillLinkName(_0x5309bd,_0x5502d4);for(const _0x5daa6c of _0x5309bd[_0x26913d(0xdd)]){_0x3c099e[_0x26913d(0xcf)](ensureManagedSymlink(resolve(_0x5daa6c,_0x5cb583),_0x5d90f4['dir'],_0x5309bd,_0x5502d4));}}return _0x3c099e;}export function pruneStaleRuntimeSkillLinks(_0x5e8e3b,_0x501560,_0x204f64){const _0x192118=a138_0x2c9d85,_0x12b56a=new Set([..._0x501560]['map'](_0x1b7582=>_0x1b7582[_0x192118(0xd0)]())[_0x192118(0xbe)](Boolean)),_0x4efac6=_0x204f64?new Set([..._0x204f64]['map'](_0x14242e=>_0x14242e['trim']())['filter'](Boolean)):undefined,_0x5e4f75=[];for(const _0x288cf8 of _0x5e8e3b[_0x192118(0xdd)]){for(const _0x2b826f of managedTargetSkillLinkPaths(_0x288cf8,_0x5e8e3b)){const _0x3ea09b=runtimeSkillCodeFromLink(_0x5e8e3b,_0x2b826f);if(_0x4efac6&&!_0x4efac6[_0x192118(0xd4)](_0x3ea09b))continue;if(_0x12b56a[_0x192118(0xd4)](_0x3ea09b))continue;_0x5e4f75[_0x192118(0xcf)](removeManagedSkillLink(_0x2b826f,_0x5e8e3b,_0x3ea09b));}}return _0x5e4f75;}export function pruneStaleRuntimeSkillCache(_0x650e53,_0x203720={}){const _0x57db13=a138_0x2c9d85,_0x492b46=new Set([..._0x650e53[_0x57db13(0xc4)]][_0x57db13(0xe4)](_0x554bd5=>_0x554bd5['trim']())['filter'](Boolean)),_0x209c4b=_0x650e53[_0x57db13(0xc2)]?new Set([..._0x650e53[_0x57db13(0xc2)]][_0x57db13(0xe4)](_0x4254a3=>_0x4254a3[_0x57db13(0xd0)]())[_0x57db13(0xbe)](Boolean)):undefined,_0x571a25=_0x650e53[_0x57db13(0xd2)]??['personal',_0x57db13(0xb7)],_0x15b721=resolve(getRuntimeSkillCacheRoot(_0x650e53[_0x57db13(0xce)],_0x650e53[_0x57db13(0xd5)],_0x203720),safePathSegment(_0x650e53[_0x57db13(0xd3)],_0x57db13(0xd3))),_0x6434ba=[];for(const _0xda2162 of _0x571a25){const _0x45c8ab=resolve(_0x15b721,_0xda2162);if(!existsSync(_0x45c8ab))continue;for(const _0x135848 of readdirSync(_0x45c8ab,{'withFileTypes':!![]})){if(!_0x135848['isDirectory']())continue;const _0x23c706=_0x135848[_0x57db13(0xea)];if(_0x209c4b&&!_0x209c4b[_0x57db13(0xd4)](_0x23c706))continue;if(_0x492b46[_0x57db13(0xd4)](_0x23c706))continue;const _0x5e6be2=resolve(_0x45c8ab,_0x23c706),_0xae8d63=readMetadataIfPresent(resolve(_0x5e6be2,METADATA_FILE));if(_0xae8d63?.[_0x57db13(0xd3)]!==_0x650e53[_0x57db13(0xd3)]||_0xae8d63[_0x57db13(0xdc)]!==_0xda2162||_0xae8d63['skillCode']!==_0x23c706){_0x6434ba[_0x57db13(0xcf)]({'path':_0x5e6be2,'action':_0x57db13(0xaf),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x5e6be2,_0x650e53[_0x57db13(0xb5)]??[])){_0x6434ba['push']({'path':_0x5e6be2,'action':'skipped','reason':_0x57db13(0xda)});continue;}removeSync(_0x5e6be2),_0x6434ba[_0x57db13(0xcf)]({'path':_0x5e6be2,'action':_0x57db13(0xae)});}}return _0x6434ba;}export function linkGlobalRuntimeSkills(_0x1618fb,_0x43b98d={}){const _0xbd3c98=a138_0x2c9d85,_0x4adb0c=resolveSkillSyncPaths(_0x43b98d),_0x4b24c2=[];for(const _0x278df2 of _0x1618fb){if(_0x278df2['scope']!==_0xbd3c98(0xd9))throw CliErrors[_0xbd3c98(0xc0)](_0xbd3c98(0xe8)+_0x278df2[_0xbd3c98(0xdc)]);const _0x2d99a8=requireSkillCode(_0x278df2[_0xbd3c98(0xc3)]),_0x2f2fd1=copyManagedSkillDirectory(_0x278df2['dir'],resolve(_0x4adb0c[_0xbd3c98(0xe5)],_0x2d99a8));_0x4b24c2[_0xbd3c98(0xcf)]({..._0x2f2fd1,'contentHash':_0x278df2[_0xbd3c98(0xb6)]});}return _0x4b24c2;}function ensureManagedSymlink(_0x28f051,_0x48971d,_0x2cdcc0,_0x4f84e2){const _0x1754b4=a138_0x2c9d85;mkdirSync(dirname(_0x28f051),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x28f051)||isDanglingSymlink(_0x28f051)){const _0x3fe0a7=lstatSync(_0x28f051);if(!_0x3fe0a7[_0x1754b4(0xe3)]())throw CliErrors[_0x1754b4(0xc0)](_0x1754b4(0xd7)+_0x28f051);const _0x3d1e45=resolveSymlinkTarget(_0x28f051);if(!isPathInside(realOrResolved(_0x3d1e45),realOrResolved(_0x2cdcc0[_0x1754b4(0xb3)])))throw CliErrors[_0x1754b4(0xc0)](_0x1754b4(0xc9)+_0x28f051);if(realOrResolved(_0x3d1e45)===realOrResolved(_0x48971d))return{'path':_0x28f051,'target':_0x48971d,'action':'unchanged'};const _0x11bbdb=readMetadataIfPresent(resolve(_0x3d1e45,METADATA_FILE));if(_0x2cdcc0[_0x1754b4(0xdc)]===_0x1754b4(0xe7)&&(_0x11bbdb?.['appCode']!==_0x2cdcc0[_0x1754b4(0xd3)]||_0x11bbdb['skillCode']!==_0x4f84e2))throw CliErrors[_0x1754b4(0xc0)](_0x1754b4(0xc7)+_0x28f051);return unlinkSync(_0x28f051),symlinkSync(_0x48971d,_0x28f051,_0x1754b4(0xc8)),{'path':_0x28f051,'target':_0x48971d,'action':_0x1754b4(0xb4)};}return symlinkSync(_0x48971d,_0x28f051,_0x1754b4(0xc8)),{'path':_0x28f051,'target':_0x48971d,'action':_0x1754b4(0xd1)};}function managedTargetSkillLinkPaths(_0x4bdaf4,_0x4227eb){const _0x3bf48b=a138_0x2c9d85;if(!existsSync(_0x4bdaf4))return[];const _0x367d4d=_0x4227eb[_0x3bf48b(0xd3)]+'--';return readdirSync(_0x4bdaf4,{'withFileTypes':!![]})[_0x3bf48b(0xbe)](_0x1331e4=>_0x4227eb[_0x3bf48b(0xdc)]===_0x3bf48b(0xe7)||_0x1331e4[_0x3bf48b(0xea)][_0x3bf48b(0xcb)](_0x367d4d))['map'](_0x1f5d3c=>resolve(_0x4bdaf4,_0x1f5d3c[_0x3bf48b(0xea)]));}function removeManagedSkillLink(_0x11f6f6,_0x521651,_0x47d0d4){const _0x544335=a138_0x2c9d85,_0x105681=lstatIfPresent(_0x11f6f6);if(!_0x105681?.[_0x544335(0xe3)]())return{'path':_0x11f6f6,'action':'skipped','reason':_0x544335(0xdf)};const _0x539eee=resolveSymlinkTarget(_0x11f6f6);if(!isPathInside(realOrResolved(_0x539eee),realOrResolved(_0x521651[_0x544335(0xb3)])))return{'path':_0x11f6f6,'action':_0x544335(0xaf),'reason':'external-symlink'};const _0xf03d90=readMetadataIfPresent(resolve(_0x539eee,METADATA_FILE));if(_0x521651[_0x544335(0xdc)]===_0x544335(0xe7)&&(_0xf03d90?.[_0x544335(0xd3)]!==_0x521651[_0x544335(0xd3)]||_0xf03d90['skillCode']!==_0x47d0d4))return{'path':_0x11f6f6,'action':_0x544335(0xaf),'reason':_0x544335(0xc1)};return unlinkSync(_0x11f6f6),{'path':_0x11f6f6,'action':'removed'};}function isLinkedFromAnyRoot(_0x48f916,_0x371fe6){const _0x56deaf=a138_0x2c9d85,_0x1cf923=realOrResolved(_0x48f916);for(const _0x297c8d of _0x371fe6){if(!existsSync(_0x297c8d))continue;for(const _0x1d523c of readdirSync(_0x297c8d,{'withFileTypes':!![]})){if(!_0x1d523c[_0x56deaf(0xe3)]())continue;const _0x3f0049=resolve(_0x297c8d,_0x1d523c[_0x56deaf(0xea)]);if(realOrResolved(resolveSymlinkTarget(_0x3f0049))===_0x1cf923)return!![];}}return![];}function runtimeSkillLinkName(_0x44433d,_0x287763){const _0x2c7032=a138_0x2c9d85,_0x4249f7=safePathSegment(_0x287763,'skillCode');if(_0x44433d[_0x2c7032(0xdc)]==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x2c7032(0xd4)](_0x4249f7))throw CliErrors[_0x2c7032(0xc0)](_0x2c7032(0xe9)+_0x4249f7);return _0x44433d['scope']==='project'?_0x4249f7:_0x44433d['appCode']+'--'+_0x4249f7;}function runtimeSkillCodeFromLink(_0x5f2ee9,_0x193b33){const _0x4cffd4=a138_0x2c9d85,_0xd13829=basename(_0x193b33);return _0x5f2ee9[_0x4cffd4(0xdc)]===_0x4cffd4(0xe7)?_0xd13829:_0xd13829['slice']((_0x5f2ee9[_0x4cffd4(0xd3)]+'--')[_0x4cffd4(0xbb)]);}export function copyManagedSkillDirectory(_0x3fb176,_0x470e6e){const _0x5a8a09=a138_0x2c9d85,_0xe6ed8=resolve(_0x470e6e,METADATA_FILE),_0x3a25bb=existsSync(_0x470e6e);if(_0x3a25bb){const _0x3fe681=lstatSync(_0x470e6e);if(_0x3fe681[_0x5a8a09(0xe3)]())throw CliErrors[_0x5a8a09(0xc0)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x470e6e);if(!_0x3fe681[_0x5a8a09(0xe1)]())throw CliErrors[_0x5a8a09(0xc0)](_0x5a8a09(0xca)+_0x470e6e);const _0xc8a8a=readMetadataIfPresent(_0xe6ed8);if(_0xc8a8a?.[_0x5a8a09(0xdc)]!=='builtin')throw CliErrors[_0x5a8a09(0xc0)](_0x5a8a09(0xde)+_0x470e6e);}ensureDirSync(dirname(_0x470e6e));const _0x3ac991=_0x3a25bb?readMetadataIfPresent(_0xe6ed8)?.[_0x5a8a09(0xb6)]:undefined,_0x27acd3=readMetadataIfPresent(resolve(_0x3fb176,METADATA_FILE))?.[_0x5a8a09(0xb6)];return _0x3a25bb&&removeSync(_0x470e6e),copySkillDirectory(_0x3fb176,_0x470e6e),{'path':_0x470e6e,'target':_0x3fb176,'action':!_0x3a25bb?_0x5a8a09(0xd1):_0x3ac991===_0x27acd3?_0x5a8a09(0xbd):_0x5a8a09(0xb4)};}function copySkillDirectory(_0x45709f,_0x55c376){copySync(_0x45709f,_0x55c376,{'dereference':![],'overwrite':!![],'filter'(_0x164390){const _0x5f492e=a138_0x41db;if(lstatSync(_0x164390)[_0x5f492e(0xe3)]())throw CliErrors[_0x5f492e(0xc0)](_0x5f492e(0xcd)+_0x164390);return!![];}});}
|
|
1
|
+
const a138_0xf6c9f7=a138_0x33e4;(function(_0x118999,_0x58f304){const _0x602b55=a138_0x33e4,_0x4b5842=_0x118999();while(!![]){try{const _0x2432bc=parseInt(_0x602b55(0xb5))/0x1*(parseInt(_0x602b55(0xb1))/0x2)+-parseInt(_0x602b55(0x97))/0x3+parseInt(_0x602b55(0xb6))/0x4+parseInt(_0x602b55(0xa7))/0x5+parseInt(_0x602b55(0x8d))/0x6*(-parseInt(_0x602b55(0x86))/0x7)+-parseInt(_0x602b55(0xb2))/0x8+parseInt(_0x602b55(0xa9))/0x9*(parseInt(_0x602b55(0x8e))/0xa);if(_0x2432bc===_0x58f304)break;else _0x4b5842['push'](_0x4b5842['shift']());}catch(_0x367aa7){_0x4b5842['push'](_0x4b5842['shift']());}}}(a138_0x56bb,0x3a834));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a138_0x37d3c5 from'fs-extra';function a138_0x33e4(_0x5e14ec,_0x379e10){_0x5e14ec=_0x5e14ec-0x81;const _0x56bb87=a138_0x56bb();let _0x33e493=_0x56bb87[_0x5e14ec];return _0x33e493;}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a138_0x37d3c5,RESERVED_PROJECT_SKILL_CODES=new Set([a138_0xf6c9f7(0x87),a138_0xf6c9f7(0x8c),'secret-retriever']);export function linkEffectiveRuntimeSkills(_0x406f76,_0x3f443a){const _0x2ff86d=a138_0xf6c9f7,_0x1445c8=new Map();for(const _0x1ece20 of _0x406f76){const _0x9400c5=_0x1ece20[_0x2ff86d(0x81)][_0x2ff86d(0x83)];if(!_0x9400c5)continue;const _0x257a93=_0x1445c8[_0x2ff86d(0xae)](_0x9400c5);(!_0x257a93||_0x1ece20[_0x2ff86d(0x9a)]===_0x2ff86d(0x8f))&&_0x1445c8[_0x2ff86d(0x9e)](_0x9400c5,_0x1ece20);}const _0x5e34ab=[];for(const _0x1793e0 of _0x1445c8[_0x2ff86d(0x93)]()){const _0xe370c=requireSkillCode(_0x1793e0[_0x2ff86d(0x81)]),_0x21d4e6=readMetadataIfPresent(_0x1793e0[_0x2ff86d(0x85)]);if(_0x21d4e6?.[_0x2ff86d(0xaf)]!==_0x3f443a[_0x2ff86d(0xaf)]||_0x21d4e6['skillCode']!==_0xe370c)throw CliErrors[_0x2ff86d(0xa3)](_0x2ff86d(0x9c)+_0x3f443a[_0x2ff86d(0xaf)]+':\x20'+_0x1793e0[_0x2ff86d(0x85)]);const _0x1555ce=runtimeSkillLinkName(_0x3f443a,_0xe370c);for(const _0x2d78ff of _0x3f443a[_0x2ff86d(0xad)]){_0x5e34ab[_0x2ff86d(0x96)](ensureManagedSymlink(resolve(_0x2d78ff,_0x1555ce),_0x1793e0[_0x2ff86d(0xaa)],_0x3f443a,_0xe370c));}}return _0x5e34ab;}export function pruneStaleRuntimeSkillLinks(_0x4b515c,_0x59d4c0,_0x44aab6){const _0x6f90f2=a138_0xf6c9f7,_0x42543d=new Set([..._0x59d4c0][_0x6f90f2(0x9f)](_0x212f59=>_0x212f59[_0x6f90f2(0x90)]())[_0x6f90f2(0x89)](Boolean)),_0x520e81=_0x44aab6?new Set([..._0x44aab6][_0x6f90f2(0x9f)](_0x3dbf96=>_0x3dbf96[_0x6f90f2(0x90)]())[_0x6f90f2(0x89)](Boolean)):undefined,_0x208dc7=[];for(const _0x2621e8 of _0x4b515c[_0x6f90f2(0xad)]){for(const _0x1c0344 of managedTargetSkillLinkPaths(_0x2621e8,_0x4b515c)){const _0x422ceb=runtimeSkillCodeFromLink(_0x4b515c,_0x1c0344);if(_0x520e81&&!_0x520e81[_0x6f90f2(0x8b)](_0x422ceb))continue;if(_0x42543d[_0x6f90f2(0x8b)](_0x422ceb))continue;_0x208dc7[_0x6f90f2(0x96)](removeManagedSkillLink(_0x1c0344,_0x4b515c,_0x422ceb));}}return _0x208dc7;}export function pruneStaleRuntimeSkillCache(_0x2215d3,_0x37d237={}){const _0x2fe329=a138_0xf6c9f7,_0x4792e2=new Set([..._0x2215d3['activeSkillCodes']][_0x2fe329(0x9f)](_0x2557c9=>_0x2557c9['trim']())[_0x2fe329(0x89)](Boolean)),_0x5a998d=_0x2215d3['pruneSkillCodes']?new Set([..._0x2215d3[_0x2fe329(0xb0)]][_0x2fe329(0x9f)](_0x6c198=>_0x6c198['trim']())['filter'](Boolean)):undefined,_0x18f1bd=_0x2215d3[_0x2fe329(0xa5)]??['personal',_0x2fe329(0x98)],_0x245f50=resolve(getRuntimeSkillCacheRoot(_0x2215d3[_0x2fe329(0xb9)],_0x2215d3[_0x2fe329(0xb8)],_0x37d237),safePathSegment(_0x2215d3[_0x2fe329(0xaf)],_0x2fe329(0xaf))),_0x50e936=[];for(const _0x491c83 of _0x18f1bd){const _0x5110c2=resolve(_0x245f50,_0x491c83);if(!existsSync(_0x5110c2))continue;for(const _0x7aabb of readdirSync(_0x5110c2,{'withFileTypes':!![]})){if(!_0x7aabb[_0x2fe329(0xb7)]())continue;const _0x3a58d3=_0x7aabb[_0x2fe329(0x9d)];if(_0x5a998d&&!_0x5a998d['has'](_0x3a58d3))continue;if(_0x4792e2[_0x2fe329(0x8b)](_0x3a58d3))continue;const _0x51ca75=resolve(_0x5110c2,_0x3a58d3),_0x366c58=readMetadataIfPresent(resolve(_0x51ca75,METADATA_FILE));if(_0x366c58?.[_0x2fe329(0xaf)]!==_0x2215d3[_0x2fe329(0xaf)]||_0x366c58['scope']!==_0x491c83||_0x366c58[_0x2fe329(0x83)]!==_0x3a58d3){_0x50e936[_0x2fe329(0x96)]({'path':_0x51ca75,'action':_0x2fe329(0x8a),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x51ca75,_0x2215d3['protectedLinkRoots']??[])){_0x50e936[_0x2fe329(0x96)]({'path':_0x51ca75,'action':_0x2fe329(0x8a),'reason':'linked-from-protected-root'});continue;}removeSync(_0x51ca75),_0x50e936[_0x2fe329(0x96)]({'path':_0x51ca75,'action':_0x2fe329(0xa8)});}}return _0x50e936;}export function linkGlobalRuntimeSkills(_0xe410f1,_0xbdd939={}){const _0x21dec6=a138_0xf6c9f7,_0x44408d=resolveSkillSyncPaths(_0xbdd939),_0x5c0b8f=[];for(const _0x3f234d of _0xe410f1){if(_0x3f234d[_0x21dec6(0x9a)]!==_0x21dec6(0xab))throw CliErrors[_0x21dec6(0xa3)](_0x21dec6(0x91)+_0x3f234d['scope']);const _0x1e5d71=requireSkillCode(_0x3f234d[_0x21dec6(0x81)]),_0xa29da8=copyManagedSkillDirectory(_0x3f234d['dir'],resolve(_0x44408d['agentsSkillsDir'],_0x1e5d71));_0x5c0b8f[_0x21dec6(0x96)]({..._0xa29da8,'contentHash':_0x3f234d[_0x21dec6(0xa2)]});}return _0x5c0b8f;}function ensureManagedSymlink(_0x157046,_0x29efb4,_0x3a3aa4,_0xd5cafa){const _0xfe4669=a138_0xf6c9f7;mkdirSync(dirname(_0x157046),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x157046)||isDanglingSymlink(_0x157046)){const _0x15f0f7=lstatSync(_0x157046);if(!_0x15f0f7[_0xfe4669(0x94)]())throw CliErrors[_0xfe4669(0xa3)](_0xfe4669(0x92)+_0x157046);const _0x4559d1=resolveSymlinkTarget(_0x157046);if(!isPathInside(realOrResolved(_0x4559d1),realOrResolved(_0x3a3aa4['managedRoot'])))throw CliErrors[_0xfe4669(0xa3)](_0xfe4669(0xa1)+_0x157046);if(realOrResolved(_0x4559d1)===realOrResolved(_0x29efb4))return{'path':_0x157046,'target':_0x29efb4,'action':_0xfe4669(0xb3)};const _0x31e540=readMetadataIfPresent(resolve(_0x4559d1,METADATA_FILE));if(_0x3a3aa4[_0xfe4669(0x9a)]===_0xfe4669(0xa4)&&(_0x31e540?.[_0xfe4669(0xaf)]!==_0x3a3aa4[_0xfe4669(0xaf)]||_0x31e540[_0xfe4669(0x83)]!==_0xd5cafa))throw CliErrors[_0xfe4669(0xa3)]('Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20'+_0x157046);return unlinkSync(_0x157046),symlinkSync(_0x29efb4,_0x157046,'dir'),{'path':_0x157046,'target':_0x29efb4,'action':_0xfe4669(0xac)};}return symlinkSync(_0x29efb4,_0x157046,_0xfe4669(0xaa)),{'path':_0x157046,'target':_0x29efb4,'action':'created'};}function managedTargetSkillLinkPaths(_0x2bd8c0,_0x546018){const _0x44ce1b=a138_0xf6c9f7;if(!existsSync(_0x2bd8c0))return[];const _0x2b2eab=_0x546018[_0x44ce1b(0xaf)]+'--';return readdirSync(_0x2bd8c0,{'withFileTypes':!![]})[_0x44ce1b(0x89)](_0x1d27cc=>_0x546018[_0x44ce1b(0x9a)]==='project'||_0x1d27cc[_0x44ce1b(0x9d)][_0x44ce1b(0xb4)](_0x2b2eab))[_0x44ce1b(0x9f)](_0x2fd3ef=>resolve(_0x2bd8c0,_0x2fd3ef[_0x44ce1b(0x9d)]));}function removeManagedSkillLink(_0x3d89eb,_0x332456,_0x5efd38){const _0x506f44=a138_0xf6c9f7,_0x207d2f=lstatIfPresent(_0x3d89eb);if(!_0x207d2f?.[_0x506f44(0x94)]())return{'path':_0x3d89eb,'action':'skipped','reason':_0x506f44(0x82)};const _0x4d50e6=resolveSymlinkTarget(_0x3d89eb);if(!isPathInside(realOrResolved(_0x4d50e6),realOrResolved(_0x332456[_0x506f44(0xa0)])))return{'path':_0x3d89eb,'action':_0x506f44(0x8a),'reason':_0x506f44(0x99)};const _0x3f6334=readMetadataIfPresent(resolve(_0x4d50e6,METADATA_FILE));if(_0x332456[_0x506f44(0x9a)]===_0x506f44(0xa4)&&(_0x3f6334?.[_0x506f44(0xaf)]!==_0x332456[_0x506f44(0xaf)]||_0x3f6334[_0x506f44(0x83)]!==_0x5efd38))return{'path':_0x3d89eb,'action':_0x506f44(0x8a),'reason':_0x506f44(0x9b)};return unlinkSync(_0x3d89eb),{'path':_0x3d89eb,'action':_0x506f44(0xa8)};}function isLinkedFromAnyRoot(_0x2b9757,_0x149491){const _0x145853=a138_0xf6c9f7,_0x2284f5=realOrResolved(_0x2b9757);for(const _0x50bc73 of _0x149491){if(!existsSync(_0x50bc73))continue;for(const _0x303871 of readdirSync(_0x50bc73,{'withFileTypes':!![]})){if(!_0x303871[_0x145853(0x94)]())continue;const _0x213bf5=resolve(_0x50bc73,_0x303871[_0x145853(0x9d)]);if(realOrResolved(resolveSymlinkTarget(_0x213bf5))===_0x2284f5)return!![];}}return![];}function runtimeSkillLinkName(_0x382bd3,_0x492895){const _0x2f1bc4=a138_0xf6c9f7,_0x55aca1=safePathSegment(_0x492895,_0x2f1bc4(0x83));if(_0x382bd3['scope']===_0x2f1bc4(0xa4)&&RESERVED_PROJECT_SKILL_CODES[_0x2f1bc4(0x8b)](_0x55aca1))throw CliErrors[_0x2f1bc4(0xa3)]('Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20'+_0x55aca1);return _0x382bd3[_0x2f1bc4(0x9a)]===_0x2f1bc4(0xa4)?_0x55aca1:_0x382bd3['appCode']+'--'+_0x55aca1;}function runtimeSkillCodeFromLink(_0x5a8dca,_0x480fb6){const _0x4ee251=a138_0xf6c9f7,_0x1924fd=basename(_0x480fb6);return _0x5a8dca['scope']===_0x4ee251(0xa4)?_0x1924fd:_0x1924fd[_0x4ee251(0x84)]((_0x5a8dca[_0x4ee251(0xaf)]+'--')['length']);}function a138_0x56bb(){const _0x4dfc44=['966065uBFQRm','removed','3781287HFnPHJ','dir','builtin','updated','skillRoots','get','appCode','pruneSkillCodes','122zsOUqX','727144MQkReZ','unchanged','startsWith','5901ZxzIwP','210068mmLKXb','isDirectory','accessKey','env','skill','not-managed-symlink','skillCode','slice','metadataPath','35NUqzdz','lovrabet','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','filter','skipped','has','runtime-observe','417588uRjhYA','10sAaJhX','personal','trim','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','values','isSymbolicLink','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','push','1041849PoaOtd','company','external-symlink','scope','metadata-mismatch','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','name','set','map','managedRoot','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','contentHash','validation','project','scopes','created'];a138_0x56bb=function(){return _0x4dfc44;};return a138_0x56bb();}export function copyManagedSkillDirectory(_0x140f92,_0x3f76c3){const _0x186034=a138_0xf6c9f7,_0x2699fc=resolve(_0x3f76c3,METADATA_FILE),_0xdff03f=existsSync(_0x3f76c3);if(_0xdff03f){const _0x3b95a2=lstatSync(_0x3f76c3);if(_0x3b95a2[_0x186034(0x94)]())throw CliErrors[_0x186034(0xa3)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x3f76c3);if(!_0x3b95a2[_0x186034(0xb7)]())throw CliErrors[_0x186034(0xa3)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x3f76c3);const _0x31757d=readMetadataIfPresent(_0x2699fc);if(_0x31757d?.[_0x186034(0x9a)]!==_0x186034(0xab))throw CliErrors['validation'](_0x186034(0x95)+_0x3f76c3);}ensureDirSync(dirname(_0x3f76c3));const _0x7c314c=_0xdff03f?readMetadataIfPresent(_0x2699fc)?.[_0x186034(0xa2)]:undefined,_0x273dd0=readMetadataIfPresent(resolve(_0x140f92,METADATA_FILE))?.[_0x186034(0xa2)];return _0xdff03f&&removeSync(_0x3f76c3),copySkillDirectory(_0x140f92,_0x3f76c3),{'path':_0x3f76c3,'target':_0x140f92,'action':!_0xdff03f?_0x186034(0xa6):_0x7c314c===_0x273dd0?_0x186034(0xb3):_0x186034(0xac)};}function copySkillDirectory(_0x13b8e3,_0x4922db){copySync(_0x13b8e3,_0x4922db,{'dereference':![],'overwrite':!![],'filter'(_0x4ae3cb){const _0xd783e3=a138_0x33e4;if(lstatSync(_0x4ae3cb)[_0xd783e3(0x94)]())throw CliErrors[_0xd783e3(0xa3)](_0xd783e3(0x88)+_0x4ae3cb);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x25d46f,_0x3737f8){const _0x70aadc=a139_0x19d3,_0x1b6fd6=_0x25d46f();while(!![]){try{const _0x30c81=-parseInt(_0x70aadc(0x1f2))/0x1*(-parseInt(_0x70aadc(0x1e8))/0x2)+-parseInt(_0x70aadc(0x1fd))/0x3+parseInt(_0x70aadc(0x1de))/0x4*(-parseInt(_0x70aadc(0x1d1))/0x5)+parseInt(_0x70aadc(0x1f6))/0x6+parseInt(_0x70aadc(0x1e3))/0x7*(-parseInt(_0x70aadc(0x1dd))/0x8)+parseInt(_0x70aadc(0x1ec))/0x9+-parseInt(_0x70aadc(0x1cf))/0xa*(-parseInt(_0x70aadc(0x1f8))/0xb);if(_0x30c81===_0x3737f8)break;else _0x1b6fd6['push'](_0x1b6fd6['shift']());}catch(_0x37efe0){_0x1b6fd6['push'](_0x1b6fd6['shift']());}}}(a139_0x2f32,0x95b17));function a139_0x2f32(){const _0x11e8b9=['has','filter','metadataPath','startsWith','skillRoots','274070kTPciG','link','isSymbolicLink','cacheDir','6014784eqqCiK','map','54967gziSlN','cache','project','scope','accessKey','2964321uuseVl','local','2040ZwToBB','localeCompare','1070PuUiWj','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','builtin','linkedPaths','linkedPath','tags','validation','get','sort','skillMdPath','trim','from','77536dXUVlL','18100sNhkVW','skillCode','scopes','appCode','name','350TfEtXX','set','code','push','\x20!=\x20','2HpvEFI','dir','source','includes','6824502yTlQzl'];a139_0x2f32=function(){return _0x11e8b9;};return a139_0x2f32();}import{existsSync,readdirSync}from'node:fs';function a139_0x19d3(_0x4a18a1,_0x399e49){_0x4a18a1=_0x4a18a1-0x1ce;const _0x2f3299=a139_0x2f32();let _0x19d3bf=_0x2f3299[_0x4a18a1];return _0x19d3bf;}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(_0x3adec5,_0x3ef509,_0x4928c6={}){const _0x33220a=a139_0x19d3,_0x2227c7=safePathSegment(_0x3adec5['appCode'],_0x33220a(0x1e1));if(_0x3ef509[_0x33220a(0x1e1)]!==_0x2227c7)throw CliErrors[_0x33220a(0x1d7)](_0x33220a(0x1d2)+_0x3ef509[_0x33220a(0x1e1)]+_0x33220a(0x1e7)+_0x2227c7);const _0x5770ef=normalizeRuntimeSkillScopes(_0x3adec5[_0x33220a(0x1e0)]),_0x22fd13=new Set(_0x5770ef),_0x55402d=_0x3adec5[_0x33220a(0x1e5)]?.['trim'](),_0x104431=new Map(),_0x2dc108=resolve(getRuntimeSkillCacheRoot(_0x3adec5['env'],_0x3adec5[_0x33220a(0x1fc)],_0x4928c6),_0x2227c7);for(const _0x704264 of _0x5770ef){for(const _0x122a58 of localSkillEntryDirs(resolve(_0x2dc108,_0x704264))){collectLocalRuntimeSkill(_0x104431,_0x122a58,{'appCode':_0x2227c7,'scopes':_0x22fd13,'code':_0x55402d,'source':_0x33220a(0x1f9)});}}for(const _0x4d0c03 of _0x3ef509[_0x33220a(0x1f1)]){for(const _0x291e20 of localSkillLinkCandidates(_0x4d0c03,_0x3ef509,_0x22fd13)){collectLocalRuntimeSkill(_0x104431,_0x291e20,{'appCode':_0x2227c7,'scopes':_0x22fd13,'code':_0x55402d,'source':_0x33220a(0x1f3),'linkedPath':_0x291e20});}}return Array[_0x33220a(0x1dc)](_0x104431['values']())[_0x33220a(0x1d9)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x33eb7f){const _0x920709=a139_0x19d3;if(!existsSync(_0x33eb7f))return[];return readdirSync(_0x33eb7f,{'withFileTypes':!![]})[_0x920709(0x1ee)](_0x2dfcd7=>_0x2dfcd7['isDirectory']()||_0x2dfcd7[_0x920709(0x1f4)]())[_0x920709(0x1f7)](_0x1b51b4=>resolve(_0x33eb7f,_0x1b51b4[_0x920709(0x1e2)]));}function localSkillLinkCandidates(_0x340b76,_0x425713,_0x3836f0){const _0x2b0065=a139_0x19d3;if(!existsSync(_0x340b76))return[];const _0x397535=_0x425713[_0x2b0065(0x1e1)]+'--';return readdirSync(_0x340b76,{'withFileTypes':!![]})[_0x2b0065(0x1ee)](_0x4eeab9=>_0x4eeab9['isDirectory']()||_0x4eeab9[_0x2b0065(0x1f4)]())[_0x2b0065(0x1ee)](_0x508812=>_0x425713[_0x2b0065(0x1fb)]===_0x2b0065(0x1fa)||_0x508812['name'][_0x2b0065(0x1f0)](_0x397535)||_0x3836f0[_0x2b0065(0x1ed)](_0x2b0065(0x1d3)))[_0x2b0065(0x1f7)](_0x2b9211=>resolve(_0x340b76,_0x2b9211[_0x2b0065(0x1e2)]));}function collectLocalRuntimeSkill(_0x45ea80,_0x216b06,_0x318926){const _0x1fd205=a139_0x19d3,_0x5a41f7=resolve(_0x216b06,METADATA_FILE),_0xa8de78=readMetadataIfPresent(_0x5a41f7);if(!_0xa8de78)return;if(_0xa8de78[_0x1fd205(0x1e1)]!==_0x318926[_0x1fd205(0x1e1)])return;if(!isRuntimeSkillScope(_0xa8de78[_0x1fd205(0x1fb)])||!_0x318926[_0x1fd205(0x1e0)][_0x1fd205(0x1ed)](_0xa8de78[_0x1fd205(0x1fb)]))return;const _0x585cb4=_0xa8de78[_0x1fd205(0x1df)]?.[_0x1fd205(0x1db)]();if(!_0x585cb4)return;if(_0x318926[_0x1fd205(0x1e5)]&&_0x585cb4!==_0x318926['code'])return;const _0x1038cb=_0xa8de78[_0x1fd205(0x1fb)]+':'+_0x585cb4,_0x1ec1fe=_0x318926[_0x1fd205(0x1d5)]?[_0x318926[_0x1fd205(0x1d5)]]:[],_0x49ef0f=_0x45ea80[_0x1fd205(0x1d8)](_0x1038cb);if(_0x49ef0f){_0x318926[_0x1fd205(0x1ea)]===_0x1fd205(0x1f9)&&(_0x49ef0f[_0x1fd205(0x1e9)]=_0x216b06,_0x49ef0f[_0x1fd205(0x1f5)]=_0x216b06,_0x49ef0f[_0x1fd205(0x1da)]=resolve(_0x216b06,SKILL_FILE),_0x49ef0f[_0x1fd205(0x1ef)]=_0x5a41f7);for(const _0x1067a6 of _0x1ec1fe){!_0x49ef0f['linkedPaths'][_0x1fd205(0x1eb)](_0x1067a6)&&_0x49ef0f[_0x1fd205(0x1d4)][_0x1fd205(0x1e6)](_0x1067a6);}_0x49ef0f[_0x1fd205(0x1d4)][_0x1fd205(0x1d9)]();return;}_0x45ea80[_0x1fd205(0x1e4)](_0x1038cb,{..._0xa8de78,'tags':Array['isArray'](_0xa8de78[_0x1fd205(0x1d6)])?_0xa8de78[_0x1fd205(0x1d6)]:[],'scope':_0xa8de78[_0x1fd205(0x1fb)],'source':_0x1fd205(0x1ce),'dir':_0x216b06,'cacheDir':_0x318926['source']===_0x1fd205(0x1f9)?_0x216b06:undefined,'skillMdPath':resolve(_0x216b06,SKILL_FILE),'metadataPath':_0x5a41f7,'linkedPaths':_0x1ec1fe});}function compareLocalRuntimeSkills(_0x24b05e,_0x1248f9){const _0x3f5ae6=a139_0x19d3,_0x4ccb32={'personal':0x0,'company':0x1,'builtin':0x2};return _0x4ccb32[_0x24b05e['scope']]-_0x4ccb32[_0x1248f9[_0x3f5ae6(0x1fb)]]||_0x24b05e[_0x3f5ae6(0x1df)][_0x3f5ae6(0x1d0)](_0x1248f9['skillCode'])||_0x24b05e['dir']['localeCompare'](_0x1248f9[_0x3f5ae6(0x1e9)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d8415,_0x201023){const _0x4bcac2=a140_0x37e5,_0x14b260=_0x4d8415();while(!![]){try{const _0x5e2a49=parseInt(_0x4bcac2(0x8d))/0x1+-parseInt(_0x4bcac2(0x7e))/0x2*(-parseInt(_0x4bcac2(0x83))/0x3)+parseInt(_0x4bcac2(0x8a))/0x4+-parseInt(_0x4bcac2(0x84))/0x5+-parseInt(_0x4bcac2(0x74))/0x6+parseInt(_0x4bcac2(0x71))/0x7*(-parseInt(_0x4bcac2(0x9c))/0x8)+-parseInt(_0x4bcac2(0x7a))/0x9*(-parseInt(_0x4bcac2(0x9e))/0xa);if(_0x5e2a49===_0x201023)break;else _0x14b260['push'](_0x14b260['shift']());}catch(_0x49ac2d){_0x14b260['push'](_0x14b260['shift']());}}}(a140_0x37a1,0xcc630));import{readFileSync,readdirSync,realpathSync}from'node:fs';import{relative,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{IGNORED_DIR_NAMES,IGNORED_FILE_NAMES,SKILL_FILE}from'./constants.js';export function fileContent(_0x1882d3){const _0x40a605=a140_0x37e5;return _0x1882d3['bytes']??Buffer['from'](_0x1882d3[_0x40a605(0x72)]??'',_0x40a605(0x95));}function a140_0x37a1(){const _0x24632c=['27ekmLNt','isBuffer','from','validation','142veLyGK','toLowerCase','add','Skill\x20file\x20sha256\x20is\x20invalid:\x20','object','22341wgIAjK','1945960pjARqg','replace','isArray','Skill\x20file\x20size\x20is\x20invalid:\x20','excludedFilePaths','string','313860hgjBzN','toString','startsWith','97441fEJwcj','localeCompare','size','compare','isSafeInteger','length','sort','isDirectory','utf8','name','push','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','634152ucIXyJ','path','9125110zygeoJ','Duplicate\x20Skill\x20file\x20path:\x20','isSymbolicLink','includes','has','91KHzylf','content','values','7111914ILxzPg','bytes','test','split','set','isFile'];a140_0x37a1=function(){return _0x24632c;};return a140_0x37a1();}export function fileText(_0x21b95f){const _0x28559a=a140_0x37e5;return fileContent(_0x21b95f)[_0x28559a(0x8b)]('utf8');}export function normalizeLocalFiles(_0x9640b6){const _0x61238a=a140_0x37e5;if(!Array[_0x61238a(0x86)](_0x9640b6)||_0x9640b6['length']===0x0)return[];const _0x56898f=new Map();for(const _0x660c3f of _0x9640b6){if(!_0x660c3f||typeof _0x660c3f!=='object'||typeof _0x660c3f[_0x61238a(0x9d)]!==_0x61238a(0x89))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x22b035=normalizeSkillRelativePath(_0x660c3f['path']);if(_0x56898f['has'](_0x22b035))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x22b035);if(_0x660c3f['bytes']!==undefined&&!Buffer[_0x61238a(0x7b)](_0x660c3f[_0x61238a(0x75)]))throw CliErrors[_0x61238a(0x7d)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x22b035);if(_0x660c3f['bytes']===undefined&&typeof _0x660c3f['content']!==_0x61238a(0x89))throw CliErrors[_0x61238a(0x7d)](_0x61238a(0x98)+_0x22b035);const _0x12acac=fileContent(_0x660c3f);_0x56898f[_0x61238a(0x78)](_0x22b035,{'path':_0x22b035,'bytes':_0x12acac});}return Array[_0x61238a(0x7c)](_0x56898f[_0x61238a(0x73)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0xd01f3b){const _0x78c22e=a140_0x37e5;if(!Array['isArray'](_0xd01f3b)||_0xd01f3b[_0x78c22e(0x92)]===0x0)return[];const _0x10661b=new Map();for(const _0x5211a2 of _0xd01f3b){if(!_0x5211a2||typeof _0x5211a2!==_0x78c22e(0x82)||typeof _0x5211a2[_0x78c22e(0x9d)]!==_0x78c22e(0x89))throw CliErrors[_0x78c22e(0x7d)](_0x78c22e(0x9a));const _0xb5b9f=normalizeSkillRelativePath(_0x5211a2['path']);if(_0x10661b['has'](_0xb5b9f))throw CliErrors['validation'](_0x78c22e(0x9f)+_0xb5b9f);if(!isSha256Hex(_0x5211a2['sha256']))throw CliErrors['validation'](_0x78c22e(0x81)+_0xb5b9f);if(!Number[_0x78c22e(0x91)](_0x5211a2['size'])||_0x5211a2[_0x78c22e(0x8f)]<0x0)throw CliErrors[_0x78c22e(0x7d)](_0x78c22e(0x87)+_0xb5b9f);_0x10661b['set'](_0xb5b9f,{'path':_0xb5b9f,'sha256':_0x5211a2['sha256'][_0x78c22e(0x7f)](),'size':_0x5211a2[_0x78c22e(0x8f)]});}return Array[_0x78c22e(0x7c)](_0x10661b[_0x78c22e(0x73)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x4e2158,_0x127de4={}){const _0x29f05f=a140_0x37e5,_0x3ad5ef=realpathSync(_0x4e2158),_0x2dad7a=canonicalExcludedFilePaths(_0x127de4[_0x29f05f(0x88)]),_0x34690e=[];function _0x263ba6(_0x36ce35){const _0x50cc2b=_0x29f05f,_0x2b1515=readdirSync(_0x36ce35,{'withFileTypes':!![]})[_0x50cc2b(0x93)]((_0x524f49,_0x528cf6)=>_0x524f49[_0x50cc2b(0x96)][_0x50cc2b(0x8e)](_0x528cf6['name']));for(const _0x562184 of _0x2b1515){if(_0x562184[_0x50cc2b(0x94)]()&&IGNORED_DIR_NAMES['has'](_0x562184['name']))continue;if(IGNORED_FILE_NAMES[_0x50cc2b(0x70)](_0x562184[_0x50cc2b(0x96)]))continue;const _0xcc183d=resolve(_0x36ce35,_0x562184[_0x50cc2b(0x96)]);if(isExcludedFilePath(_0xcc183d,_0x2dad7a))continue;if(_0x562184[_0x50cc2b(0xa0)]())throw CliErrors[_0x50cc2b(0x7d)](_0x50cc2b(0x9b)+_0xcc183d);const _0x5cd7b0=toPosixPath(relative(_0x3ad5ef,_0xcc183d));if(_0x562184['isDirectory']()){_0x263ba6(_0xcc183d);continue;}if(!_0x562184[_0x50cc2b(0x79)]())continue;validateSkillRelativePath(_0x5cd7b0);const _0x30ca6d=readFileSync(_0xcc183d);_0x34690e[_0x50cc2b(0x97)]({'path':_0x5cd7b0,'bytes':_0x30ca6d});}}return _0x263ba6(_0x3ad5ef),normalizeLocalFiles(_0x34690e);}function canonicalExcludedFilePaths(_0x45ef58){const _0xa39945=a140_0x37e5,_0x223f4d=new Set();for(const _0x5e78a9 of _0x45ef58??[]){const _0x2e6a50=resolve(_0x5e78a9);_0x223f4d[_0xa39945(0x80)](_0x2e6a50);try{_0x223f4d[_0xa39945(0x80)](realpathSync(_0x2e6a50));}catch{}}return _0x223f4d;}function isExcludedFilePath(_0x5bfb14,_0x336457){const _0x534bb7=a140_0x37e5;if(_0x336457[_0x534bb7(0x70)](_0x5bfb14))return!![];if(_0x336457[_0x534bb7(0x8f)]===0x0)return![];try{return _0x336457[_0x534bb7(0x70)](realpathSync(_0x5bfb14));}catch{return![];}}export function compareSkillFiles(_0x5bcf03,_0x41eeab){const _0xc617ba=a140_0x37e5;if(_0x5bcf03[_0xc617ba(0x9d)]===SKILL_FILE)return _0x41eeab[_0xc617ba(0x9d)]===SKILL_FILE?0x0:-0x1;if(_0x41eeab[_0xc617ba(0x9d)]===SKILL_FILE)return 0x1;return Buffer[_0xc617ba(0x90)](Buffer[_0xc617ba(0x7c)](_0x5bcf03['path'],_0xc617ba(0x95)),Buffer[_0xc617ba(0x7c)](_0x41eeab[_0xc617ba(0x9d)],_0xc617ba(0x95)));}export function normalizeSkillRelativePath(_0x1abf80){const _0x19def0=toPosixPath(_0x1abf80['trim']());return validateSkillRelativePath(_0x19def0),_0x19def0;}export function validateSkillRelativePath(_0x2f5639){const _0x17da57=a140_0x37e5;if(!_0x2f5639||_0x2f5639[_0x17da57(0x8c)]('/')||_0x2f5639[_0x17da57(0xa1)]('//'))throw CliErrors[_0x17da57(0x7d)](_0x17da57(0x99)+_0x2f5639);for(const _0x5e291f of _0x2f5639[_0x17da57(0x77)]('/')){if(!_0x5e291f||_0x5e291f==='.'||_0x5e291f==='..')throw CliErrors[_0x17da57(0x7d)](_0x17da57(0x99)+_0x2f5639);}}export function toPosixPath(_0x47cee5){const _0x18d2ea=a140_0x37e5;return _0x47cee5[_0x18d2ea(0x85)](/\\/g,'/');}function a140_0x37e5(_0x15a844,_0xd8f9){_0x15a844=_0x15a844-0x70;const _0x37a114=a140_0x37a1();let _0x37e5ec=_0x37a114[_0x15a844];return _0x37e5ec;}export function isSha256Hex(_0x231399){const _0x3d0886=a140_0x37e5;return typeof _0x231399==='string'&&/^[a-fA-F0-9]{64}$/[_0x3d0886(0x76)](_0x231399);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x4c6d87,_0x52bb5a){const _0x5ca07d=a141_0x48c7,_0x4e8212=_0x4c6d87();while(!![]){try{const _0x3f2c57=parseInt(_0x5ca07d(0x1f5))/0x1+parseInt(_0x5ca07d(0x1dd))/0x2+-parseInt(_0x5ca07d(0x1fd))/0x3*(parseInt(_0x5ca07d(0x1ec))/0x4)+-parseInt(_0x5ca07d(0x1e8))/0x5*(parseInt(_0x5ca07d(0x1e3))/0x6)+-parseInt(_0x5ca07d(0x1ea))/0x7+parseInt(_0x5ca07d(0x1e9))/0x8*(parseInt(_0x5ca07d(0x20b))/0x9)+-parseInt(_0x5ca07d(0x201))/0xa*(-parseInt(_0x5ca07d(0x1d3))/0xb);if(_0x3f2c57===_0x52bb5a)break;else _0x4e8212['push'](_0x4e8212['shift']());}catch(_0x1d7ddf){_0x4e8212['push'](_0x4e8212['shift']());}}}(a141_0x4c02,0xb88d5));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a141_0x4c02(){const _0x183965=['packageBytes','contents','\x0a---\x0a\x0a','example','stringify','585MstOrv','242piksfu','slice','path','paths','fileHashes','displayName','name:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','.\x20Changed\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','2972954cjnBKY','pulledAt','entries','keys','displayName:\x20','toString','4374XCayId','delete','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','scope','7315ScNsky','130600zjpnHV','4239942wXoZvm','description','14468YXVPmp','set','test','find','validation','---','appCode','has','accessKey','620863nRnbWY','env','match','length','name','isFile','schemaVersion','utf8','699mwACYm','skillName','map','trim','46570prbpGJ','contentHash','version','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','replace'];a141_0x4c02=function(){return _0x183965;};return a141_0x4c02();}export function materializeRuntimeSkill(_0x538793,_0x57b591,_0x593db9){const _0xd93695=a141_0x48c7,_0x5bbf7d=requireSkillCode(_0x538793),_0x28c2cf=requirePackageBytes(_0x5bbf7d,_0x593db9[_0xd93695(0x206)]),_0x526c40=extractDownloadedPackage(_0x28c2cf),_0x157f5e=_0x526c40[_0xd93695(0x1ef)](_0x2323a1=>_0x2323a1['path']===SKILL_FILE);if(!_0x157f5e)throw CliErrors[_0xd93695(0x1f0)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x5bbf7d);const _0x55bec6=withMaterializedSkillFrontmatter(_0x526c40,_0x538793,_0x5bbf7d),_0x5744f7=_0x55bec6['find'](_0x33f00c=>_0x33f00c[_0xd93695(0x1d5)]===SKILL_FILE),_0x279f7b=fileText(_0x5744f7),_0x14e70e=getRuntimeSkillDir(_0x593db9[_0xd93695(0x1f6)],_0x593db9[_0xd93695(0x1f4)],_0x593db9[_0xd93695(0x1f2)],_0x57b591,_0x5bbf7d,_0x593db9['paths']),_0x11e729=resolve(_0x14e70e,SKILL_FILE),_0x4de224=resolve(_0x14e70e,METADATA_FILE),_0xb5989b=contentHash(_0x279f7b),_0x52d645=readMetadataIfPresent(_0x4de224)?.[_0xd93695(0x1d7)];ensurePulledFilesCanBeOverwritten(_0x14e70e,_0x4de224,_0x55bec6,_0x593db9['force']===!![]),mkdirSync(_0x14e70e,{'recursive':!![],'mode':0x1c0});const _0x49700f=existsSync(_0x11e729)?readFileSync(_0x11e729,_0xd93695(0x1fc)):undefined;return materializeFiles(_0x14e70e,_0x55bec6),removeStaleManagedFiles(_0x14e70e,_0x52d645,_0x55bec6),writeJsonAtomic(_0x4de224,buildMetadata(_0x538793,_0x57b591,_0x593db9[_0xd93695(0x1f2)],_0xb5989b,_0x593db9[_0xd93695(0x1de)],_0x55bec6,_0x28c2cf)),{'skill':_0x538793,'scope':_0x57b591,'dir':_0x14e70e,'skillMdPath':_0x11e729,'metadataPath':_0x4de224,'contentHash':_0xb5989b,'changed':_0x49700f!==_0x279f7b};}export function reuseMaterializedRuntimeSkill(_0x130946,_0x53de5f,_0x551dba){const _0x39a489=a141_0x48c7,_0x410652=_0x130946[_0x39a489(0x203)]?.[_0x39a489(0x200)]();if(!_0x410652)return undefined;const _0x83ae3e=requireSkillCode(_0x130946),_0x4b4443=getRuntimeSkillDir(_0x551dba['env'],_0x551dba[_0x39a489(0x1f4)],_0x551dba[_0x39a489(0x1f2)],_0x53de5f,_0x83ae3e,_0x551dba[_0x39a489(0x1d6)]),_0x2e18f7=resolve(_0x4b4443,SKILL_FILE),_0x1f8800=resolve(_0x4b4443,METADATA_FILE),_0x80344f=readMetadataIfPresent(_0x1f8800);if(!_0x80344f||_0x80344f[_0x39a489(0x1fb)]!==0x2||_0x80344f[_0x39a489(0x1f2)]!==_0x551dba[_0x39a489(0x1f2)]||_0x80344f[_0x39a489(0x1e7)]!==_0x53de5f||_0x80344f['skillCode']!==_0x83ae3e||_0x80344f[_0x39a489(0x203)]!==_0x410652||_0x80344f['id']!==_0x130946['id']||_0x80344f[_0x39a489(0x1fe)]!==_0x130946[_0x39a489(0x1fe)]||_0x80344f[_0x39a489(0x1eb)]!==_0x130946[_0x39a489(0x1eb)]||_0x80344f[_0x39a489(0x209)]!==_0x130946[_0x39a489(0x209)]||_0x80344f['status']!==_0x130946['status']||!_0x80344f['contentHash']||!_0x80344f[_0x39a489(0x1d7)]||!Object['hasOwn'](_0x80344f[_0x39a489(0x1d7)],SKILL_FILE))return undefined;for(const [_0x4482ac,_0x5ac75f]of Object[_0x39a489(0x1df)](_0x80344f['fileHashes'])){if(!/^[a-f0-9]{64}$/['test'](_0x5ac75f))return undefined;const _0x2141ae=resolveManagedFilePath(_0x4b4443,_0x4482ac);if(!existsSync(_0x2141ae)||!lstatSync(_0x2141ae)[_0x39a489(0x1fa)]())return undefined;if(bufferSha256(readFileSync(_0x2141ae))!==_0x5ac75f)return undefined;}return{'skill':_0x130946,'scope':_0x53de5f,'dir':_0x4b4443,'skillMdPath':_0x2e18f7,'metadataPath':_0x1f8800,'contentHash':_0x80344f[_0x39a489(0x202)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x3d577f,_0x3d6dce,_0x569090){const _0x16beae=skillDisplayName(_0x3d6dce,_0x569090),_0x5178d1=_0x3d6dce['description']?.['trim']()||_0x16beae||_0x569090;return normalizeLocalFiles(_0x3d577f)['map'](_0x87c7ba=>{const _0x350f39=a141_0x48c7,_0x4960e7=fileText(_0x87c7ba);if(_0x87c7ba[_0x350f39(0x1d5)]!==SKILL_FILE)return _0x87c7ba;if(hasYamlFrontmatter(_0x4960e7))return{'path':_0x87c7ba[_0x350f39(0x1d5)],'content':withSyncedDisplayName(_0x4960e7,_0x16beae)};return{'path':_0x87c7ba[_0x350f39(0x1d5)],'content':prependSkillFrontmatter(_0x4960e7,{'name':_0x569090,'displayName':_0x16beae,'description':_0x5178d1})};});}function hasYamlFrontmatter(_0x3a89e4){const _0x269ea7=a141_0x48c7;return/^\uFEFF?---\s*\r?\n/[_0x269ea7(0x1ee)](_0x3a89e4);}function prependSkillFrontmatter(_0x17e50b,_0x59bcd9){const _0x36b7d4=a141_0x48c7,_0x12ee56=_0x17e50b['replace'](/^\uFEFF/,'');return[_0x36b7d4(0x1f1),_0x36b7d4(0x1d9)+yamlString(_0x59bcd9[_0x36b7d4(0x1f9)]),_0x59bcd9[_0x36b7d4(0x1d8)]?_0x36b7d4(0x1e1)+yamlString(_0x59bcd9[_0x36b7d4(0x1d8)]):undefined,'description:\x20'+yamlString(_0x59bcd9[_0x36b7d4(0x1eb)]),_0x36b7d4(0x1f1),'',_0x12ee56]['filter'](_0x167c66=>_0x167c66!==undefined)['join']('\x0a');}function yamlString(_0xe8f610){const _0x5bc439=a141_0x48c7;return JSON[_0x5bc439(0x20a)](_0xe8f610[_0x5bc439(0x205)](/\r/g,'')[_0x5bc439(0x200)]());}function skillDisplayName(_0x2195dd,_0x1f5413){const _0x1aa6f8=a141_0x48c7,_0x4e5492=_0x2195dd['skillName']?.[_0x1aa6f8(0x200)]();return _0x4e5492||_0x1f5413;}function withSyncedDisplayName(_0x18adbb,_0x280298){const _0x1b0055=a141_0x48c7,_0x18c10c=_0x18adbb[_0x1b0055(0x1f7)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x18c10c)return _0x18adbb;const _0x490956=_0x18c10c[0x1]??'',_0x497cfc=_0x18c10c[0x2]??'',_0x2b5241=parseDocument(_0x497cfc);if(_0x2b5241['errors'][_0x1b0055(0x1f8)]>0x0||!isMap(_0x2b5241[_0x1b0055(0x207)]))return _0x18adbb;if(_0x280298)_0x2b5241[_0x1b0055(0x1ed)](_0x1b0055(0x1d8),_0x280298);else{if(_0x2b5241[_0x1b0055(0x1f3)](_0x1b0055(0x1d8)))_0x2b5241[_0x1b0055(0x1e4)](_0x1b0055(0x1d8));else return _0x18adbb;}forceBlockCollections(_0x2b5241[_0x1b0055(0x207)]);const _0x212941=_0x2b5241[_0x1b0055(0x1e2)]({'lineWidth':0x0})['trimEnd'](),_0x3dc3de=_0x18adbb[_0x1b0055(0x1d4)](_0x18c10c[0x0][_0x1b0055(0x1f8)])[_0x1b0055(0x205)](/^\r?\n/,'');return _0x490956+'---\x0a'+_0x212941+_0x1b0055(0x208)+_0x3dc3de;}function forceBlockCollections(_0x1c1474){if(!isNode(_0x1c1474))return;visit(_0x1c1474,(_0x53d3ee,_0x411d1f)=>{isCollection(_0x411d1f)&&(_0x411d1f['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x5f377b,_0x3b5006,_0x18a22d,_0x25eb3d){const _0x5be2c3=a141_0x48c7;if(_0x25eb3d||!existsSync(_0x3b5006))return;const _0x583d6d=readMetadataIfPresent(_0x3b5006);if(!_0x583d6d)return;const _0x15131e=_0x583d6d[_0x5be2c3(0x1d7)]&&Object[_0x5be2c3(0x1e0)](_0x583d6d[_0x5be2c3(0x1d7)])[_0x5be2c3(0x1f8)]>0x0?_0x583d6d[_0x5be2c3(0x1d7)]:undefined;if(_0x15131e)for(const [_0x324f2c,_0x48abc2]of Object['entries'](_0x15131e)){const _0x3ac77b=resolveManagedFilePath(_0x5f377b,_0x324f2c);if(!existsSync(_0x3ac77b))throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1da)+_0x5f377b,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x324f2c);const _0x22c696=lstatSync(_0x3ac77b);if(!_0x22c696[_0x5be2c3(0x1fa)]())throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1da)+_0x5f377b,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x324f2c);const _0x5df6cf=bufferSha256(readFileSync(_0x3ac77b));if(_0x5df6cf!==_0x48abc2)throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1da)+_0x5f377b+_0x5be2c3(0x1db)+_0x324f2c,_0x5be2c3(0x204)+_0x324f2c);}else{const _0x51276f=resolve(_0x5f377b,SKILL_FILE);if(existsSync(_0x51276f)&&_0x583d6d[_0x5be2c3(0x202)]){const _0x19650f=contentHash(readFileSync(_0x51276f,_0x5be2c3(0x1fc)));if(_0x19650f!==_0x583d6d[_0x5be2c3(0x202)])throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1e6)+_0x51276f,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x28bdec of normalizeLocalFiles(_0x18a22d)){if(_0x15131e?.[_0x28bdec[_0x5be2c3(0x1d5)]])continue;if(!_0x15131e&&_0x28bdec['path']===SKILL_FILE)continue;const _0x22ca9a=resolveManagedFilePath(_0x5f377b,_0x28bdec['path']);if(!existsSync(_0x22ca9a))continue;const _0x150d78=lstatSync(_0x22ca9a);if(!_0x150d78[_0x5be2c3(0x1fa)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x5f377b,_0x5be2c3(0x1e5)+_0x28bdec['path']);const _0x4f14e1=bufferSha256(readFileSync(_0x22ca9a));if(_0x4f14e1!==fileHash(_0x28bdec))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x5f377b,_0x5be2c3(0x1dc)+_0x28bdec[_0x5be2c3(0x1d5)]);}}function materializeFiles(_0x5ce2f1,_0x3e446b){for(const _0x23540d of normalizeLocalFiles(_0x3e446b)){const _0x507164=resolveManagedFilePath(_0x5ce2f1,_0x23540d['path']);mkdirSync(dirname(_0x507164),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x507164,fileContent(_0x23540d),0x180);}}function a141_0x48c7(_0x2db9b0,_0x376350){_0x2db9b0=_0x2db9b0-0x1d3;const _0x4c024c=a141_0x4c02();let _0x48c7cc=_0x4c024c[_0x2db9b0];return _0x48c7cc;}function removeStaleManagedFiles(_0x586899,_0x482100,_0x1302ac){const _0x2f3b50=a141_0x48c7;if(!_0x482100)return;const _0x5300fa=new Set(normalizeLocalFiles(_0x1302ac)[_0x2f3b50(0x1ff)](_0x59e5ee=>_0x59e5ee[_0x2f3b50(0x1d5)]));for(const _0x319127 of Object[_0x2f3b50(0x1e0)](_0x482100)){if(_0x5300fa[_0x2f3b50(0x1f3)](_0x319127))continue;const _0x181bc9=resolveManagedFilePath(_0x586899,_0x319127);existsSync(_0x181bc9)&&lstatSync(_0x181bc9)[_0x2f3b50(0x1fa)]()&&rmSync(_0x181bc9,{'force':!![]});}}
|
|
1
|
+
(function(_0xa47dcc,_0x567a25){const _0x1db448=a141_0x1fd7,_0x2db293=_0xa47dcc();while(!![]){try{const _0x535f76=-parseInt(_0x1db448(0x18e))/0x1+-parseInt(_0x1db448(0x1a5))/0x2+-parseInt(_0x1db448(0x18f))/0x3*(parseInt(_0x1db448(0x1b3))/0x4)+-parseInt(_0x1db448(0x19a))/0x5+-parseInt(_0x1db448(0x1a2))/0x6*(-parseInt(_0x1db448(0x17e))/0x7)+parseInt(_0x1db448(0x1b5))/0x8+parseInt(_0x1db448(0x180))/0x9;if(_0x535f76===_0x567a25)break;else _0x2db293['push'](_0x2db293['shift']());}catch(_0x53e4cd){_0x2db293['push'](_0x2db293['shift']());}}}(a141_0x452f,0xddefb));function a141_0x1fd7(_0x1f2877,_0x38926e){_0x1f2877=_0x1f2877-0x17b;const _0x452fbf=a141_0x452f();let _0x1fd714=_0x452fbf[_0x1f2877];return _0x1fd714;}import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x199400,_0x5ab8a1,_0x223bba){const _0x58a0aa=a141_0x1fd7,_0x3e6c16=requireSkillCode(_0x199400),_0x3fc0d9=requirePackageBytes(_0x3e6c16,_0x223bba[_0x58a0aa(0x17f)]),_0x8f25db=extractDownloadedPackage(_0x3fc0d9),_0x32b259=_0x8f25db[_0x58a0aa(0x199)](_0x4e8956=>_0x4e8956[_0x58a0aa(0x1ad)]===SKILL_FILE);if(!_0x32b259)throw CliErrors[_0x58a0aa(0x1a8)](_0x58a0aa(0x18d)+SKILL_FILE+':\x20'+_0x3e6c16);const _0x285e0c=withMaterializedSkillFrontmatter(_0x8f25db,_0x199400,_0x3e6c16),_0x6c1b00=_0x285e0c[_0x58a0aa(0x199)](_0x319d64=>_0x319d64['path']===SKILL_FILE),_0x22d4fb=fileText(_0x6c1b00),_0x346cda=getRuntimeSkillDir(_0x223bba[_0x58a0aa(0x17b)],_0x223bba[_0x58a0aa(0x186)],_0x223bba['appCode'],_0x5ab8a1,_0x3e6c16,_0x223bba['paths']),_0x60e41b=resolve(_0x346cda,SKILL_FILE),_0x17a76d=resolve(_0x346cda,METADATA_FILE),_0x272633=contentHash(_0x22d4fb),_0x114b26=readMetadataIfPresent(_0x17a76d)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x346cda,_0x17a76d,_0x285e0c,_0x223bba['force']===!![]),mkdirSync(_0x346cda,{'recursive':!![],'mode':0x1c0});const _0x259f9f=existsSync(_0x60e41b)?readFileSync(_0x60e41b,_0x58a0aa(0x192)):undefined;return materializeFiles(_0x346cda,_0x285e0c),removeStaleManagedFiles(_0x346cda,_0x114b26,_0x285e0c),writeJsonAtomic(_0x17a76d,buildMetadata(_0x199400,_0x5ab8a1,_0x223bba['appCode'],_0x272633,_0x223bba[_0x58a0aa(0x191)],_0x285e0c,_0x3fc0d9)),{'skill':_0x199400,'scope':_0x5ab8a1,'dir':_0x346cda,'skillMdPath':_0x60e41b,'metadataPath':_0x17a76d,'contentHash':_0x272633,'changed':_0x259f9f!==_0x22d4fb};}export function reuseMaterializedRuntimeSkill(_0x3a103f,_0x3c499c,_0x23116d){const _0x5f4947=a141_0x1fd7,_0x462cad=_0x3a103f[_0x5f4947(0x1b7)]?.[_0x5f4947(0x1b4)]();if(!_0x462cad)return undefined;const _0x20134b=requireSkillCode(_0x3a103f),_0x3e5244=getRuntimeSkillDir(_0x23116d[_0x5f4947(0x17b)],_0x23116d[_0x5f4947(0x186)],_0x23116d[_0x5f4947(0x184)],_0x3c499c,_0x20134b,_0x23116d[_0x5f4947(0x19e)]),_0x49539e=resolve(_0x3e5244,SKILL_FILE),_0x302310=resolve(_0x3e5244,METADATA_FILE),_0x4f1410=readMetadataIfPresent(_0x302310);if(!_0x4f1410||_0x4f1410[_0x5f4947(0x187)]!==0x2||_0x4f1410['appCode']!==_0x23116d['appCode']||_0x4f1410['scope']!==_0x3c499c||_0x4f1410[_0x5f4947(0x1a6)]!==_0x20134b||_0x4f1410[_0x5f4947(0x1b7)]!==_0x462cad||_0x4f1410['id']!==_0x3a103f['id']||_0x4f1410[_0x5f4947(0x188)]!==_0x3a103f[_0x5f4947(0x188)]||_0x4f1410['description']!==_0x3a103f[_0x5f4947(0x1aa)]||_0x4f1410[_0x5f4947(0x17c)]!==_0x3a103f[_0x5f4947(0x17c)]||_0x4f1410[_0x5f4947(0x1b1)]!==_0x3a103f[_0x5f4947(0x1b1)]||!_0x4f1410[_0x5f4947(0x1ab)]||!_0x4f1410[_0x5f4947(0x1a9)]||!Object[_0x5f4947(0x1af)](_0x4f1410[_0x5f4947(0x1a9)],SKILL_FILE))return undefined;for(const [_0x1c1105,_0x7071b5]of Object[_0x5f4947(0x19f)](_0x4f1410[_0x5f4947(0x1a9)])){if(!/^[a-f0-9]{64}$/['test'](_0x7071b5))return undefined;const _0x5ed6ef=resolveManagedFilePath(_0x3e5244,_0x1c1105);if(!existsSync(_0x5ed6ef)||!lstatSync(_0x5ed6ef)[_0x5f4947(0x194)]())return undefined;if(bufferSha256(readFileSync(_0x5ed6ef))!==_0x7071b5)return undefined;}return{'skill':_0x3a103f,'scope':_0x3c499c,'dir':_0x3e5244,'skillMdPath':_0x49539e,'metadataPath':_0x302310,'contentHash':_0x4f1410[_0x5f4947(0x1ab)],'changed':![]};}function a141_0x452f(){const _0x3cbf24=['name','version','env','example','slice','14AUsQys','packageBytes','20362311KCSebu','keys','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','errors','appCode','length','accessKey','schemaVersion','skillName','set','description:\x20','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','---','Runtime\x20Skill\x20package\x20is\x20missing\x20','1626124nDxCwT','1356987sdYqSE','match','pulledAt','utf8','contents','isFile','displayName:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','displayName','has','find','2641500CgoyPh','trimEnd','delete','join','paths','entries','map','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','3781830JovGAn','filter','toString','1028878xfznGB','skillCode','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','validation','fileHashes','description','contentHash','name:\x20','path','replace','hasOwn','\x0a---\x0a\x0a','status','---\x0a','4UqQNxm','trim','4057232RsYdxV'];a141_0x452f=function(){return _0x3cbf24;};return a141_0x452f();}function withMaterializedSkillFrontmatter(_0x1c90aa,_0xe48b13,_0x15fb47){const _0x36895a=a141_0x1fd7,_0x25f4f6=skillDisplayName(_0xe48b13,_0x15fb47),_0x548ce0=_0xe48b13[_0x36895a(0x1aa)]?.[_0x36895a(0x1b4)]()||_0x25f4f6||_0x15fb47;return normalizeLocalFiles(_0x1c90aa)['map'](_0x362a36=>{const _0xa9634=_0x36895a,_0x3f0490=fileText(_0x362a36);if(_0x362a36['path']!==SKILL_FILE)return _0x362a36;if(hasYamlFrontmatter(_0x3f0490))return{'path':_0x362a36[_0xa9634(0x1ad)],'content':withSyncedDisplayName(_0x3f0490,_0x25f4f6)};return{'path':_0x362a36[_0xa9634(0x1ad)],'content':prependSkillFrontmatter(_0x3f0490,{'name':_0x15fb47,'displayName':_0x25f4f6,'description':_0x548ce0})};});}function hasYamlFrontmatter(_0x38d27c){return/^\uFEFF?---\s*\r?\n/['test'](_0x38d27c);}function prependSkillFrontmatter(_0x23f69a,_0x1c8690){const _0x3e6d05=a141_0x1fd7,_0x303a42=_0x23f69a[_0x3e6d05(0x1ae)](/^\uFEFF/,'');return[_0x3e6d05(0x18c),_0x3e6d05(0x1ac)+yamlString(_0x1c8690[_0x3e6d05(0x1b6)]),_0x1c8690[_0x3e6d05(0x197)]?_0x3e6d05(0x195)+yamlString(_0x1c8690[_0x3e6d05(0x197)]):undefined,_0x3e6d05(0x18a)+yamlString(_0x1c8690[_0x3e6d05(0x1aa)]),_0x3e6d05(0x18c),'',_0x303a42][_0x3e6d05(0x1a3)](_0x553395=>_0x553395!==undefined)[_0x3e6d05(0x19d)]('\x0a');}function yamlString(_0x2ff8b5){const _0x23e491=a141_0x1fd7;return JSON['stringify'](_0x2ff8b5['replace'](/\r/g,'')[_0x23e491(0x1b4)]());}function skillDisplayName(_0x296ad0,_0x201c2b){const _0x3b7983=_0x296ad0['skillName']?.['trim']();return _0x3b7983||_0x201c2b;}function withSyncedDisplayName(_0x3c0ddb,_0x3db787){const _0x5874ee=a141_0x1fd7,_0x3083be=_0x3c0ddb[_0x5874ee(0x190)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x3083be)return _0x3c0ddb;const _0x5ab180=_0x3083be[0x1]??'',_0x1dd185=_0x3083be[0x2]??'',_0x456522=parseDocument(_0x1dd185);if(_0x456522[_0x5874ee(0x183)]['length']>0x0||!isMap(_0x456522[_0x5874ee(0x193)]))return _0x3c0ddb;if(_0x3db787)_0x456522[_0x5874ee(0x189)](_0x5874ee(0x197),_0x3db787);else{if(_0x456522[_0x5874ee(0x198)](_0x5874ee(0x197)))_0x456522[_0x5874ee(0x19c)](_0x5874ee(0x197));else return _0x3c0ddb;}forceBlockCollections(_0x456522[_0x5874ee(0x193)]);const _0x593bd2=_0x456522[_0x5874ee(0x1a4)]({'lineWidth':0x0})[_0x5874ee(0x19b)](),_0x1b0b57=_0x3c0ddb[_0x5874ee(0x17d)](_0x3083be[0x0][_0x5874ee(0x185)])[_0x5874ee(0x1ae)](/^\r?\n/,'');return _0x5ab180+_0x5874ee(0x1b2)+_0x593bd2+_0x5874ee(0x1b0)+_0x1b0b57;}function forceBlockCollections(_0x48de30){if(!isNode(_0x48de30))return;visit(_0x48de30,(_0x4c3515,_0xc094b5)=>{isCollection(_0xc094b5)&&(_0xc094b5['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x25fcbd,_0x503c2d,_0xa407b3,_0x210480){const _0x4fec35=a141_0x1fd7;if(_0x210480||!existsSync(_0x503c2d))return;const _0x58dd73=readMetadataIfPresent(_0x503c2d);if(!_0x58dd73)return;const _0x2cbf5b=_0x58dd73['fileHashes']&&Object[_0x4fec35(0x181)](_0x58dd73[_0x4fec35(0x1a9)])['length']>0x0?_0x58dd73[_0x4fec35(0x1a9)]:undefined;if(_0x2cbf5b)for(const [_0x605248,_0x500f14]of Object[_0x4fec35(0x19f)](_0x2cbf5b)){const _0x1030f5=resolveManagedFilePath(_0x25fcbd,_0x605248);if(!existsSync(_0x1030f5))throw CliErrors[_0x4fec35(0x1a8)](_0x4fec35(0x1a1)+_0x25fcbd,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x605248);const _0x53b4eb=lstatSync(_0x1030f5);if(!_0x53b4eb[_0x4fec35(0x194)]())throw CliErrors['validation'](_0x4fec35(0x1a1)+_0x25fcbd,_0x4fec35(0x182)+_0x605248);const _0x4a870f=bufferSha256(readFileSync(_0x1030f5));if(_0x4a870f!==_0x500f14)throw CliErrors[_0x4fec35(0x1a8)](_0x4fec35(0x1a1)+_0x25fcbd+'.\x20Changed\x20file:\x20'+_0x605248,_0x4fec35(0x1a7)+_0x605248);}else{const _0x16734b=resolve(_0x25fcbd,SKILL_FILE);if(existsSync(_0x16734b)&&_0x58dd73['contentHash']){const _0x27730e=contentHash(readFileSync(_0x16734b,_0x4fec35(0x192)));if(_0x27730e!==_0x58dd73['contentHash'])throw CliErrors['validation']('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x16734b,_0x4fec35(0x18b));}}for(const _0x9e329a of normalizeLocalFiles(_0xa407b3)){if(_0x2cbf5b?.[_0x9e329a[_0x4fec35(0x1ad)]])continue;if(!_0x2cbf5b&&_0x9e329a[_0x4fec35(0x1ad)]===SKILL_FILE)continue;const _0x10ed64=resolveManagedFilePath(_0x25fcbd,_0x9e329a['path']);if(!existsSync(_0x10ed64))continue;const _0x1ecc37=lstatSync(_0x10ed64);if(!_0x1ecc37[_0x4fec35(0x194)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x25fcbd,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x9e329a['path']);const _0x5a78fd=bufferSha256(readFileSync(_0x10ed64));if(_0x5a78fd!==fileHash(_0x9e329a))throw CliErrors['validation'](_0x4fec35(0x1a1)+_0x25fcbd,_0x4fec35(0x196)+_0x9e329a[_0x4fec35(0x1ad)]);}}function materializeFiles(_0x4fbb46,_0x1d43bd){for(const _0x114406 of normalizeLocalFiles(_0x1d43bd)){const _0x5be432=resolveManagedFilePath(_0x4fbb46,_0x114406['path']);mkdirSync(dirname(_0x5be432),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x5be432,fileContent(_0x114406),0x180);}}function removeStaleManagedFiles(_0x168fd4,_0x469d11,_0x45ae72){const _0x253d9a=a141_0x1fd7;if(!_0x469d11)return;const _0x313efe=new Set(normalizeLocalFiles(_0x45ae72)[_0x253d9a(0x1a0)](_0x5dfb57=>_0x5dfb57[_0x253d9a(0x1ad)]));for(const _0x5abc7d of Object[_0x253d9a(0x181)](_0x469d11)){if(_0x313efe['has'](_0x5abc7d))continue;const _0x39643d=resolveManagedFilePath(_0x168fd4,_0x5abc7d);existsSync(_0x39643d)&&lstatSync(_0x39643d)[_0x253d9a(0x194)]()&&rmSync(_0x39643d,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47ef52,_0x113021){const _0x38e83b=a142_0x3800,_0x439c09=_0x47ef52();while(!![]){try{const _0x52fc3b=parseInt(_0x38e83b(0x177))/0x1*(parseInt(_0x38e83b(0x190))/0x2)+parseInt(_0x38e83b(0x178))/0x3+-parseInt(_0x38e83b(0x186))/0x4*(parseInt(_0x38e83b(0x174))/0x5)+-parseInt(_0x38e83b(0x181))/0x6*(parseInt(_0x38e83b(0x170))/0x7)+parseInt(_0x38e83b(0x171))/0x8*(parseInt(_0x38e83b(0x18b))/0x9)+-parseInt(_0x38e83b(0x173))/0xa+-parseInt(_0x38e83b(0x176))/0xb*(-parseInt(_0x38e83b(0x18a))/0xc);if(_0x52fc3b===_0x113021)break;else _0x439c09['push'](_0x439c09['shift']());}catch(_0x2f89c5){_0x439c09['push'](_0x439c09['shift']());}}}(a142_0x3ead,0xdd8d2));function a142_0x3ead(){const _0x4d015f=['skillName','forkedFromSkillId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','6147828DRjEzn','27VWlOGE','ossPath','description','object','path','534398JKEXbc','utf8','Invalid\x20','sourceSessionId','isArray','manifest','zipSize','43183INevaK','3704920EdWrIm','trim','2709500lPmKdg','25dpdrhM','validation','11IQWFCJ','3wyiuYF','1331043AuoBDn','tags','tenantCode','example','skillCode','personal','version','toISOString','status','342phASvH','userId','hasUpstreamUpdate','forkedFromVersion','length','1293508IGxfTQ'];a142_0x3ead=function(){return _0x4d015f;};return a142_0x3ead();}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a142_0x3800(_0x1787ec,_0x4e29b2){_0x1787ec=_0x1787ec-0x16f;const _0x3eaddf=a142_0x3ead();let _0x380073=_0x3eaddf[_0x1787ec];return _0x380073;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0xee60cf,_0xd0b6c7,_0x241ba9,_0x6a1cc8,_0x4a8251,_0x13fc95,_0x13aeed){const _0x2525a0=a142_0x3800,_0x5a10d6=_0x13fc95?normalizeLocalFiles(_0x13fc95):[],_0x55da55=!_0x13aeed&&_0x5a10d6[_0x2525a0(0x185)]>0x0?buildSkillPackage(_0x5a10d6):undefined,_0x400ea8=_0x13aeed?bufferSha256(_0x13aeed):_0x55da55?.[_0x2525a0(0x195)]['zipSha256'],_0x41d9a6=_0x13aeed?.['length']??_0x55da55?.['manifest'][_0x2525a0(0x16f)],_0x33c0a1=_0x5a10d6[_0x2525a0(0x185)]>0x0?Object['fromEntries'](_0x5a10d6['map'](_0x1e52d9=>[_0x1e52d9[_0x2525a0(0x18f)],fileHash(_0x1e52d9)])):undefined;return{'schemaVersion':_0x5a10d6[_0x2525a0(0x185)]>0x0?0x2:0x1,'id':_0xee60cf['id'],'appCode':_0x241ba9,'skillCode':requireSkillCode(_0xee60cf),'skillName':_0xee60cf[_0x2525a0(0x187)],'description':_0xee60cf[_0x2525a0(0x18d)],'example':_0xee60cf[_0x2525a0(0x17b)],'scope':_0xd0b6c7,'readonly':_0xd0b6c7!==_0x2525a0(0x17d)||_0xee60cf['readonly']===!![],'tenantCode':_0xee60cf[_0x2525a0(0x17a)],'userId':_0xee60cf[_0x2525a0(0x182)],'version':_0xee60cf[_0x2525a0(0x17e)],'status':_0xee60cf[_0x2525a0(0x180)],'tags':Array[_0x2525a0(0x194)](_0xee60cf[_0x2525a0(0x179)])?_0xee60cf[_0x2525a0(0x179)]:[],'hasUpstreamUpdate':_0xee60cf[_0x2525a0(0x183)],'forkedFromSkillId':_0xee60cf[_0x2525a0(0x188)],'forkedFromVersion':_0xee60cf[_0x2525a0(0x184)],'sourceSessionId':_0xee60cf[_0x2525a0(0x193)],'contentHash':_0x6a1cc8,'fileHashes':_0x33c0a1,'treeHash':_0x5a10d6['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x5a10d6)):undefined,'ossPath':remoteManifestOssPath(_0xee60cf['files']),'zipSha256':_0x400ea8,'zipSize':_0x41d9a6,'files':_0x5a10d6['length']>0x0?_0x5a10d6['map'](_0x1929c3=>({'path':_0x1929c3[_0x2525a0(0x18f)],'hash':fileHash(_0x1929c3),'size':fileContent(_0x1929c3)[_0x2525a0(0x185)]})):undefined,'pulledAt':_0x4a8251??new Date()[_0x2525a0(0x17f)]()};}export function requireSkillCode(_0x5b81b7){const _0x3ad136=a142_0x3800,_0x437b60=_0x5b81b7[_0x3ad136(0x17c)]?.[_0x3ad136(0x172)]();if(!_0x437b60)throw CliErrors['validation'](_0x3ad136(0x189));return _0x437b60;}export function readMetadataIfPresent(_0x112a25){const _0x4334cd=a142_0x3800;if(!existsSync(_0x112a25))return undefined;try{const _0x14ee97=JSON['parse'](readFileSync(_0x112a25,_0x4334cd(0x191)));return _0x14ee97;}catch{throw CliErrors[_0x4334cd(0x175)](_0x4334cd(0x192)+METADATA_FILE+':\x20'+_0x112a25);}}function remoteManifestOssPath(_0x29cf95){const _0x153907=a142_0x3800;if(!_0x29cf95||typeof _0x29cf95!==_0x153907(0x18e)||Array[_0x153907(0x194)](_0x29cf95))return undefined;const _0xc6a5=_0x29cf95[_0x153907(0x18c)];return typeof _0xc6a5==='string'&&_0xc6a5[_0x153907(0x172)]()?_0xc6a5['trim']():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a143_0x2628(){const _0x2f4b69=['appCode','.claude','skills','validation','126PTqkDQ','SKILL_ROOT','8SahlyL','7504875pWYaTs','claudeSkillsDir','26970atNhpV','homeDirName','5720092MLgIMl','650116nKWDqB','includes','skillCode','5262960GOFhDY','2eGAlSg','trim','cacheRoot','446655WMpOXa','27140VWBPUX','3377EedoJD','filter','.workbuddy','agentsSkillsDir','cache'];a143_0x2628=function(){return _0x2f4b69;};return a143_0x2628();}(function(_0x6462be,_0x423cfa){const _0x2817ef=a143_0x5e1b,_0x33419e=_0x6462be();while(!![]){try{const _0x4fd416=parseInt(_0x2817ef(0x1ef))/0x1*(parseInt(_0x2817ef(0x1f3))/0x2)+-parseInt(_0x2817ef(0x1dc))/0x3*(-parseInt(_0x2817ef(0x1e9))/0x4)+parseInt(_0x2817ef(0x1dd))/0x5*(-parseInt(_0x2817ef(0x1e7))/0x6)+parseInt(_0x2817ef(0x1ee))/0x7+parseInt(_0x2817ef(0x1f2))/0x8+-parseInt(_0x2817ef(0x1ea))/0x9+-parseInt(_0x2817ef(0x1ec))/0xa*(parseInt(_0x2817ef(0x1de))/0xb);if(_0x4fd416===_0x423cfa)break;else _0x33419e['push'](_0x33419e['shift']());}catch(_0x5d01a4){_0x33419e['push'](_0x33419e['shift']());}}}(a143_0x2628,0x9df9e));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(_0x5a2205={}){const _0x17bb15=a143_0x5e1b,_0x36c30d=_0x5a2205['homeDir']??homedir(),_0x4b3936=resolve(_0x36c30d,PRODUCT_CONFIG[_0x17bb15(0x1ed)],_0x17bb15(0x1e2)),_0x5b555c=trimmedEnv(_0x17bb15(0x1e8)),_0x4e404d=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x4b506f=resolve(_0x36c30d,_0x17bb15(0x1e0)),_0x37489a=_0x5a2205['workbuddySkillsDir']??(existsSync(_0x4b506f)?resolve(_0x4b506f,_0x17bb15(0x1e5)):undefined);return{'homeDir':_0x36c30d,'cacheRoot':_0x4b3936,'managedRoot':resolve(_0x36c30d,PRODUCT_CONFIG[_0x17bb15(0x1ed)]),'agentsSkillsDir':_0x5a2205[_0x17bb15(0x1e1)]??_0x5b555c??resolve(_0x36c30d,'.agents',_0x17bb15(0x1e5)),'claudeSkillsDir':_0x5a2205['claudeSkillsDir']??_0x4e404d??resolve(_0x36c30d,_0x17bb15(0x1e4),'skills'),'workbuddySkillsDir':_0x37489a};}export function runtimeAgentSkillRoots(_0x3dd1ba){const _0x306e6c=a143_0x5e1b;return[_0x3dd1ba['agentsSkillsDir'],_0x3dd1ba[_0x306e6c(0x1eb)],_0x3dd1ba['workbuddySkillsDir']][_0x306e6c(0x1df)](_0x317d7c=>Boolean(_0x317d7c));}export function getRuntimeSkillCacheRoot(_0x4e58b3,_0x14ea36,_0x550ffa={}){const _0x1d274c=a143_0x5e1b,_0x5b77a0=resolveSkillSyncPaths(_0x550ffa);return resolve(_0x5b77a0[_0x1d274c(0x1db)],_0x4e58b3,fingerprintAccessKey(_0x14ea36),_0x1d274c(0x1e5));}function a143_0x5e1b(_0x4cdf6e,_0x4b0b18){_0x4cdf6e=_0x4cdf6e-0x1db;const _0x2628df=a143_0x2628();let _0x5e1b4e=_0x2628df[_0x4cdf6e];return _0x5e1b4e;}export function getRuntimeSkillDir(_0x10f460,_0x523f4e,_0x1385e2,_0x22ff24,_0x377e30,_0x29584f={}){const _0x44c736=a143_0x5e1b;return resolve(getRuntimeSkillCacheRoot(_0x10f460,_0x523f4e,_0x29584f),safePathSegment(_0x1385e2,_0x44c736(0x1e3)),_0x22ff24,safePathSegment(_0x377e30,_0x44c736(0x1f1)));}export function safePathSegment(_0x41a2fc,_0x44c0f6='path\x20segment'){const _0x1953ae=a143_0x5e1b;if(!_0x41a2fc||_0x41a2fc[_0x1953ae(0x1f0)]('/')||_0x41a2fc[_0x1953ae(0x1f0)]('\x5c')||_0x41a2fc[_0x1953ae(0x1f0)]('..'))throw CliErrors[_0x1953ae(0x1e6)]('Unsafe\x20'+_0x44c0f6+'\x20for\x20local\x20path:\x20'+_0x41a2fc);return _0x41a2fc;}function trimmedEnv(_0x579517){const _0x4a3e9a=a143_0x5e1b,_0x5d43ae=productEnv(_0x579517)?.[_0x4a3e9a(0x1f4)]();return _0x5d43ae?_0x5d43ae:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3a7a24,_0x3cc9f2){const _0x1a7b5f=a144_0x24f2,_0x5041bc=_0x3a7a24();while(!![]){try{const _0x124740=parseInt(_0x1a7b5f(0xec))/0x1*(parseInt(_0x1a7b5f(0xf3))/0x2)+parseInt(_0x1a7b5f(0xfb))/0x3+-parseInt(_0x1a7b5f(0x121))/0x4*(-parseInt(_0x1a7b5f(0x104))/0x5)+parseInt(_0x1a7b5f(0x11c))/0x6+-parseInt(_0x1a7b5f(0x109))/0x7*(-parseInt(_0x1a7b5f(0xf0))/0x8)+parseInt(_0x1a7b5f(0x100))/0x9+parseInt(_0x1a7b5f(0xff))/0xa*(-parseInt(_0x1a7b5f(0x113))/0xb);if(_0x124740===_0x3cc9f2)break;else _0x5041bc['push'](_0x5041bc['shift']());}catch(_0x5f318b){_0x5041bc['push'](_0x5041bc['shift']());}}}(a144_0x5ca8,0xbc375));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a144_0xc7253d}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(_0x1b6231,_0x4f4af7,_0x31851d={}){const _0x39363f=a144_0x24f2,_0x40f496=resolvePushDirectoryRoot(_0x1b6231),_0x18758e=readPushMetadataIfPresent(resolve(_0x40f496,METADATA_FILE),{'ignoreInvalidMetadata':_0x31851d['ignoreInvalidMetadata']});if(_0x18758e?.[_0x39363f(0xf7)]&&_0x18758e[_0x39363f(0xf7)]!==_0x4f4af7&&!_0x31851d['allowAppCodeRetarget']&&!_0x31851d[_0x39363f(0x120)])throw CliErrors[_0x39363f(0x114)](_0x39363f(0x116)+_0x18758e[_0x39363f(0xf7)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4f4af7+'\x22.');const _0x174c48=resolvePushSkillCode(_0x40f496,_0x4f4af7,_0x18758e,_0x31851d);if(!_0x174c48)throw CliErrors[_0x39363f(0x114)](_0x39363f(0xef)+SKILL_FILE+',\x20'+METADATA_FILE+_0x39363f(0x126));return{'dir':_0x40f496,'skillCode':_0x174c48,'metadata':_0x18758e};}export function readPushDirectory(_0x47ddc4,_0x157d21,_0x4daa6c={}){const _0x1582cf=a144_0x24f2,_0x18ef50=resolvePushDirectoryIdentity(_0x47ddc4,_0x157d21,_0x4daa6c),_0x5f2ea2=_0x18ef50['dir'],_0x4019fd=resolve(_0x5f2ea2,SKILL_FILE);if(!existsSync(_0x4019fd)||!lstatSync(_0x4019fd)[_0x1582cf(0x111)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0x4019fd);const _0x46b496=_0x18ef50[_0x1582cf(0xf2)],_0x548067=_0x4daa6c[_0x1582cf(0xf5)]??_0x1582cf(0x110);if(!_0x4daa6c[_0x1582cf(0x102)]&&_0x46b496?.[_0x1582cf(0x127)]===_0x1582cf(0xed))throw CliErrors[_0x1582cf(0x114)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x46b496['scope']+'\x22.');if(!_0x4daa6c[_0x1582cf(0x102)]&&_0x548067===_0x1582cf(0x110)&&_0x46b496?.['scope']&&_0x46b496[_0x1582cf(0x127)]!=='personal')throw CliErrors[_0x1582cf(0x114)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x1582cf(0xf8)+_0x46b496[_0x1582cf(0x127)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x5f2ea2+_0x1582cf(0x108));const _0x76b668=scanSkillDirectory(_0x5f2ea2,{'excludedFilePaths':_0x4daa6c['excludedFilePaths']}),_0x188789=buildSkillPackage(_0x76b668),_0x2ea4fd=readFileSync(_0x4019fd,'utf8'),_0x28b960=_0x18ef50[_0x1582cf(0x10f)],_0x3cbe3c=_0x4daa6c[_0x1582cf(0xf1)]?undefined:_0x46b496,_0x2862e4=readSkillDisplayName(_0x2ea4fd);return{'skillCode':_0x28b960,'metadata':_0x46b496,'frontmatterDisplayName':_0x2862e4,'input':{'skillCode':_0x28b960,'skillName':_0x2862e4??_0x3cbe3c?.[_0x1582cf(0x10c)],'description':_0x3cbe3c?.['description'],'content':_0x2ea4fd,'files':_0x188789[_0x1582cf(0x105)],'packageBase64':_0x188789[_0x1582cf(0x12a)],'tags':_0x3cbe3c?.[_0x1582cf(0x119)],'version':_0x3cbe3c?.['version'],'sourceSessionId':_0x3cbe3c?.[_0x1582cf(0x10d)]}};}function a144_0x24f2(_0x5e663b,_0x4c4cd9){_0x5e663b=_0x5e663b-0xec;const _0x5ca8ec=a144_0x5ca8();let _0x24f252=_0x5ca8ec[_0x5e663b];return _0x24f252;}export function refreshPushDirectoryMetadataFromRemote(_0x3892c5,_0x47cb13,_0x4a6fae,_0x2c14e6={}){const _0x4add75=a144_0x24f2,_0x1fd16c=resolvePushDirectoryRoot(_0x3892c5),_0x4b97f1=readPushMetadataIfPresent(resolve(_0x1fd16c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x329b59=requireRemoteScope(_0x47cb13),_0x181834=readLocalSkillContent(_0x1fd16c),_0x4e3531={..._0x47cb13,'appCode':_0x47cb13[_0x4add75(0xf7)]??_0x4a6fae,'skillName':_0x47cb13[_0x4add75(0x10c)]??_0x4b97f1?.[_0x4add75(0x10c)],'description':_0x47cb13[_0x4add75(0x11d)]??_0x4b97f1?.['description'],'example':_0x47cb13[_0x4add75(0xfa)]??_0x4b97f1?.['example'],'tags':Array[_0x4add75(0x10e)](_0x47cb13[_0x4add75(0x119)])?_0x47cb13['tags']:_0x4b97f1?.[_0x4add75(0x119)],'sourceSessionId':_0x47cb13['sourceSessionId']??_0x4b97f1?.['sourceSessionId'],'content':_0x47cb13['content']??_0x181834},_0x213a33=buildMetadata(_0x4e3531,_0x329b59,_0x4a6fae,contentHash(_0x181834),_0x2c14e6[_0x4add75(0x118)]);writeJsonAtomic(resolve(_0x1fd16c,METADATA_FILE),_0x213a33);}export function recordPushedRuntimeSkill(_0x201934,_0x8ef0fd,_0x5570c2,_0x1169f9={}){const _0x2f8785=a144_0x24f2,_0x5e661b=resolvePushDirectoryRoot(_0x201934),_0x13649d=scanSkillDirectory(_0x5e661b),_0x5e9048=_0x13649d[_0x2f8785(0xf4)](_0x3654c0=>_0x3654c0[_0x2f8785(0x101)]===SKILL_FILE),_0x1140a5=_0x5e9048?fileText(_0x5e9048):'',_0x2a5693=tryNormalizePackageManifest(_0x8ef0fd[_0x2f8785(0x107)]),_0x22569d={..._0x8ef0fd,'content':_0x8ef0fd[_0x2f8785(0x11b)]??_0x1140a5,'files':_0x2a5693},_0x226463=_0x2a5693?normalizeLocalFiles(_0x13649d)[_0x2f8785(0x124)](_0x3fcc59=>_0x2a5693[_0x2f8785(0x107)][_0x2f8785(0x11e)](_0x22163b=>_0x22163b['path']===_0x3fcc59[_0x2f8785(0x101)])):undefined,_0x3ffc0c=buildMetadata(_0x22569d,_0x1169f9[_0x2f8785(0x127)]??_0x2f8785(0x110),_0x5570c2,contentHash(_0x22569d[_0x2f8785(0x11b)]??''),_0x1169f9['pushedAt'],_0x226463);writeJsonAtomic(resolve(_0x5e661b,METADATA_FILE),_0x3ffc0c);}export function deriveSkillCodeFromDirectory(_0x5c3286,_0x40f600){const _0xb9ac2c=a144_0x24f2,_0x369b31=basename(resolve(_0x5c3286)),_0x4cb5d3=_0x40f600+'--';return _0x369b31['startsWith'](_0x4cb5d3)?_0x369b31[_0xb9ac2c(0x11f)](_0x4cb5d3['length']):_0x369b31;}function resolvePushSkillCode(_0x245857,_0x1e184a,_0x298d4c,_0x4b4519){const _0x90e980=a144_0x24f2,_0x408ad8=deriveSkillCodeFromSkillFile(_0x245857)||deriveSkillCodeFromDirectory(_0x245857,_0x1e184a);if(_0x4b4519[_0x90e980(0xf6)])return _0x408ad8;return _0x298d4c?.[_0x90e980(0x10f)]?.[_0x90e980(0x115)]()||_0x408ad8;}function deriveSkillCodeFromSkillFile(_0x3d6d0e){const _0xc6c305=a144_0x24f2,_0x464d9c=resolve(_0x3d6d0e,SKILL_FILE);if(!existsSync(_0x464d9c)||!lstatSync(_0x464d9c)['isFile']())return undefined;const _0x3b8437=readFileSync(_0x464d9c,_0xc6c305(0x10a)),_0xf806eb=_0x3b8437[_0xc6c305(0xf9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xf806eb)return undefined;const _0x3294f3=parseFrontmatterObject(_0xf806eb[0x1]??''),_0x1d238c=scalarToString(_0x3294f3?.[_0xc6c305(0x125)]);return _0x1d238c?slugifySkillName(_0x1d238c):undefined;}function readSkillDisplayName(_0x2ec07d){const _0x59302e=a144_0x24f2,_0x189a58=_0x2ec07d[_0x59302e(0xf9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x189a58)return undefined;const _0x187a5e=parseFrontmatterObject(_0x189a58[0x1]??'');return scalarToString(_0x187a5e?.['displayName']);}function slugifySkillName(_0x2df6d4){const _0x3518d8=a144_0x24f2,_0x2dbf78=_0x2df6d4[_0x3518d8(0x115)]()['toLowerCase']()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3518d8(0x10b)](/^-+/,'')[_0x3518d8(0x10b)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x2dbf78)throw CliErrors[_0x3518d8(0x114)]('Invalid\x20'+SKILL_FILE+_0x3518d8(0x106));return _0x2dbf78;}function parseFrontmatterObject(_0x204b33){const _0x3cc426=a144_0x24f2;try{const _0x3d6314=a144_0xc7253d(_0x204b33);return _0x3d6314&&typeof _0x3d6314===_0x3cc426(0x123)&&!Array[_0x3cc426(0x10e)](_0x3d6314)?_0x3d6314:undefined;}catch{return undefined;}}function a144_0x5ca8(){const _0x349115=['example','1148994WeGeAR','isDirectory','company','number','1004250nXBUjt','2585952PmALwx','path','ignoreMetadataScope','ignoreInvalidMetadata','5ULkXOK','manifest','\x20name\x20for\x20SkillHub\x20slug\x20generation.','files','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','49oafMGl','utf8','replace','skillName','sourceSessionId','isArray','skillCode','personal','isFile','boolean','330wkfnBN','validation','trim','Skill\x20metadata\x20appCode\x20\x22','\x20has\x20unsupported\x20scope\x20\x22','refreshedAt','tags','isSymbolicLink','content','3358542roJjrn','description','some','slice','ignoreMetadataAppCodeMismatch','962860ItEWwg','Skill\x20directory\x20not\x20found:\x20','object','filter','name',',\x20or\x20directory\x20name.','scope','Remote\x20Skill\x20','unknown','packageBase64','string','31JhvncC','builtin','(unknown)','Unable\x20to\x20resolve\x20skillCode\x20from\x20','1374848FREVtk','ignoreMetadataForPayload','metadata','71606pBbVtX','find','targetScope','ignoreMetadataSkillCode','appCode','\x20has\x20scope=\x22','match'];a144_0x5ca8=function(){return _0x349115;};return a144_0x5ca8();}function scalarToString(_0x478cab){const _0x8a23d4=a144_0x24f2;if(typeof _0x478cab===_0x8a23d4(0x12b))return _0x478cab[_0x8a23d4(0x115)]();if(typeof _0x478cab===_0x8a23d4(0xfe)||typeof _0x478cab===_0x8a23d4(0x112))return String(_0x478cab);return undefined;}function resolvePushDirectoryRoot(_0x280b8f){const _0x268b70=a144_0x24f2,_0x36d941=resolve(_0x280b8f);if(!existsSync(_0x36d941))throw CliErrors['validation'](_0x268b70(0x122)+_0x280b8f);const _0xd9a4d2=lstatSync(_0x36d941);if(_0xd9a4d2['isDirectory']())return _0x36d941;if(_0xd9a4d2[_0x268b70(0x11a)]()){const _0x523b66=realpathSync(_0x36d941);if(lstatSync(_0x523b66)[_0x268b70(0xfc)]())return _0x523b66;}throw CliErrors[_0x268b70(0x114)]('Skill\x20directory\x20not\x20found:\x20'+_0x280b8f);}function requireRemoteScope(_0x8bdf50){const _0x9f221a=a144_0x24f2;if(_0x8bdf50[_0x9f221a(0x127)]===_0x9f221a(0x110)||_0x8bdf50[_0x9f221a(0x127)]===_0x9f221a(0xfd)||_0x8bdf50['scope']===_0x9f221a(0xed))return _0x8bdf50[_0x9f221a(0x127)];throw CliErrors[_0x9f221a(0x114)](_0x9f221a(0x128)+(_0x8bdf50['skillCode']||_0x9f221a(0xee))+_0x9f221a(0x117)+(_0x8bdf50[_0x9f221a(0x127)]??_0x9f221a(0x129))+'\x22.');}function readLocalSkillContent(_0x270de3){const _0x554d38=a144_0x24f2,_0x1d9cce=resolve(_0x270de3,SKILL_FILE);return existsSync(_0x1d9cce)&&lstatSync(_0x1d9cce)['isFile']()?readFileSync(_0x1d9cce,_0x554d38(0x10a)):'';}function readPushMetadataIfPresent(_0x8d8047,_0x2f7447={}){const _0x44dfcc=a144_0x24f2;try{return readMetadataIfPresent(_0x8d8047);}catch(_0x66c5a1){if(_0x2f7447[_0x44dfcc(0x103)])return undefined;throw _0x66c5a1;}}
|
|
1
|
+
function a144_0x3426(){const _0xa18545=['ignoreMetadataSkillCode','utf8','Remote\x20Skill\x20','12dkEffs','metadata','sourceSessionId','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','displayName','Skill\x20metadata\x20appCode\x20\x22','Unable\x20to\x20resolve\x20skillCode\x20from\x20','name','isArray','Missing\x20','skillName','trim','version','manifest','boolean','\x20has\x20unsupported\x20scope\x20\x22','example','ignoreMetadataAppCodeMismatch','310484nZFmcA','object','toLowerCase','some','dir','isDirectory','skillCode','allowAppCodeRetarget','111220voSMkH','isSymbolicLink','packageBase64','personal','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','targetScope','1986192DwmBNv','203DzfIZH','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','replace','length','25490GNJnco','\x20name\x20for\x20SkillHub\x20slug\x20generation.','slice','(unknown)',',\x20or\x20directory\x20name.','appCode','scope','Skill\x20directory\x20not\x20found:\x20','tags','match','455841Ynqvzu','3GEkcQf','builtin','isFile','files','Invalid\x20','ignoreMetadataScope','validation','company','319DJNiya','ignoreInvalidMetadata','excludedFilePaths','104kunWLd','31056fSkmgv','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','pushedAt','number','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','path','content'];a144_0x3426=function(){return _0xa18545;};return a144_0x3426();}(function(_0x76318f,_0x21a81e){const _0x4014f2=a144_0x46e8,_0xdf8187=_0x76318f();while(!![]){try{const _0x92dcc6=-parseInt(_0x4014f2(0x112))/0x1+-parseInt(_0x4014f2(0x12e))/0x2*(-parseInt(_0x4014f2(0x14c))/0x3)+parseInt(_0x4014f2(0x111))/0x4*(parseInt(_0x4014f2(0x141))/0x5)+-parseInt(_0x4014f2(0x11c))/0x6*(-parseInt(_0x4014f2(0x13d))/0x7)+parseInt(_0x4014f2(0x13c))/0x8+-parseInt(_0x4014f2(0x14b))/0x9+-parseInt(_0x4014f2(0x136))/0xa*(parseInt(_0x4014f2(0x10e))/0xb);if(_0x92dcc6===_0x21a81e)break;else _0xdf8187['push'](_0xdf8187['shift']());}catch(_0x5abfaf){_0xdf8187['push'](_0xdf8187['shift']());}}}(a144_0x3426,0x20327));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a144_0x46e8(_0x371021,_0x2f89be){_0x371021=_0x371021-0x108;const _0x3426d1=a144_0x3426();let _0x46e8c8=_0x3426d1[_0x371021];return _0x46e8c8;}import{basename,resolve}from'node:path';import{parse as a144_0x213816}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(_0x411721,_0x56e6a2,_0x16d3e7={}){const _0x13a7f2=a144_0x46e8,_0x59cb9a=resolvePushDirectoryRoot(_0x411721),_0x4c328d=readPushMetadataIfPresent(resolve(_0x59cb9a,METADATA_FILE),{'ignoreInvalidMetadata':_0x16d3e7['ignoreInvalidMetadata']});if(_0x4c328d?.[_0x13a7f2(0x146)]&&_0x4c328d['appCode']!==_0x56e6a2&&!_0x16d3e7[_0x13a7f2(0x135)]&&!_0x16d3e7[_0x13a7f2(0x12d)])throw CliErrors['validation'](_0x13a7f2(0x121)+_0x4c328d[_0x13a7f2(0x146)]+_0x13a7f2(0x116)+_0x56e6a2+'\x22.');const _0x495e41=resolvePushSkillCode(_0x59cb9a,_0x56e6a2,_0x4c328d,_0x16d3e7);if(!_0x495e41)throw CliErrors[_0x13a7f2(0x10c)](_0x13a7f2(0x122)+SKILL_FILE+',\x20'+METADATA_FILE+_0x13a7f2(0x145));return{'dir':_0x59cb9a,'skillCode':_0x495e41,'metadata':_0x4c328d};}export function readPushDirectory(_0x2bb2ec,_0x185dc8,_0x24e776={}){const _0x4864b9=a144_0x46e8,_0x3ad7d8=resolvePushDirectoryIdentity(_0x2bb2ec,_0x185dc8,_0x24e776),_0x5d7a0e=_0x3ad7d8[_0x4864b9(0x132)],_0xf1e6ad=resolve(_0x5d7a0e,SKILL_FILE);if(!existsSync(_0xf1e6ad)||!lstatSync(_0xf1e6ad)[_0x4864b9(0x108)]())throw CliErrors[_0x4864b9(0x10c)](_0x4864b9(0x125)+SKILL_FILE+':\x20'+_0xf1e6ad);const _0x2a598d=_0x3ad7d8[_0x4864b9(0x11d)],_0x40fe51=_0x24e776[_0x4864b9(0x13b)]??_0x4864b9(0x139);if(!_0x24e776[_0x4864b9(0x10b)]&&_0x2a598d?.[_0x4864b9(0x147)]===_0x4864b9(0x14d))throw CliErrors[_0x4864b9(0x10c)](_0x4864b9(0x113)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x2a598d[_0x4864b9(0x147)]+'\x22.');if(!_0x24e776[_0x4864b9(0x10b)]&&_0x40fe51===_0x4864b9(0x139)&&_0x2a598d?.[_0x4864b9(0x147)]&&_0x2a598d[_0x4864b9(0x147)]!==_0x4864b9(0x139))throw CliErrors[_0x4864b9(0x10c)](_0x4864b9(0x13a)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x2a598d[_0x4864b9(0x147)]+'\x22.',_0x4864b9(0x11f)+_0x5d7a0e+_0x4864b9(0x13e));const _0x47dbd7=scanSkillDirectory(_0x5d7a0e,{'excludedFilePaths':_0x24e776[_0x4864b9(0x110)]}),_0x148e8c=buildSkillPackage(_0x47dbd7),_0xb09459=readFileSync(_0xf1e6ad,_0x4864b9(0x11a)),_0xd69087=_0x3ad7d8[_0x4864b9(0x134)],_0x5aa5f4=_0x24e776['ignoreMetadataForPayload']?undefined:_0x2a598d,_0xd80455=readSkillDisplayName(_0xb09459);return{'skillCode':_0xd69087,'metadata':_0x2a598d,'frontmatterDisplayName':_0xd80455,'input':{'skillCode':_0xd69087,'skillName':_0xd80455??_0x5aa5f4?.['skillName'],'description':_0x5aa5f4?.['description'],'content':_0xb09459,'files':_0x148e8c[_0x4864b9(0x129)],'packageBase64':_0x148e8c[_0x4864b9(0x138)],'tags':_0x5aa5f4?.[_0x4864b9(0x149)],'version':_0x5aa5f4?.[_0x4864b9(0x128)],'sourceSessionId':_0x5aa5f4?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x2ed2ae,_0x29e702,_0x6423e1,_0x56821f={}){const _0x12baf0=a144_0x46e8,_0x1a9493=resolvePushDirectoryRoot(_0x2ed2ae),_0x208e57=readPushMetadataIfPresent(resolve(_0x1a9493,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x209b9e=requireRemoteScope(_0x29e702),_0xfc23=readLocalSkillContent(_0x1a9493),_0x27b5b5={..._0x29e702,'appCode':_0x29e702[_0x12baf0(0x146)]??_0x6423e1,'skillName':_0x29e702['skillName']??_0x208e57?.[_0x12baf0(0x126)],'description':_0x29e702['description']??_0x208e57?.['description'],'example':_0x29e702[_0x12baf0(0x12c)]??_0x208e57?.[_0x12baf0(0x12c)],'tags':Array[_0x12baf0(0x124)](_0x29e702[_0x12baf0(0x149)])?_0x29e702[_0x12baf0(0x149)]:_0x208e57?.[_0x12baf0(0x149)],'sourceSessionId':_0x29e702[_0x12baf0(0x11e)]??_0x208e57?.[_0x12baf0(0x11e)],'content':_0x29e702['content']??_0xfc23},_0x375e6f=buildMetadata(_0x27b5b5,_0x209b9e,_0x6423e1,contentHash(_0xfc23),_0x56821f['refreshedAt']);writeJsonAtomic(resolve(_0x1a9493,METADATA_FILE),_0x375e6f);}export function recordPushedRuntimeSkill(_0x5226f5,_0x37f401,_0x2a43ac,_0x2e474c={}){const _0x5d680a=a144_0x46e8,_0x5ea048=resolvePushDirectoryRoot(_0x5226f5),_0x188824=scanSkillDirectory(_0x5ea048),_0x29ddc6=_0x188824['find'](_0x19d3f4=>_0x19d3f4[_0x5d680a(0x117)]===SKILL_FILE),_0x7ceb38=_0x29ddc6?fileText(_0x29ddc6):'',_0x4d1b1e=tryNormalizePackageManifest(_0x37f401[_0x5d680a(0x109)]),_0x5c5a7e={..._0x37f401,'content':_0x37f401[_0x5d680a(0x118)]??_0x7ceb38,'files':_0x4d1b1e},_0x21caf7=_0x4d1b1e?normalizeLocalFiles(_0x188824)['filter'](_0x3585fd=>_0x4d1b1e[_0x5d680a(0x109)][_0x5d680a(0x131)](_0x2c80e2=>_0x2c80e2[_0x5d680a(0x117)]===_0x3585fd['path'])):undefined,_0x1b281b=buildMetadata(_0x5c5a7e,_0x2e474c[_0x5d680a(0x147)]??_0x5d680a(0x139),_0x2a43ac,contentHash(_0x5c5a7e['content']??''),_0x2e474c[_0x5d680a(0x114)],_0x21caf7);writeJsonAtomic(resolve(_0x5ea048,METADATA_FILE),_0x1b281b);}export function deriveSkillCodeFromDirectory(_0x485ed2,_0x57c57e){const _0x4a20d2=a144_0x46e8,_0x583624=basename(resolve(_0x485ed2)),_0x473480=_0x57c57e+'--';return _0x583624['startsWith'](_0x473480)?_0x583624[_0x4a20d2(0x143)](_0x473480[_0x4a20d2(0x140)]):_0x583624;}function resolvePushSkillCode(_0x594099,_0x257c16,_0x40383b,_0x3396a9){const _0x3276fe=a144_0x46e8,_0x400952=deriveSkillCodeFromSkillFile(_0x594099)||deriveSkillCodeFromDirectory(_0x594099,_0x257c16);if(_0x3396a9[_0x3276fe(0x119)])return _0x400952;return _0x40383b?.[_0x3276fe(0x134)]?.[_0x3276fe(0x127)]()||_0x400952;}function deriveSkillCodeFromSkillFile(_0xb38b43){const _0x3fbbdd=a144_0x46e8,_0x221119=resolve(_0xb38b43,SKILL_FILE);if(!existsSync(_0x221119)||!lstatSync(_0x221119)[_0x3fbbdd(0x108)]())return undefined;const _0x5cf96c=readFileSync(_0x221119,_0x3fbbdd(0x11a)),_0xf11308=_0x5cf96c[_0x3fbbdd(0x14a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xf11308)return undefined;const _0x1c3b35=parseFrontmatterObject(_0xf11308[0x1]??''),_0x530b1e=scalarToString(_0x1c3b35?.[_0x3fbbdd(0x123)]);return _0x530b1e?slugifySkillName(_0x530b1e):undefined;}function readSkillDisplayName(_0x291c33){const _0x28e785=a144_0x46e8,_0x45c258=_0x291c33[_0x28e785(0x14a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x45c258)return undefined;const _0xf2cf27=parseFrontmatterObject(_0x45c258[0x1]??'');return scalarToString(_0xf2cf27?.[_0x28e785(0x120)]);}function slugifySkillName(_0x79d69b){const _0xe70285=a144_0x46e8,_0x20eac7=_0x79d69b['trim']()[_0xe70285(0x130)]()[_0xe70285(0x13f)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0xe70285(0x13f)](/^-+/,'')[_0xe70285(0x13f)](/-+$/,'')[_0xe70285(0x13f)](/-{2,}/g,'-');if(!_0x20eac7)throw CliErrors[_0xe70285(0x10c)](_0xe70285(0x10a)+SKILL_FILE+_0xe70285(0x142));return _0x20eac7;}function parseFrontmatterObject(_0x3f7182){const _0x20a33e=a144_0x46e8;try{const _0x275e38=a144_0x213816(_0x3f7182);return _0x275e38&&typeof _0x275e38===_0x20a33e(0x12f)&&!Array[_0x20a33e(0x124)](_0x275e38)?_0x275e38:undefined;}catch{return undefined;}}function scalarToString(_0x349813){const _0x593d47=a144_0x46e8;if(typeof _0x349813==='string')return _0x349813[_0x593d47(0x127)]();if(typeof _0x349813===_0x593d47(0x115)||typeof _0x349813===_0x593d47(0x12a))return String(_0x349813);return undefined;}function resolvePushDirectoryRoot(_0x4a77c2){const _0x1d45f9=a144_0x46e8,_0xf089a7=resolve(_0x4a77c2);if(!existsSync(_0xf089a7))throw CliErrors['validation'](_0x1d45f9(0x148)+_0x4a77c2);const _0x402e4e=lstatSync(_0xf089a7);if(_0x402e4e[_0x1d45f9(0x133)]())return _0xf089a7;if(_0x402e4e[_0x1d45f9(0x137)]()){const _0xb0669f=realpathSync(_0xf089a7);if(lstatSync(_0xb0669f)['isDirectory']())return _0xb0669f;}throw CliErrors[_0x1d45f9(0x10c)]('Skill\x20directory\x20not\x20found:\x20'+_0x4a77c2);}function requireRemoteScope(_0x121c24){const _0x459bd=a144_0x46e8;if(_0x121c24[_0x459bd(0x147)]===_0x459bd(0x139)||_0x121c24[_0x459bd(0x147)]===_0x459bd(0x10d)||_0x121c24[_0x459bd(0x147)]==='builtin')return _0x121c24['scope'];throw CliErrors[_0x459bd(0x10c)](_0x459bd(0x11b)+(_0x121c24['skillCode']||_0x459bd(0x144))+_0x459bd(0x12b)+(_0x121c24[_0x459bd(0x147)]??'unknown')+'\x22.');}function readLocalSkillContent(_0x107648){const _0x5ec5ee=a144_0x46e8,_0x591896=resolve(_0x107648,SKILL_FILE);return existsSync(_0x591896)&&lstatSync(_0x591896)[_0x5ec5ee(0x108)]()?readFileSync(_0x591896,_0x5ec5ee(0x11a)):'';}function readPushMetadataIfPresent(_0x40ff0a,_0x471f69={}){const _0x42a8eb=a144_0x46e8;try{return readMetadataIfPresent(_0x40ff0a);}catch(_0x446125){if(_0x471f69[_0x42a8eb(0x10f)])return undefined;throw _0x446125;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x440c60,_0x2227ab){const _0x44e993=a145_0x47fb,_0x51e003=_0x440c60();while(!![]){try{const _0x47fe5a=-parseInt(_0x44e993(0x1e0))/0x1+parseInt(_0x44e993(0x1d5))/0x2+-parseInt(_0x44e993(0x1e2))/0x3+-parseInt(_0x44e993(0x1dd))/0x4+parseInt(_0x44e993(0x1d6))/0x5+-parseInt(_0x44e993(0x1dc))/0x6*(-parseInt(_0x44e993(0x1d9))/0x7)+parseInt(_0x44e993(0x1e1))/0x8*(parseInt(_0x44e993(0x1df))/0x9);if(_0x47fe5a===_0x2227ab)break;else _0x51e003['push'](_0x51e003['shift']());}catch(_0x2c8516){_0x51e003['push'](_0x51e003['shift']());}}}(a145_0x1648,0xc5bac));function a145_0x47fb(_0x24b436,_0x58feeb){_0x24b436=_0x24b436-0x1d5;const _0x164863=a145_0x1648();let _0x47fba5=_0x164863[_0x24b436];return _0x47fba5;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x131d4f){const _0x525600=a145_0x47fb,_0x2dfbec=_0x131d4f&&_0x131d4f[_0x525600(0x1e3)]>0x0?_0x131d4f:[_0x525600(0x1e4),_0x525600(0x1d7),'builtin'],_0x25dc0a=[];for(const _0x4464ec of _0x2dfbec){if(!isRuntimeSkillScope(_0x4464ec))throw CliErrors[_0x525600(0x1da)](_0x525600(0x1d8)+_0x4464ec);!_0x25dc0a[_0x525600(0x1db)](_0x4464ec)&&_0x25dc0a[_0x525600(0x1de)](_0x4464ec);}return _0x25dc0a;}export function isRuntimeSkillScope(_0x2bfb7){return _0x2bfb7==='personal'||_0x2bfb7==='company'||_0x2bfb7==='builtin';}function a145_0x1648(){const _0x4862f4=['6006195SJNwOH','company','Unsupported\x20runtime\x20Skill\x20scope:\x20','21Rppums','validation','includes','692862qkLQkx','4139268jDCTAy','push','9918ZFINrD','49967QVmFIQ','2176ZBcxgZ','1750035ACIdtl','length','personal','1261230nWcsaD'];a145_0x1648=function(){return _0x4862f4;};return a145_0x1648();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a147_0x1024(_0x4a315b,_0x52a04c){_0x4a315b=_0x4a315b-0x16f;const _0x41f591=a147_0x41f5();let _0x102428=_0x41f591[_0x4a315b];return _0x102428;}const a147_0x3fbdb7=a147_0x1024;(function(_0x210dec,_0x19b256){const _0xaf6c2e=a147_0x1024,_0x1b95a5=_0x210dec();while(!![]){try{const _0x24607a=parseInt(_0xaf6c2e(0x181))/0x1+parseInt(_0xaf6c2e(0x174))/0x2*(-parseInt(_0xaf6c2e(0x177))/0x3)+-parseInt(_0xaf6c2e(0x184))/0x4*(parseInt(_0xaf6c2e(0x16f))/0x5)+-parseInt(_0xaf6c2e(0x172))/0x6*(parseInt(_0xaf6c2e(0x17a))/0x7)+-parseInt(_0xaf6c2e(0x185))/0x8+-parseInt(_0xaf6c2e(0x186))/0x9*(parseInt(_0xaf6c2e(0x182))/0xa)+-parseInt(_0xaf6c2e(0x171))/0xb*(-parseInt(_0xaf6c2e(0x17c))/0xc);if(_0x24607a===_0x19b256)break;else _0x1b95a5['push'](_0x1b95a5['shift']());}catch(_0x48f479){_0x1b95a5['push'](_0x1b95a5['shift']());}}}(a147_0x41f5,0x83a11));function a147_0x41f5(){const _0x461ec2=['validation_error','1980-01-01T00:00:00.000Z','424334pIfTZX','6077390tbSbVT','endsWith','282476cRHisc','426376spJIUX','9qlUEpf','70vlEiQy','object','1835317jrqFVv','182118QJYklo','entries','112106xTAmjj','path','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','33nUWuFz','map','code','105cIjvLF','length','204fXiYSb','from','validation'];a147_0x41f5=function(){return _0x461ec2;};return a147_0x41f5();}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a147_0x3fbdb7(0x180));export function createDeterministicZipPackage(_0x1a697a){const _0x38dcab=a147_0x3fbdb7,_0x28f465={};for(const _0x2f62e5 of normalizeLocalFiles(_0x1a697a)){_0x28f465[_0x2f62e5[_0x38dcab(0x175)]]=fileContent(_0x2f62e5);}return Buffer[_0x38dcab(0x17d)](zipSync(_0x28f465,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x5b57ba){const _0x473320=a147_0x3fbdb7;if(_0x5b57ba[_0x473320(0x17b)]<0x16)throw CliErrors[_0x473320(0x17e)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x5b8cad;try{_0x5b8cad=unzipSync(_0x5b57ba,{'filter'(_0x13bcc3){const _0xf222ca=_0x473320,_0x1b4b9d=normalizeSkillRelativePath(_0x13bcc3['name']);if(_0x1b4b9d[_0xf222ca(0x183)]('/'))throw CliErrors[_0xf222ca(0x17e)](_0xf222ca(0x176)+_0x1b4b9d);return!![];}});}catch(_0xb895aa){if(isRuntimeSkillValidationError(_0xb895aa))throw _0xb895aa;throw CliErrors[_0x473320(0x17e)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x473320(0x173)](_0x5b8cad)[_0x473320(0x178)](([_0x1a56a9,_0x5806d3])=>({'path':normalizeSkillRelativePath(_0x1a56a9),'bytes':Buffer['from'](_0x5806d3)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x542254){const _0x3f2680=a147_0x3fbdb7;return typeof _0x542254===_0x3f2680(0x170)&&_0x542254!==null&&'code'in _0x542254&&_0x542254[_0x3f2680(0x179)]===_0x3f2680(0x17f);}
|