@lovrabet/lovrabet-cli 2.1.7 → 2.1.8-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/artifact/index.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 -0
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -0
- 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/ocr/index.js +1 -0
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.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/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/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 -0
- package/lib/commands/skill/push-flow-helpers.js +1 -0
- 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/workspace/index.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/dryrun.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/preparse.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.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/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/utils/apply-jq-filter.js +1 -1
- package/lib/utils/logger.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/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5a68e8,_0x544858){const _0x12d437=a93_0x9b6e,_0x4023ba=_0x5a68e8();while(!![]){try{const _0x4a9d49=parseInt(_0x12d437(0x1c5))/0x1+-parseInt(_0x12d437(0x1c9))/0x2*(-parseInt(_0x12d437(0x1c6))/0x3)+-parseInt(_0x12d437(0x1be))/0x4+-parseInt(_0x12d437(0x1c0))/0x5+-parseInt(_0x12d437(0x1c4))/0x6*(parseInt(_0x12d437(0x1bf))/0x7)+-parseInt(_0x12d437(0x1c7))/0x8*(parseInt(_0x12d437(0x1bb))/0x9)+-parseInt(_0x12d437(0x1c3))/0xa*(-parseInt(_0x12d437(0x1c1))/0xb);if(_0x4a9d49===_0x544858)break;else _0x4023ba['push'](_0x4023ba['shift']());}catch(_0xfdd385){_0x4023ba['push'](_0x4023ba['shift']());}}}(a93_0xd00a,0xc519f));import{jsx as a93_0x950ae6,jsxs as a93_0x1a0965}from'react/jsx-runtime';function a93_0xd00a(){const _0x3ef650=['\x20--help','8210zQbkAf','244806qDADuZ','1185835KAOvYN','3UHUaGi','264rrMPhC','column','1467026IGUTQq','304317MdxvdC','\x20\x20Use\x20','green','1305948SUvuTV','7vWrqgV','5685405ruAUnK','20207NMSMDn'];a93_0xd00a=function(){return _0x3ef650;};return a93_0xd00a();}function a93_0x9b6e(_0x431356,_0x5215fb){_0x431356=_0x431356-0x1bb;const _0xd00ad7=a93_0xd00a();let _0x9b6e1f=_0xd00ad7[_0x431356];return _0x9b6e1f;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x59a474=a93_0x9b6e,{exit:_0x2eebf9}=useApp();return useEffect(()=>{_0x2eebf9();},[_0x2eebf9]),a93_0x1a0965(Box,{'flexDirection':_0x59a474(0x1c8),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0x950ae6(Box,{'children':a93_0x950ae6(Text,{'bold':!![],'color':_0x59a474(0x1bd),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x1a0965(Box,{'marginTop':0x1,'children':[a93_0x950ae6(Text,{'dimColor':!![],'children':_0x59a474(0x1bc)}),a93_0x950ae6(Text,{'bold':!![],'color':_0x59a474(0x1bd),'children':CLI_BIN_NAME+_0x59a474(0x1c2)}),a93_0x950ae6(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d92c2,_0x3d9664){const _0x509b0e=a94_0x1f37,_0x283ec6=_0x1d92c2();while(!![]){try{const _0x419970=parseInt(_0x509b0e(0x87))/0x1*(parseInt(_0x509b0e(0x8e))/0x2)+parseInt(_0x509b0e(0x93))/0x3*(parseInt(_0x509b0e(0x8f))/0x4)+parseInt(_0x509b0e(0x9a))/0x5*(parseInt(_0x509b0e(0x9c))/0x6)+parseInt(_0x509b0e(0x85))/0x7+-parseInt(_0x509b0e(0x92))/0x8*(-parseInt(_0x509b0e(0x88))/0x9)+parseInt(_0x509b0e(0x8b))/0xa*(-parseInt(_0x509b0e(0x89))/0xb)+-parseInt(_0x509b0e(0x9d))/0xc;if(_0x419970===_0x3d9664)break;else _0x283ec6['push'](_0x283ec6['shift']());}catch(_0x30b793){_0x283ec6['push'](_0x283ec6['shift']());}}}(a94_0x514e,0x85533));function a94_0x1f37(_0x5e3a76,_0x2aa303){_0x5e3a76=_0x5e3a76-0x85;const _0x514ea1=a94_0x514e();let _0x1f3760=_0x514ea1[_0x5e3a76];return _0x1f3760;}import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a94_0x32273d}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a94_0x514e(){const _0x2f0324=['status','unknown','trim','925330kypIfb','npx','30qvIuTf','24413460IyOAYb','5128536PyUPAW','add','6tLTYBq','234VeRxuc','11VlqkGg','exit\x20','9602930CjqAWo','toString','stdio','249518Xbctjb','52TZmLId','log','join','321496wSjhNF','20643UONBwl','stderr','pipe','skills'];a94_0x514e=function(){return _0x2f0324;};return a94_0x514e();}export const LOVRABET_SKILL_SOURCE=a94_0x32273d;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x35766e,_0x186347=LOVRABET_SKILL_SOURCE,_0x14c9e3){const _0xd20071=a94_0x1f37;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x473477=_0x14c9e3?.[_0xd20071(0x8d)]??'inherit',_0x5aef90=resolveNpmBin(_0xd20071(0x9b)),_0x504605=[_0xd20071(0x96),_0xd20071(0x86),_0x186347,'-g','-y'],_0x93e0d7=[_0x5aef90,..._0x504605][_0xd20071(0x91)]('\x20');console[_0xd20071(0x90)]('*\x20'+_0x93e0d7);const _0x4f74df=spawnSync(_0x5aef90,_0x504605,{'cwd':_0x35766e,'stdio':_0x473477,'env':process.env,'shell':![]});if(_0x4f74df['status']===0x0)return{'ok':!![],'status':0x0};let _0x56ac60=_0xd20071(0x8a)+(_0x4f74df[_0xd20071(0x97)]??_0xd20071(0x98));if(_0x473477===_0xd20071(0x95)){const _0x3d4251=_0x4f74df[_0xd20071(0x94)]?_0x4f74df['stderr'][_0xd20071(0x8c)]()[_0xd20071(0x99)]():'',_0x5e2ba6=_0x4f74df['stdout']?_0x4f74df['stdout'][_0xd20071(0x8c)]()[_0xd20071(0x99)]():'';if(_0x3d4251)_0x56ac60=_0x3d4251;else{if(_0x5e2ba6)_0x56ac60=_0x5e2ba6;}}return{'ok':![],'status':_0x4f74df[_0xd20071(0x97)]??null,'error':_0x56ac60};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x699e(_0x318091,_0xcddd59){_0x318091=_0x318091-0x1b1;const _0x13af86=a95_0x13af();let _0x699e38=_0x13af86[_0x318091];return _0x699e38;}const a95_0x39b1e9=a95_0x699e;function a95_0x13af(){const _0x1b6f31=['210088puHxAK','13118980zXpXjW','build','4FWwBQo','173345hOhdKt','SKILL.md','lovrabet.skill.json','dist','.git','8wrVWMf','506JbXACS','.cache','154221RPPieF','.hg','coverage','7083818oYxVyV','.next','node_modules','8766126qwxwSr','6kqsYyo','.svn','132jooTPK','359124fhhbEi','.DS_Store'];a95_0x13af=function(){return _0x1b6f31;};return a95_0x13af();}(function(_0x195960,_0x24c5a6){const _0x412685=a95_0x699e,_0x4588a3=_0x195960();while(!![]){try{const _0x250c4c=parseInt(_0x412685(0x1b4))/0x1*(parseInt(_0x412685(0x1c3))/0x2)+-parseInt(_0x412685(0x1bb))/0x3*(parseInt(_0x412685(0x1c0))/0x4)+-parseInt(_0x412685(0x1c4))/0x5*(-parseInt(_0x412685(0x1bd))/0x6)+parseInt(_0x412685(0x1b7))/0x7+-parseInt(_0x412685(0x1b1))/0x8*(parseInt(_0x412685(0x1ba))/0x9)+parseInt(_0x412685(0x1c1))/0xa+-parseInt(_0x412685(0x1b2))/0xb*(parseInt(_0x412685(0x1be))/0xc);if(_0x250c4c===_0x24c5a6)break;else _0x4588a3['push'](_0x4588a3['shift']());}catch(_0x30c45c){_0x4588a3['push'](_0x4588a3['shift']());}}}(a95_0x13af,0xe5544));export const METADATA_FILE=a95_0x39b1e9(0x1c6);export const SKILL_FILE=a95_0x39b1e9(0x1c5);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a95_0x39b1e9(0x1bf)]);export const IGNORED_DIR_NAMES=new Set([a95_0x39b1e9(0x1c8),a95_0x39b1e9(0x1b5),a95_0x39b1e9(0x1bc),a95_0x39b1e9(0x1b9),a95_0x39b1e9(0x1b8),a95_0x39b1e9(0x1c7),a95_0x39b1e9(0x1c2),a95_0x39b1e9(0x1b6),'.turbo',a95_0x39b1e9(0x1b3)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3496e6,_0x5087e1){const _0x538207=a96_0x2d57,_0x4147d0=_0x3496e6();while(!![]){try{const _0x5ae1cb=-parseInt(_0x538207(0x118))/0x1+parseInt(_0x538207(0x119))/0x2*(-parseInt(_0x538207(0x116))/0x3)+-parseInt(_0x538207(0x11d))/0x4+-parseInt(_0x538207(0x11a))/0x5+-parseInt(_0x538207(0x113))/0x6+parseInt(_0x538207(0x11b))/0x7*(parseInt(_0x538207(0x110))/0x8)+-parseInt(_0x538207(0x10e))/0x9*(-parseInt(_0x538207(0x114))/0xa);if(_0x5ae1cb===_0x5087e1)break;else _0x4147d0['push'](_0x4147d0['shift']());}catch(_0x2c9914){_0x4147d0['push'](_0x4147d0['shift']());}}}(a96_0x2487,0x97966));import{lstatSync,readlinkSync,realpathSync,renameSync,rmSync,writeFileSync}from'node:fs';import{dirname,isAbsolute,resolve,sep}from'node:path';function a96_0x2487(){const _0x297fd1=['Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','.tmp','validation','9FLupVY','startsWith','9673848COAfKm','isSymbolicLink','split','1962084WoTqNo','32921930nowXKL','Unsafe\x20Skill\x20file\x20path:\x20','4896poNsst','stringify','542188UOWKYH','810HvUjlN','6037410acOJnO','7JBgbNd','from','4571512DLBGCA'];a96_0x2487=function(){return _0x297fd1;};return a96_0x2487();}function a96_0x2d57(_0x191a34,_0x142302){_0x191a34=_0x191a34-0x10b;const _0x248732=a96_0x2487();let _0x2d573d=_0x248732[_0x191a34];return _0x2d573d;}import{CliErrors}from'../../errors.js';import{normalizeSkillRelativePath}from'./local-files.js';export function resolveManagedFilePath(_0x52ece2,_0x3d5d71){const _0x5bf173=a96_0x2d57,_0x5dadff=normalizeSkillRelativePath(_0x3d5d71),_0x5e9aad=realOrResolved(_0x52ece2),_0x3dd56f=resolve(_0x5e9aad,..._0x5dadff[_0x5bf173(0x112)]('/'));if(!isPathInside(_0x3dd56f,_0x5e9aad))throw CliErrors[_0x5bf173(0x10d)](_0x5bf173(0x115)+_0x3d5d71);return ensureNoSymlinkInManagedPath(_0x5e9aad,_0x5dadff),_0x3dd56f;}export function ensureNoSymlinkInManagedPath(_0x118d73,_0xa53eb){const _0x2917d0=a96_0x2d57;let _0x1ed8aa=_0x118d73;for(const _0x5e5e13 of _0xa53eb[_0x2917d0(0x112)]('/')){_0x1ed8aa=resolve(_0x1ed8aa,_0x5e5e13);const _0x36c27a=lstatIfPresent(_0x1ed8aa);if(_0x36c27a?.[_0x2917d0(0x111)]())throw CliErrors[_0x2917d0(0x10d)](_0x2917d0(0x10b)+_0xa53eb);}}export function isDanglingSymlink(_0x330d8e){const _0x395e27=a96_0x2d57;try{return lstatSync(_0x330d8e)[_0x395e27(0x111)]();}catch{return![];}}export function resolveSymlinkTarget(_0x45a7ee){const _0x210070=readlinkSync(_0x45a7ee);return isAbsolute(_0x210070)?_0x210070:resolve(dirname(_0x45a7ee),_0x210070);}export function isPathInside(_0x4528bb,_0x1a3319){const _0x106b6a=a96_0x2d57,_0x6ccb7e=_0x4528bb['endsWith'](sep)?_0x4528bb:''+_0x4528bb+sep,_0x12fabe=_0x1a3319['endsWith'](sep)?_0x1a3319:''+_0x1a3319+sep;return _0x4528bb===_0x1a3319||_0x6ccb7e[_0x106b6a(0x10f)](_0x12fabe);}export function realOrResolved(_0x33eed9){try{return realpathSync(_0x33eed9);}catch{return resolve(_0x33eed9);}}export function lstatIfPresent(_0x140fc2){try{return lstatSync(_0x140fc2);}catch{return undefined;}}export function writeTextAtomic(_0x2ef5cf,_0x32c9af,_0x4e54ba){const _0x1b15a4=a96_0x2d57;writeBytesAtomic(_0x2ef5cf,Buffer[_0x1b15a4(0x11c)](_0x32c9af,'utf8'),_0x4e54ba);}export function writeBytesAtomic(_0x3e1141,_0x521146,_0x19e9fb){const _0x37264e=a96_0x2d57,_0x50fccf=_0x3e1141+_0x37264e(0x10c);try{writeFileSync(_0x50fccf,_0x521146,{'mode':_0x19e9fb}),renameSync(_0x50fccf,_0x3e1141);}catch(_0x7d5fc2){try{rmSync(_0x50fccf,{'force':!![]});}catch{}throw _0x7d5fc2;}}export function writeJsonAtomic(_0x241ff2,_0x443b04){const _0x445d3a=a96_0x2d57;writeTextAtomic(_0x241ff2,JSON[_0x445d3a(0x117)](_0x443b04,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x20d098,_0x545f69){const _0x18c32b=a97_0x4e69,_0x6c2e57=_0x20d098();while(!![]){try{const _0x470f7b=parseInt(_0x18c32b(0xc4))/0x1+-parseInt(_0x18c32b(0xc7))/0x2+-parseInt(_0x18c32b(0xca))/0x3*(-parseInt(_0x18c32b(0xcd))/0x4)+-parseInt(_0x18c32b(0xcc))/0x5+-parseInt(_0x18c32b(0xc9))/0x6*(parseInt(_0x18c32b(0xd2))/0x7)+parseInt(_0x18c32b(0xc6))/0x8*(-parseInt(_0x18c32b(0xd1))/0x9)+parseInt(_0x18c32b(0xcf))/0xa;if(_0x470f7b===_0x545f69)break;else _0x6c2e57['push'](_0x6c2e57['shift']());}catch(_0x23cd2f){_0x6c2e57['push'](_0x6c2e57['shift']());}}}(a97_0x5873,0x26a8f));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x532af5){const _0x4f90a4=a97_0x4e69;return createHash(_0x4f90a4(0xce))['update'](_0x532af5)[_0x4f90a4(0xc3)](_0x4f90a4(0xcb));}export function fileHash(_0x588e3d){return bufferSha256(fileContent(_0x588e3d));}function a97_0x5873(){const _0x4c0953=['3KmDrKK','hex','896985cjWVcb','750988eFNmEn','sha256','3183010NVOqdc','size','117JqiZKe','119EAQxIM','digest','314985iRooET','path','80600xENGzl','559134KCrZCT','update','25674mEDfjr'];a97_0x5873=function(){return _0x4c0953;};return a97_0x5873();}function a97_0x4e69(_0x387ffd,_0x125ee0){_0x387ffd=_0x387ffd-0xc3;const _0x5873b0=a97_0x5873();let _0x4e6912=_0x5873b0[_0x387ffd];return _0x4e6912;}export function bufferSha256(_0x1fbeb9){const _0x96002c=a97_0x4e69;return createHash(_0x96002c(0xce))['update'](_0x1fbeb9)[_0x96002c(0xc3)](_0x96002c(0xcb));}export function fileTreeHash(_0x285d11){const _0x1ac787=a97_0x4e69,_0x5bfe93=createHash('sha256');for(const _0x54c2e6 of normalizeManifestFiles(_0x285d11)){_0x5bfe93[_0x1ac787(0xc8)](_0x54c2e6[_0x1ac787(0xc5)]),_0x5bfe93[_0x1ac787(0xc8)]('\x00'),_0x5bfe93[_0x1ac787(0xc8)](_0x54c2e6[_0x1ac787(0xce)]),_0x5bfe93['update']('\x00'),_0x5bfe93[_0x1ac787(0xc8)](String(_0x54c2e6[_0x1ac787(0xd0)])),_0x5bfe93[_0x1ac787(0xc8)]('\x00');}return _0x5bfe93['digest'](_0x1ac787(0xcb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1324da,_0x24f8ea){const _0x50fa6a=a98_0x1203,_0x9cf2db=_0x1324da();while(!![]){try{const _0x57d04a=parseInt(_0x50fa6a(0x15f))/0x1*(-parseInt(_0x50fa6a(0x166))/0x2)+-parseInt(_0x50fa6a(0x17b))/0x3*(parseInt(_0x50fa6a(0x15d))/0x4)+-parseInt(_0x50fa6a(0x175))/0x5+-parseInt(_0x50fa6a(0x153))/0x6*(-parseInt(_0x50fa6a(0x16e))/0x7)+-parseInt(_0x50fa6a(0x169))/0x8*(-parseInt(_0x50fa6a(0x161))/0x9)+-parseInt(_0x50fa6a(0x159))/0xa+parseInt(_0x50fa6a(0x167))/0xb;if(_0x57d04a===_0x24f8ea)break;else _0x9cf2db['push'](_0x9cf2db['shift']());}catch(_0x2d8f74){_0x9cf2db['push'](_0x9cf2db['shift']());}}}(a98_0x3801,0x8a567));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x5e6880 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';function a98_0x1203(_0x2fbf7d,_0x221df7){_0x2fbf7d=_0x2fbf7d-0x150;const _0x38014b=a98_0x3801();let _0x120397=_0x38014b[_0x2fbf7d];return _0x120397;}import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x5e6880;export function linkEffectiveRuntimeSkills(_0x7af4d5,_0x5ca880,_0x3025d7={}){const _0x360fd8=a98_0x1203,_0x54da5a=new Map();for(const _0x5bd7e9 of _0x7af4d5){const _0x2e5def=_0x5bd7e9[_0x360fd8(0x179)]['skillCode'];if(!_0x2e5def)continue;const _0x5bba01=_0x54da5a[_0x360fd8(0x15a)](_0x2e5def);(!_0x5bba01||_0x5bd7e9[_0x360fd8(0x150)]===_0x360fd8(0x152))&&_0x54da5a[_0x360fd8(0x17d)](_0x2e5def,_0x5bd7e9);}const _0x227e12=[],_0x195c6e=resolveSkillSyncPaths(_0x3025d7);for(const _0x4f3b5f of _0x54da5a[_0x360fd8(0x154)]()){const _0x318cb3=requireSkillCode(_0x4f3b5f[_0x360fd8(0x179)]),_0x238673=_0x5ca880+'--'+_0x318cb3;for(const _0x1443a2 of[_0x195c6e[_0x360fd8(0x183)],_0x195c6e[_0x360fd8(0x156)]]){_0x227e12[_0x360fd8(0x17f)](ensureManagedSymlink(resolve(_0x1443a2,_0x238673),_0x4f3b5f[_0x360fd8(0x186)],_0x195c6e[_0x360fd8(0x178)]));}}return _0x227e12;}export function pruneStaleRuntimeSkillLinks(_0x10ee53,_0x474ec6,_0x509e06={},_0x5c04fa){const _0x484fa9=a98_0x1203,_0x4a7e51=resolveSkillSyncPaths(_0x509e06),_0xae1a9a=new Set([..._0x474ec6]['map'](_0x5cfc15=>_0x5cfc15[_0x484fa9(0x176)]())['filter'](Boolean)),_0x3e50b0=_0x5c04fa?new Set([..._0x5c04fa][_0x484fa9(0x174)](_0x53f547=>_0x53f547[_0x484fa9(0x176)]())['filter'](Boolean)):undefined,_0x14acc7=[];for(const _0x515510 of[_0x4a7e51['agentsSkillsDir'],_0x4a7e51[_0x484fa9(0x156)]]){for(const _0x40d1b5 of managedAppSkillLinkPaths(_0x515510,_0x10ee53)){const _0xd30691=basename(_0x40d1b5)[_0x484fa9(0x151)]((_0x10ee53+'--')[_0x484fa9(0x181)]);if(_0x3e50b0&&!_0x3e50b0[_0x484fa9(0x158)](_0xd30691))continue;if(_0xae1a9a[_0x484fa9(0x158)](_0xd30691))continue;_0x14acc7[_0x484fa9(0x17f)](removeManagedSkillLink(_0x40d1b5,_0x4a7e51[_0x484fa9(0x178)]));}}return _0x14acc7;}export function pruneStaleRuntimeSkillCache(_0x5bf40e,_0x1461e0={}){const _0x4cf915=a98_0x1203,_0x4ae141=new Set([..._0x5bf40e[_0x4cf915(0x171)]][_0x4cf915(0x174)](_0x4f5e2e=>_0x4f5e2e['trim']())[_0x4cf915(0x173)](Boolean)),_0x2a7ec5=_0x5bf40e[_0x4cf915(0x16f)]?new Set([..._0x5bf40e[_0x4cf915(0x16f)]][_0x4cf915(0x174)](_0x1ce679=>_0x1ce679[_0x4cf915(0x176)]())['filter'](Boolean)):undefined,_0x347d46=_0x5bf40e[_0x4cf915(0x16c)]??['personal',_0x4cf915(0x160)],_0x4d3d0c=resolve(getRuntimeSkillCacheRoot(_0x5bf40e[_0x4cf915(0x16b)],_0x5bf40e[_0x4cf915(0x164)],_0x1461e0),safePathSegment(_0x5bf40e[_0x4cf915(0x182)],'appCode')),_0x110810=[];for(const _0x592093 of _0x347d46){const _0x16a469=resolve(_0x4d3d0c,_0x592093);if(!existsSync(_0x16a469))continue;for(const _0x4844c9 of readdirSync(_0x16a469,{'withFileTypes':!![]})){if(!_0x4844c9[_0x4cf915(0x155)]())continue;const _0x364d6c=_0x4844c9[_0x4cf915(0x185)];if(_0x2a7ec5&&!_0x2a7ec5[_0x4cf915(0x158)](_0x364d6c))continue;if(_0x4ae141[_0x4cf915(0x158)](_0x364d6c))continue;const _0x26d06e=resolve(_0x16a469,_0x364d6c),_0x427fa0=readMetadataIfPresent(resolve(_0x26d06e,METADATA_FILE));if(_0x427fa0?.[_0x4cf915(0x182)]!==_0x5bf40e[_0x4cf915(0x182)]||_0x427fa0[_0x4cf915(0x150)]!==_0x592093||_0x427fa0[_0x4cf915(0x17a)]!==_0x364d6c){_0x110810[_0x4cf915(0x17f)]({'path':_0x26d06e,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x26d06e),_0x110810[_0x4cf915(0x17f)]({'path':_0x26d06e,'action':'removed'});}}return _0x110810;}export function linkGlobalRuntimeSkills(_0x356da4,_0x3ab170={}){const _0x5244dd=a98_0x1203,_0x47e3bd=resolveSkillSyncPaths(_0x3ab170),_0x167b87=[];for(const _0x51ddda of _0x356da4){if(_0x51ddda[_0x5244dd(0x150)]!==_0x5244dd(0x168))throw CliErrors[_0x5244dd(0x15b)](_0x5244dd(0x15c)+_0x51ddda[_0x5244dd(0x150)]);const _0xe9c9e9=requireSkillCode(_0x51ddda[_0x5244dd(0x179)]),_0x22b610=copyManagedSkillDirectory(_0x51ddda[_0x5244dd(0x186)],resolve(_0x47e3bd[_0x5244dd(0x183)],_0xe9c9e9));_0x167b87[_0x5244dd(0x17f)]({..._0x22b610,'contentHash':_0x51ddda['contentHash']});}return _0x167b87;}function ensureManagedSymlink(_0x279aba,_0x12b792,_0x5ba55b){const _0x58e31f=a98_0x1203;mkdirSync(dirname(_0x279aba),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x279aba)||isDanglingSymlink(_0x279aba)){const _0x59e827=lstatSync(_0x279aba);if(!_0x59e827[_0x58e31f(0x15e)]())throw CliErrors[_0x58e31f(0x15b)](_0x58e31f(0x16a)+_0x279aba);const _0x404dc6=resolveSymlinkTarget(_0x279aba);if(!isPathInside(realOrResolved(_0x404dc6),realOrResolved(_0x5ba55b)))throw CliErrors['validation'](_0x58e31f(0x16d)+_0x279aba);if(realOrResolved(_0x404dc6)===realOrResolved(_0x12b792))return{'path':_0x279aba,'target':_0x12b792,'action':_0x58e31f(0x17c)};return unlinkSync(_0x279aba),symlinkSync(_0x12b792,_0x279aba,_0x58e31f(0x186)),{'path':_0x279aba,'target':_0x12b792,'action':_0x58e31f(0x170)};}return symlinkSync(_0x12b792,_0x279aba,_0x58e31f(0x186)),{'path':_0x279aba,'target':_0x12b792,'action':_0x58e31f(0x157)};}function a98_0x3801(){const _0x3a6f1d=['validation','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','8aoIoHS','isSymbolicLink','1nreANi','company','396iDNjRO','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','startsWith','accessKey','skipped','702586QbDBKJ','10876030UVXeoa','builtin','128408emmnhr','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','env','scopes','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','1122471NGFMFi','pruneSkillCodes','updated','activeSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','filter','map','2898100fzLASR','trim','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','managedRoot','skill','skillCode','880518rViESI','unchanged','set','not-managed-symlink','push','removed','length','appCode','agentsSkillsDir','contentHash','name','dir','scope','slice','personal','36cKxUzm','values','isDirectory','claudeSkillsDir','created','has','5725360BlyeoT','get'];a98_0x3801=function(){return _0x3a6f1d;};return a98_0x3801();}function managedAppSkillLinkPaths(_0x3ded45,_0x3c281e){const _0x573a2c=a98_0x1203;if(!existsSync(_0x3ded45))return[];const _0x953cc9=_0x3c281e+'--';return readdirSync(_0x3ded45,{'withFileTypes':!![]})['filter'](_0x3491f0=>_0x3491f0[_0x573a2c(0x185)][_0x573a2c(0x163)](_0x953cc9))['map'](_0x2a36a7=>resolve(_0x3ded45,_0x2a36a7['name']));}function removeManagedSkillLink(_0x454934,_0x18bef1){const _0x5451b7=a98_0x1203,_0x521ebb=lstatIfPresent(_0x454934);if(!_0x521ebb?.['isSymbolicLink']())return{'path':_0x454934,'action':_0x5451b7(0x165),'reason':_0x5451b7(0x17e)};const _0x2052ba=resolveSymlinkTarget(_0x454934);if(!isPathInside(realOrResolved(_0x2052ba),realOrResolved(_0x18bef1)))return{'path':_0x454934,'action':_0x5451b7(0x165),'reason':'external-symlink'};return unlinkSync(_0x454934),{'path':_0x454934,'action':_0x5451b7(0x180)};}export function copyManagedSkillDirectory(_0x15bf29,_0x3c31a1){const _0x461885=a98_0x1203,_0x4989b1=resolve(_0x3c31a1,METADATA_FILE),_0x47a370=existsSync(_0x3c31a1);if(_0x47a370){const _0x102e47=lstatSync(_0x3c31a1);if(_0x102e47[_0x461885(0x15e)]())throw CliErrors[_0x461885(0x15b)](_0x461885(0x177)+_0x3c31a1);if(!_0x102e47[_0x461885(0x155)]())throw CliErrors[_0x461885(0x15b)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x3c31a1);const _0x43b869=readMetadataIfPresent(_0x4989b1);if(_0x43b869?.['scope']!==_0x461885(0x168))throw CliErrors[_0x461885(0x15b)](_0x461885(0x172)+_0x3c31a1);}ensureDirSync(dirname(_0x3c31a1));const _0x2e6bc4=_0x47a370?readMetadataIfPresent(_0x4989b1)?.[_0x461885(0x184)]:undefined,_0x2cd55b=readMetadataIfPresent(resolve(_0x15bf29,METADATA_FILE))?.[_0x461885(0x184)];return _0x47a370&&removeSync(_0x3c31a1),copySkillDirectory(_0x15bf29,_0x3c31a1),{'path':_0x3c31a1,'target':_0x15bf29,'action':!_0x47a370?_0x461885(0x157):_0x2e6bc4===_0x2cd55b?_0x461885(0x17c):_0x461885(0x170)};}function copySkillDirectory(_0x2cd23a,_0x30a3f8){copySync(_0x2cd23a,_0x30a3f8,{'dereference':![],'overwrite':!![],'filter'(_0xf00d1c){const _0x61a5e3=a98_0x1203;if(lstatSync(_0xf00d1c)[_0x61a5e3(0x15e)]())throw CliErrors[_0x61a5e3(0x15b)](_0x61a5e3(0x162)+_0xf00d1c);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57b908,_0x40a1e2){const _0x21909a=a99_0x2d09,_0x340391=_0x57b908();while(!![]){try{const _0x5313b1=-parseInt(_0x21909a(0x13b))/0x1+parseInt(_0x21909a(0x121))/0x2*(-parseInt(_0x21909a(0x136))/0x3)+-parseInt(_0x21909a(0x130))/0x4*(-parseInt(_0x21909a(0x11c))/0x5)+parseInt(_0x21909a(0x11e))/0x6+-parseInt(_0x21909a(0x139))/0x7*(parseInt(_0x21909a(0x118))/0x8)+-parseInt(_0x21909a(0x137))/0x9+parseInt(_0x21909a(0x138))/0xa;if(_0x5313b1===_0x40a1e2)break;else _0x340391['push'](_0x340391['shift']());}catch(_0x561b03){_0x340391['push'](_0x340391['shift']());}}}(a99_0x1871,0x7291f));import{existsSync,readdirSync}from'node:fs';function a99_0x1871(){const _0x79a5a7=['set','startsWith','sort','isSymbolicLink','8HvlNFt','values','metadataPath','cacheDir','580BUALrB','has','3060702oeXzGN','localeCompare','linkedPath','12034VtEUmk','name','trim','linkedPaths','accessKey','skillMdPath','skillCode','cache','map','claudeSkillsDir','env','tags','includes','link','from','11512gXnUVK','dir','code','scopes','scope','isDirectory','318ZhrHDz','5137020dCAYnD','16766020KWbQiq','4330921MbOdoJ','filter','224003VrJSTp','appCode','isArray','source'];a99_0x1871=function(){return _0x79a5a7;};return a99_0x1871();}import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a99_0x2d09(_0x3d25d7,_0x4bb25a){_0x3d25d7=_0x3d25d7-0x116;const _0x18710f=a99_0x1871();let _0x2d09b9=_0x18710f[_0x3d25d7];return _0x2d09b9;}export function listLocalRuntimeSkills(_0x24df08,_0x64be7c={}){const _0x11c36e=a99_0x2d09,_0x32c5d2=safePathSegment(_0x24df08[_0x11c36e(0x13c)],_0x11c36e(0x13c)),_0x236bb8=normalizeRuntimeSkillScopes(_0x24df08[_0x11c36e(0x133)]),_0x39438d=new Set(_0x236bb8),_0x4dd7a3=_0x24df08[_0x11c36e(0x132)]?.[_0x11c36e(0x123)](),_0x17bffa=new Map(),_0xf4464b=resolve(getRuntimeSkillCacheRoot(_0x24df08[_0x11c36e(0x12b)],_0x24df08[_0x11c36e(0x125)],_0x64be7c),_0x32c5d2);for(const _0x229505 of _0x236bb8){for(const _0xfe9cd6 of localSkillEntryDirs(resolve(_0xf4464b,_0x229505))){collectLocalRuntimeSkill(_0x17bffa,_0xfe9cd6,{'appCode':_0x32c5d2,'scopes':_0x39438d,'code':_0x4dd7a3,'source':'cache'});}}const _0xf75e95=resolveSkillSyncPaths(_0x64be7c);for(const _0xe3824e of[_0xf75e95['agentsSkillsDir'],_0xf75e95[_0x11c36e(0x12a)]]){for(const _0x24d0f1 of localSkillLinkCandidates(_0xe3824e,_0x32c5d2,_0x39438d)){collectLocalRuntimeSkill(_0x17bffa,_0x24d0f1,{'appCode':_0x32c5d2,'scopes':_0x39438d,'code':_0x4dd7a3,'source':_0x11c36e(0x12e),'linkedPath':_0x24d0f1});}}return Array[_0x11c36e(0x12f)](_0x17bffa[_0x11c36e(0x119)]())[_0x11c36e(0x116)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2a14c6){const _0x52a162=a99_0x2d09;if(!existsSync(_0x2a14c6))return[];return readdirSync(_0x2a14c6,{'withFileTypes':!![]})['filter'](_0x112e57=>_0x112e57[_0x52a162(0x135)]()||_0x112e57['isSymbolicLink']())[_0x52a162(0x129)](_0x1bf653=>resolve(_0x2a14c6,_0x1bf653[_0x52a162(0x122)]));}function localSkillLinkCandidates(_0x46bbec,_0x3bfa76,_0x33aec9){const _0x14bbb3=a99_0x2d09;if(!existsSync(_0x46bbec))return[];const _0x2f1c3d=_0x3bfa76+'--';return readdirSync(_0x46bbec,{'withFileTypes':!![]})[_0x14bbb3(0x13a)](_0x441878=>_0x441878[_0x14bbb3(0x135)]()||_0x441878[_0x14bbb3(0x117)]())[_0x14bbb3(0x13a)](_0x3eb2e7=>_0x3eb2e7[_0x14bbb3(0x122)][_0x14bbb3(0x140)](_0x2f1c3d)||_0x33aec9[_0x14bbb3(0x11d)]('builtin'))[_0x14bbb3(0x129)](_0x5a4c73=>resolve(_0x46bbec,_0x5a4c73['name']));}function collectLocalRuntimeSkill(_0x3b9fec,_0x743f5f,_0x4f1c3f){const _0x53af27=a99_0x2d09,_0x4df669=resolve(_0x743f5f,METADATA_FILE),_0x3ecf23=readMetadataIfPresent(_0x4df669);if(!_0x3ecf23)return;if(_0x3ecf23[_0x53af27(0x13c)]!==_0x4f1c3f[_0x53af27(0x13c)])return;if(!isRuntimeSkillScope(_0x3ecf23['scope'])||!_0x4f1c3f[_0x53af27(0x133)]['has'](_0x3ecf23[_0x53af27(0x134)]))return;const _0x1296ee=_0x3ecf23['skillCode']?.['trim']();if(!_0x1296ee)return;if(_0x4f1c3f[_0x53af27(0x132)]&&_0x1296ee!==_0x4f1c3f['code'])return;const _0x22879c=_0x3ecf23[_0x53af27(0x134)]+':'+_0x1296ee,_0x5ecd54=_0x4f1c3f[_0x53af27(0x120)]?[_0x4f1c3f[_0x53af27(0x120)]]:[],_0x37276d=_0x3b9fec['get'](_0x22879c);if(_0x37276d){_0x4f1c3f[_0x53af27(0x13e)]===_0x53af27(0x128)&&(_0x37276d[_0x53af27(0x131)]=_0x743f5f,_0x37276d[_0x53af27(0x11b)]=_0x743f5f,_0x37276d[_0x53af27(0x126)]=resolve(_0x743f5f,SKILL_FILE),_0x37276d[_0x53af27(0x11a)]=_0x4df669);for(const _0x477948 of _0x5ecd54){!_0x37276d[_0x53af27(0x124)][_0x53af27(0x12d)](_0x477948)&&_0x37276d['linkedPaths']['push'](_0x477948);}_0x37276d['linkedPaths']['sort']();return;}_0x3b9fec[_0x53af27(0x13f)](_0x22879c,{..._0x3ecf23,'tags':Array[_0x53af27(0x13d)](_0x3ecf23[_0x53af27(0x12c)])?_0x3ecf23[_0x53af27(0x12c)]:[],'scope':_0x3ecf23[_0x53af27(0x134)],'source':'local','dir':_0x743f5f,'cacheDir':_0x4f1c3f['source']===_0x53af27(0x128)?_0x743f5f:undefined,'skillMdPath':resolve(_0x743f5f,SKILL_FILE),'metadataPath':_0x4df669,'linkedPaths':_0x5ecd54});}function compareLocalRuntimeSkills(_0x23ed79,_0x4d54fb){const _0x449b6d=a99_0x2d09,_0x178a78={'personal':0x0,'company':0x1,'builtin':0x2};return _0x178a78[_0x23ed79[_0x449b6d(0x134)]]-_0x178a78[_0x4d54fb['scope']]||_0x23ed79[_0x449b6d(0x127)][_0x449b6d(0x11f)](_0x4d54fb[_0x449b6d(0x127)])||_0x23ed79[_0x449b6d(0x131)][_0x449b6d(0x11f)](_0x4d54fb[_0x449b6d(0x131)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x47e61c,_0x494b60){const _0x4a9600=a100_0xe6bf,_0x5c3690=_0x47e61c();while(!![]){try{const _0x226bb1=parseInt(_0x4a9600(0x1ff))/0x1+-parseInt(_0x4a9600(0x201))/0x2+parseInt(_0x4a9600(0x200))/0x3*(parseInt(_0x4a9600(0x1e8))/0x4)+parseInt(_0x4a9600(0x1e6))/0x5+parseInt(_0x4a9600(0x206))/0x6*(-parseInt(_0x4a9600(0x1f4))/0x7)+parseInt(_0x4a9600(0x1e9))/0x8*(parseInt(_0x4a9600(0x1ee))/0x9)+-parseInt(_0x4a9600(0x205))/0xa;if(_0x226bb1===_0x494b60)break;else _0x5c3690['push'](_0x5c3690['shift']());}catch(_0x4b5e5d){_0x5c3690['push'](_0x5c3690['shift']());}}}(a100_0x3b3b,0x8cf8e));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(_0x28bf7f){const _0x4c0bc3=a100_0xe6bf;return _0x28bf7f[_0x4c0bc3(0x1f5)]??Buffer[_0x4c0bc3(0x1e5)](_0x28bf7f['content']??'',_0x4c0bc3(0x1f8));}function a100_0x3b3b(){const _0x2f40ca=['split','trim','isDirectory','compare','220778ejqiTQ','1480386MMFkCJ','1359504oiZJLF','sha256','string','Skill\x20file\x20sha256\x20is\x20invalid:\x20','391560OVtcjR','24TUcDjb','path','toLowerCase','includes','name','object','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','Duplicate\x20Skill\x20file\x20path:\x20','validation','push','length','isSymbolicLink','sort','from','5734890SPSHAi','isArray','4AjTlKR','16xBkgao','toString','Unsafe\x20Skill\x20file\x20path:\x20','Skill\x20file\x20size\x20is\x20invalid:\x20','isSafeInteger','354222VJnMzW','has','isBuffer','Skill\x20file\x20path\x20must\x20be\x20text.','values','isFile','1126307sJLuBT','bytes','content','test','utf8','set','size'];a100_0x3b3b=function(){return _0x2f40ca;};return a100_0x3b3b();}export function fileText(_0x3040f5){const _0x3989fe=a100_0xe6bf;return fileContent(_0x3040f5)[_0x3989fe(0x1ea)]('utf8');}export function normalizeLocalFiles(_0x5cc2e4){const _0x55723b=a100_0xe6bf;if(!Array[_0x55723b(0x1e7)](_0x5cc2e4)||_0x5cc2e4[_0x55723b(0x1e2)]===0x0)return[];const _0x1f34cf=new Map();for(const _0x4fbcc6 of _0x5cc2e4){if(!_0x4fbcc6||typeof _0x4fbcc6!==_0x55723b(0x1dd)||typeof _0x4fbcc6[_0x55723b(0x207)]!==_0x55723b(0x203))throw CliErrors[_0x55723b(0x1e0)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x3dcec8=normalizeSkillRelativePath(_0x4fbcc6[_0x55723b(0x207)]);if(_0x1f34cf[_0x55723b(0x1ef)](_0x3dcec8))throw CliErrors[_0x55723b(0x1e0)]('Duplicate\x20Skill\x20file\x20path:\x20'+_0x3dcec8);if(_0x4fbcc6[_0x55723b(0x1f5)]!==undefined&&!Buffer[_0x55723b(0x1f0)](_0x4fbcc6['bytes']))throw CliErrors[_0x55723b(0x1e0)]('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x3dcec8);if(_0x4fbcc6[_0x55723b(0x1f5)]===undefined&&typeof _0x4fbcc6[_0x55723b(0x1f6)]!==_0x55723b(0x203))throw CliErrors[_0x55723b(0x1e0)](_0x55723b(0x1de)+_0x3dcec8);const _0x571226=fileContent(_0x4fbcc6);_0x1f34cf[_0x55723b(0x1f9)](_0x3dcec8,{'path':_0x3dcec8,'bytes':_0x571226});}return Array[_0x55723b(0x1e5)](_0x1f34cf[_0x55723b(0x1f2)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x4b7d31){const _0x211fb5=a100_0xe6bf;if(!Array[_0x211fb5(0x1e7)](_0x4b7d31)||_0x4b7d31[_0x211fb5(0x1e2)]===0x0)return[];const _0x3dddac=new Map();for(const _0xb68b53 of _0x4b7d31){if(!_0xb68b53||typeof _0xb68b53!==_0x211fb5(0x1dd)||typeof _0xb68b53[_0x211fb5(0x207)]!==_0x211fb5(0x203))throw CliErrors[_0x211fb5(0x1e0)](_0x211fb5(0x1f1));const _0x38f96a=normalizeSkillRelativePath(_0xb68b53[_0x211fb5(0x207)]);if(_0x3dddac[_0x211fb5(0x1ef)](_0x38f96a))throw CliErrors[_0x211fb5(0x1e0)](_0x211fb5(0x1df)+_0x38f96a);if(!isSha256Hex(_0xb68b53[_0x211fb5(0x202)]))throw CliErrors[_0x211fb5(0x1e0)](_0x211fb5(0x204)+_0x38f96a);if(!Number[_0x211fb5(0x1ed)](_0xb68b53[_0x211fb5(0x1fa)])||_0xb68b53[_0x211fb5(0x1fa)]<0x0)throw CliErrors[_0x211fb5(0x1e0)](_0x211fb5(0x1ec)+_0x38f96a);_0x3dddac[_0x211fb5(0x1f9)](_0x38f96a,{'path':_0x38f96a,'sha256':_0xb68b53[_0x211fb5(0x202)][_0x211fb5(0x1da)](),'size':_0xb68b53['size']});}return Array[_0x211fb5(0x1e5)](_0x3dddac['values']())[_0x211fb5(0x1e4)](compareSkillFiles);}export function scanSkillDirectory(_0x11b2a5){const _0x1969df=realpathSync(_0x11b2a5),_0x560b96=[];function _0x25e1f6(_0x57f9f2){const _0x3c9cd9=a100_0xe6bf,_0x10eeb7=readdirSync(_0x57f9f2,{'withFileTypes':!![]})[_0x3c9cd9(0x1e4)]((_0x5c4149,_0x5505fe)=>_0x5c4149['name']['localeCompare'](_0x5505fe[_0x3c9cd9(0x1dc)]));for(const _0x28eb83 of _0x10eeb7){if(_0x28eb83[_0x3c9cd9(0x1fd)]()&&IGNORED_DIR_NAMES[_0x3c9cd9(0x1ef)](_0x28eb83['name']))continue;if(IGNORED_FILE_NAMES[_0x3c9cd9(0x1ef)](_0x28eb83['name']))continue;const _0x5c68b9=resolve(_0x57f9f2,_0x28eb83[_0x3c9cd9(0x1dc)]);if(_0x28eb83[_0x3c9cd9(0x1e3)]())throw CliErrors[_0x3c9cd9(0x1e0)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0x5c68b9);const _0x1b6005=toPosixPath(relative(_0x1969df,_0x5c68b9));if(_0x28eb83[_0x3c9cd9(0x1fd)]()){_0x25e1f6(_0x5c68b9);continue;}if(!_0x28eb83[_0x3c9cd9(0x1f3)]())continue;validateSkillRelativePath(_0x1b6005);const _0x17ccec=readFileSync(_0x5c68b9);_0x560b96[_0x3c9cd9(0x1e1)]({'path':_0x1b6005,'bytes':_0x17ccec});}}return _0x25e1f6(_0x1969df),normalizeLocalFiles(_0x560b96);}export function compareSkillFiles(_0x3c17e9,_0x305881){const _0x230011=a100_0xe6bf;if(_0x3c17e9['path']===SKILL_FILE)return _0x305881[_0x230011(0x207)]===SKILL_FILE?0x0:-0x1;if(_0x305881['path']===SKILL_FILE)return 0x1;return Buffer[_0x230011(0x1fe)](Buffer[_0x230011(0x1e5)](_0x3c17e9[_0x230011(0x207)],'utf8'),Buffer[_0x230011(0x1e5)](_0x305881['path'],_0x230011(0x1f8)));}export function normalizeSkillRelativePath(_0x4128b7){const _0x58c355=a100_0xe6bf,_0x5db7be=toPosixPath(_0x4128b7[_0x58c355(0x1fc)]());return validateSkillRelativePath(_0x5db7be),_0x5db7be;}export function validateSkillRelativePath(_0x5061ef){const _0x3dddea=a100_0xe6bf;if(!_0x5061ef||_0x5061ef['startsWith']('/')||_0x5061ef[_0x3dddea(0x1db)]('//'))throw CliErrors[_0x3dddea(0x1e0)](_0x3dddea(0x1eb)+_0x5061ef);for(const _0x1600c6 of _0x5061ef[_0x3dddea(0x1fb)]('/')){if(!_0x1600c6||_0x1600c6==='.'||_0x1600c6==='..')throw CliErrors['validation'](_0x3dddea(0x1eb)+_0x5061ef);}}export function toPosixPath(_0x3b5bc0){return _0x3b5bc0['replace'](/\\/g,'/');}function a100_0xe6bf(_0x1bde04,_0x4b220c){_0x1bde04=_0x1bde04-0x1da;const _0x3b3b5c=a100_0x3b3b();let _0xe6bf07=_0x3b3b5c[_0x1bde04];return _0xe6bf07;}export function isSha256Hex(_0x27f9b3){const _0x69ea3b=a100_0xe6bf;return typeof _0x27f9b3===_0x69ea3b(0x203)&&/^[a-fA-F0-9]{64}$/[_0x69ea3b(0x1f7)](_0x27f9b3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a101_0xbc5c(_0x1f6c85,_0x378c06){_0x1f6c85=_0x1f6c85-0x16c;const _0x5875bd=a101_0x5875();let _0xbc5c82=_0x5875bd[_0x1f6c85];return _0xbc5c82;}(function(_0x126694,_0x45a2ef){const _0x4cd2b2=a101_0xbc5c,_0x3a0d55=_0x126694();while(!![]){try{const _0x46433a=parseInt(_0x4cd2b2(0x179))/0x1+-parseInt(_0x4cd2b2(0x172))/0x2*(parseInt(_0x4cd2b2(0x199))/0x3)+-parseInt(_0x4cd2b2(0x19a))/0x4*(-parseInt(_0x4cd2b2(0x190))/0x5)+parseInt(_0x4cd2b2(0x175))/0x6+parseInt(_0x4cd2b2(0x18b))/0x7+parseInt(_0x4cd2b2(0x189))/0x8*(-parseInt(_0x4cd2b2(0x16e))/0x9)+-parseInt(_0x4cd2b2(0x181))/0xa;if(_0x46433a===_0x45a2ef)break;else _0x3a0d55['push'](_0x3a0d55['shift']());}catch(_0x129563){_0x3a0d55['push'](_0x3a0d55['shift']());}}}(a101_0x5875,0xd306e));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';function a101_0x5875(){const _0xe95cc5=['test','6129009uTsPLQ','paths','stringify','name:\x20','193714cbcxvx','validation','Runtime\x20Skill\x20package\x20is\x20missing\x20','8682996PSziBq','path','replace','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','1132713BKQxfU','.\x20Changed\x20file:\x20','map','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','fileHashes','entries','description:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','15514170SaGzxJ','join','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','trim','packageBytes','skillName','isFile','appCode','16ZYqcXP','utf8','10899308kLCMZW','keys','name','find','pulledAt','5zayvBU','force','contentHash','env','length','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','---','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','accessKey','51anVLsI','5149724YStDMx','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','description'];a101_0x5875=function(){return _0xe95cc5;};return a101_0x5875();}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x4b78c9,_0x1fbfb4,_0x3e319f){const _0x58dac7=a101_0xbc5c,_0x1e0062=requireSkillCode(_0x4b78c9),_0x2bc495=requirePackageBytes(_0x1e0062,_0x3e319f[_0x58dac7(0x185)]),_0x34adba=extractDownloadedPackage(_0x2bc495),_0x36ae63=_0x34adba[_0x58dac7(0x18e)](_0x261691=>_0x261691[_0x58dac7(0x176)]===SKILL_FILE);if(!_0x36ae63)throw CliErrors[_0x58dac7(0x173)](_0x58dac7(0x174)+SKILL_FILE+':\x20'+_0x1e0062);const _0x39db1c=withMaterializedSkillFrontmatter(_0x34adba,_0x4b78c9,_0x1e0062),_0x3ca499=_0x39db1c['find'](_0x4dd816=>_0x4dd816[_0x58dac7(0x176)]===SKILL_FILE),_0x43070=fileText(_0x3ca499),_0x58b76f=getRuntimeSkillDir(_0x3e319f[_0x58dac7(0x193)],_0x3e319f[_0x58dac7(0x198)],_0x3e319f[_0x58dac7(0x188)],_0x1fbfb4,_0x1e0062,_0x3e319f[_0x58dac7(0x16f)]),_0x18fc85=resolve(_0x58b76f,SKILL_FILE),_0x87f704=resolve(_0x58b76f,METADATA_FILE),_0x2bab5c=contentHash(_0x43070),_0x1c914c=readMetadataIfPresent(_0x87f704)?.['fileHashes'];ensurePulledFilesCanBeOverwritten(_0x58b76f,_0x87f704,_0x39db1c,_0x3e319f[_0x58dac7(0x191)]===!![]),mkdirSync(_0x58b76f,{'recursive':!![],'mode':0x1c0});const _0xe080d2=existsSync(_0x18fc85)?readFileSync(_0x18fc85,_0x58dac7(0x18a)):undefined;return materializeFiles(_0x58b76f,_0x39db1c),removeStaleManagedFiles(_0x58b76f,_0x1c914c,_0x39db1c),writeJsonAtomic(_0x87f704,buildMetadata(_0x4b78c9,_0x1fbfb4,_0x3e319f[_0x58dac7(0x188)],_0x2bab5c,_0x3e319f[_0x58dac7(0x18f)],_0x39db1c,_0x2bc495)),{'skill':_0x4b78c9,'scope':_0x1fbfb4,'dir':_0x58b76f,'skillMdPath':_0x18fc85,'metadataPath':_0x87f704,'contentHash':_0x2bab5c,'changed':_0xe080d2!==_0x43070};}function withMaterializedSkillFrontmatter(_0x58659b,_0x435557,_0x4c6a59){const _0x435b9b=a101_0xbc5c;return normalizeLocalFiles(_0x58659b)[_0x435b9b(0x17b)](_0x1f7f81=>{const _0x11567b=_0x435b9b,_0x1c0dc4=fileText(_0x1f7f81);if(_0x1f7f81['path']!==SKILL_FILE||hasYamlFrontmatter(_0x1c0dc4))return _0x1f7f81;return{'path':_0x1f7f81['path'],'content':prependSkillFrontmatter(_0x1c0dc4,{'name':_0x4c6a59,'description':_0x435557[_0x11567b(0x16c)]?.['trim']()||_0x435557[_0x11567b(0x186)]?.[_0x11567b(0x184)]()||_0x4c6a59})};});}function hasYamlFrontmatter(_0x39fa49){const _0x378de2=a101_0xbc5c;return/^\uFEFF?---\s*\r?\n/[_0x378de2(0x16d)](_0x39fa49);}function prependSkillFrontmatter(_0x380c7c,_0x2a664b){const _0x20cbae=a101_0xbc5c,_0x5e62a7=_0x380c7c[_0x20cbae(0x177)](/^\uFEFF/,'');return[_0x20cbae(0x196),_0x20cbae(0x171)+yamlString(_0x2a664b[_0x20cbae(0x18d)]),_0x20cbae(0x17f)+yamlString(_0x2a664b[_0x20cbae(0x16c)]),_0x20cbae(0x196),'',_0x5e62a7][_0x20cbae(0x182)]('\x0a');}function yamlString(_0x145916){const _0x4c3949=a101_0xbc5c;return JSON[_0x4c3949(0x170)](_0x145916[_0x4c3949(0x177)](/\r/g,'')[_0x4c3949(0x184)]());}function ensurePulledFilesCanBeOverwritten(_0x150d64,_0x3b5f11,_0x2a69a5,_0x222018){const _0x361846=a101_0xbc5c;if(_0x222018||!existsSync(_0x3b5f11))return;const _0x17a3fa=readMetadataIfPresent(_0x3b5f11);if(!_0x17a3fa)return;const _0x159c72=_0x17a3fa[_0x361846(0x17d)]&&Object[_0x361846(0x18c)](_0x17a3fa['fileHashes'])[_0x361846(0x194)]>0x0?_0x17a3fa[_0x361846(0x17d)]:undefined;if(_0x159c72)for(const [_0xa8b917,_0x34aa65]of Object[_0x361846(0x17e)](_0x159c72)){const _0x119970=resolveManagedFilePath(_0x150d64,_0xa8b917);if(!existsSync(_0x119970))throw CliErrors[_0x361846(0x173)](_0x361846(0x180)+_0x150d64,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0xa8b917);const _0x371ede=lstatSync(_0x119970);if(!_0x371ede['isFile']())throw CliErrors[_0x361846(0x173)](_0x361846(0x180)+_0x150d64,_0x361846(0x19b)+_0xa8b917);const _0xe9654a=bufferSha256(readFileSync(_0x119970));if(_0xe9654a!==_0x34aa65)throw CliErrors[_0x361846(0x173)](_0x361846(0x180)+_0x150d64+_0x361846(0x17a)+_0xa8b917,_0x361846(0x17c)+_0xa8b917);}else{const _0x504eef=resolve(_0x150d64,SKILL_FILE);if(existsSync(_0x504eef)&&_0x17a3fa[_0x361846(0x192)]){const _0xa3052=contentHash(readFileSync(_0x504eef,'utf8'));if(_0xa3052!==_0x17a3fa['contentHash'])throw CliErrors[_0x361846(0x173)](_0x361846(0x195)+_0x504eef,_0x361846(0x197));}}for(const _0x9301f1 of normalizeLocalFiles(_0x2a69a5)){if(_0x159c72?.[_0x9301f1[_0x361846(0x176)]])continue;if(!_0x159c72&&_0x9301f1[_0x361846(0x176)]===SKILL_FILE)continue;const _0x1030f9=resolveManagedFilePath(_0x150d64,_0x9301f1[_0x361846(0x176)]);if(!existsSync(_0x1030f9))continue;const _0x2949d3=lstatSync(_0x1030f9);if(!_0x2949d3[_0x361846(0x187)]())throw CliErrors[_0x361846(0x173)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x150d64,_0x361846(0x183)+_0x9301f1['path']);const _0x5848d6=bufferSha256(readFileSync(_0x1030f9));if(_0x5848d6!==fileHash(_0x9301f1))throw CliErrors[_0x361846(0x173)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x150d64,_0x361846(0x178)+_0x9301f1[_0x361846(0x176)]);}}function materializeFiles(_0x419536,_0x520f3a){const _0x47a1a1=a101_0xbc5c;for(const _0x7110bd of normalizeLocalFiles(_0x520f3a)){const _0x2d5d0=resolveManagedFilePath(_0x419536,_0x7110bd[_0x47a1a1(0x176)]);mkdirSync(dirname(_0x2d5d0),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2d5d0,fileContent(_0x7110bd),0x180);}}function removeStaleManagedFiles(_0x4298c4,_0x469727,_0x3fa09b){const _0x46f226=a101_0xbc5c;if(!_0x469727)return;const _0x11e17c=new Set(normalizeLocalFiles(_0x3fa09b)['map'](_0x198500=>_0x198500[_0x46f226(0x176)]));for(const _0x5e2f83 of Object[_0x46f226(0x18c)](_0x469727)){if(_0x11e17c['has'](_0x5e2f83))continue;const _0x494036=resolveManagedFilePath(_0x4298c4,_0x5e2f83);existsSync(_0x494036)&&lstatSync(_0x494036)[_0x46f226(0x187)]()&&rmSync(_0x494036,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a05b2,_0x340ec1){const _0x52dd5b=a102_0x3c80,_0x3cdbaf=_0x2a05b2();while(!![]){try{const _0x22f176=parseInt(_0x52dd5b(0x196))/0x1+parseInt(_0x52dd5b(0x193))/0x2+-parseInt(_0x52dd5b(0x17f))/0x3+-parseInt(_0x52dd5b(0x181))/0x4+parseInt(_0x52dd5b(0x188))/0x5+-parseInt(_0x52dd5b(0x18e))/0x6*(parseInt(_0x52dd5b(0x187))/0x7)+-parseInt(_0x52dd5b(0x19a))/0x8;if(_0x22f176===_0x340ec1)break;else _0x3cdbaf['push'](_0x3cdbaf['shift']());}catch(_0xca3eca){_0x3cdbaf['push'](_0x3cdbaf['shift']());}}}(a102_0x5864,0xbe442));function a102_0x3c80(_0x4df6fe,_0x5bebca){_0x4df6fe=_0x4df6fe-0x179;const _0x5864db=a102_0x5864();let _0x3c80ec=_0x5864db[_0x4df6fe];return _0x3c80ec;}function a102_0x5864(){const _0x3b14be=['1135477hbdkwX','skillName','forkedFromVersion','readonly','3289704tvxAwW','validation','hasUpstreamUpdate','length','description','utf8','map','skillCode','2672160ZSXHyg','zipSha256','2495224uNqhBm','Runtime\x20Skill\x20is\x20missing\x20skillCode.','files','isArray','object','tags','86002JYrxgq','3941805IqxRSb','toISOString','string','tenantCode','status','manifest','6QdWxYs','sourceSessionId','forkedFromSkillId','fromEntries','personal','1587034MJLAis','path','trim'];a102_0x5864=function(){return _0x3b14be;};return a102_0x5864();}import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x1a6f4e,_0x1008c1,_0x5d53a9,_0x33bafc,_0x5c7920,_0xce8f36,_0x11ca60){const _0x1e839d=a102_0x3c80,_0x49c39d=_0xce8f36?normalizeLocalFiles(_0xce8f36):[],_0x2f0eea=!_0x11ca60&&_0x49c39d['length']>0x0?buildSkillPackage(_0x49c39d):undefined,_0x3df3a1=_0x11ca60?bufferSha256(_0x11ca60):_0x2f0eea?.[_0x1e839d(0x18d)][_0x1e839d(0x180)],_0x14cb01=_0x11ca60?.[_0x1e839d(0x17a)]??_0x2f0eea?.[_0x1e839d(0x18d)]['zipSize'],_0x2c5987=_0x49c39d[_0x1e839d(0x17a)]>0x0?Object[_0x1e839d(0x191)](_0x49c39d[_0x1e839d(0x17d)](_0x22f815=>[_0x22f815[_0x1e839d(0x194)],fileHash(_0x22f815)])):undefined;return{'schemaVersion':_0x49c39d[_0x1e839d(0x17a)]>0x0?0x2:0x1,'id':_0x1a6f4e['id'],'appCode':_0x5d53a9,'skillCode':requireSkillCode(_0x1a6f4e),'skillName':_0x1a6f4e[_0x1e839d(0x197)],'description':_0x1a6f4e[_0x1e839d(0x17b)],'scope':_0x1008c1,'readonly':_0x1008c1!==_0x1e839d(0x192)||_0x1a6f4e[_0x1e839d(0x199)]===!![],'tenantCode':_0x1a6f4e[_0x1e839d(0x18b)],'userId':_0x1a6f4e['userId'],'version':_0x1a6f4e['version'],'status':_0x1a6f4e[_0x1e839d(0x18c)],'tags':Array[_0x1e839d(0x184)](_0x1a6f4e[_0x1e839d(0x186)])?_0x1a6f4e[_0x1e839d(0x186)]:[],'hasUpstreamUpdate':_0x1a6f4e[_0x1e839d(0x179)],'forkedFromSkillId':_0x1a6f4e[_0x1e839d(0x190)],'forkedFromVersion':_0x1a6f4e[_0x1e839d(0x198)],'sourceSessionId':_0x1a6f4e[_0x1e839d(0x18f)],'contentHash':_0x33bafc,'fileHashes':_0x2c5987,'treeHash':_0x49c39d[_0x1e839d(0x17a)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x49c39d)):undefined,'ossPath':remoteManifestOssPath(_0x1a6f4e[_0x1e839d(0x183)]),'zipSha256':_0x3df3a1,'zipSize':_0x14cb01,'files':_0x49c39d['length']>0x0?_0x49c39d[_0x1e839d(0x17d)](_0x54dda7=>({'path':_0x54dda7[_0x1e839d(0x194)],'hash':fileHash(_0x54dda7),'size':fileContent(_0x54dda7)[_0x1e839d(0x17a)]})):undefined,'pulledAt':_0x5c7920??new Date()[_0x1e839d(0x189)]()};}export function requireSkillCode(_0x117482){const _0x39f149=a102_0x3c80,_0x6a37de=_0x117482[_0x39f149(0x17e)]?.[_0x39f149(0x195)]();if(!_0x6a37de)throw CliErrors[_0x39f149(0x19b)](_0x39f149(0x182));return _0x6a37de;}export function readMetadataIfPresent(_0x5400c3){const _0x444634=a102_0x3c80;if(!existsSync(_0x5400c3))return undefined;try{const _0x5f0336=JSON['parse'](readFileSync(_0x5400c3,_0x444634(0x17c)));return _0x5f0336;}catch{throw CliErrors[_0x444634(0x19b)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x5400c3);}}function remoteManifestOssPath(_0x2a9338){const _0xbe8964=a102_0x3c80;if(!_0x2a9338||typeof _0x2a9338!==_0xbe8964(0x185)||Array[_0xbe8964(0x184)](_0x2a9338))return undefined;const _0x4f0dd4=_0x2a9338['ossPath'];return typeof _0x4f0dd4===_0xbe8964(0x18a)&&_0x4f0dd4[_0xbe8964(0x195)]()?_0x4f0dd4[_0xbe8964(0x195)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a103_0xb93698=a103_0x30ed;(function(_0x12c22a,_0x49be42){const _0x40ada4=a103_0x30ed,_0x2931ce=_0x12c22a();while(!![]){try{const _0x400175=parseInt(_0x40ada4(0x1da))/0x1*(-parseInt(_0x40ada4(0x1d2))/0x2)+parseInt(_0x40ada4(0x1d3))/0x3*(-parseInt(_0x40ada4(0x1d5))/0x4)+parseInt(_0x40ada4(0x1c6))/0x5*(-parseInt(_0x40ada4(0x1d9))/0x6)+parseInt(_0x40ada4(0x1cd))/0x7*(-parseInt(_0x40ada4(0x1ca))/0x8)+parseInt(_0x40ada4(0x1c3))/0x9*(parseInt(_0x40ada4(0x1c5))/0xa)+-parseInt(_0x40ada4(0x1d4))/0xb+parseInt(_0x40ada4(0x1ce))/0xc;if(_0x400175===_0x49be42)break;else _0x2931ce['push'](_0x2931ce['shift']());}catch(_0x54ec60){_0x2931ce['push'](_0x2931ce['shift']());}}}(a103_0x5a3d,0xca1a3));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';function a103_0x5a3d(){const _0x38d491=['3412QVuLPL','3PLrDZT','4708308vNgOmj','881684LTuFQU','includes','Unsafe\x20','path\x20segment','18dkMxAH','383hudmDq','appCode','skills','validation','27kmHKtk','agentsSkillsDir','2866540kLNAoa','2032835TNAZzi','homeDirName','trim','CLAUDE_SKILL_ROOT','12236560AmtReU','\x20for\x20local\x20path:\x20','claudeSkillsDir','7dittYt','48227604MWPBTW','.agents','homeDir','SKILL_ROOT'];a103_0x5a3d=function(){return _0x38d491;};return a103_0x5a3d();}export function resolveSkillSyncPaths(_0x171db4={}){const _0x4c8273=a103_0x30ed,_0x547d6e=_0x171db4[_0x4c8273(0x1d0)]??homedir(),_0x48e770=resolve(_0x547d6e,PRODUCT_CONFIG['homeDirName'],'cache'),_0x389961=trimmedEnv(_0x4c8273(0x1d1)),_0x589bf9=trimmedEnv(_0x4c8273(0x1c9));return{'homeDir':_0x547d6e,'cacheRoot':_0x48e770,'managedRoot':resolve(_0x547d6e,PRODUCT_CONFIG[_0x4c8273(0x1c7)]),'agentsSkillsDir':_0x171db4[_0x4c8273(0x1c4)]??_0x389961??resolve(_0x547d6e,_0x4c8273(0x1cf),_0x4c8273(0x1dc)),'claudeSkillsDir':_0x171db4[_0x4c8273(0x1cc)]??_0x589bf9??resolve(_0x547d6e,'.claude',_0x4c8273(0x1dc))};}export function getRuntimeSkillCacheRoot(_0x225249,_0x822c8e,_0x2a6d87={}){const _0x1eb704=resolveSkillSyncPaths(_0x2a6d87);return resolve(_0x1eb704['cacheRoot'],_0x225249,fingerprintAccessKey(_0x822c8e),'skills');}export function getRuntimeSkillDir(_0x38a78f,_0x338e30,_0x5e35aa,_0x179474,_0xb77f4d,_0x106aab={}){const _0x45c28e=a103_0x30ed;return resolve(getRuntimeSkillCacheRoot(_0x38a78f,_0x338e30,_0x106aab),safePathSegment(_0x5e35aa,_0x45c28e(0x1db)),_0x179474,safePathSegment(_0xb77f4d,'skillCode'));}export function safePathSegment(_0x5756b7,_0x316bf9=a103_0xb93698(0x1d8)){const _0x6affcb=a103_0xb93698;if(!_0x5756b7||_0x5756b7[_0x6affcb(0x1d6)]('/')||_0x5756b7[_0x6affcb(0x1d6)]('\x5c')||_0x5756b7['includes']('..'))throw CliErrors[_0x6affcb(0x1c2)](_0x6affcb(0x1d7)+_0x316bf9+_0x6affcb(0x1cb)+_0x5756b7);return _0x5756b7;}function a103_0x30ed(_0x6533df,_0x206052){_0x6533df=_0x6533df-0x1c2;const _0x5a3de6=a103_0x5a3d();let _0x30edfa=_0x5a3de6[_0x6533df];return _0x30edfa;}function trimmedEnv(_0x49b099){const _0x2b9137=a103_0xb93698,_0x211da3=productEnv(_0x49b099)?.[_0x2b9137(0x1c8)]();return _0x211da3?_0x211da3:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3205b9,_0x5e976a){const _0x4c08cc=a99_0x3644,_0x5dd1be=_0x3205b9();while(!![]){try{const _0x5b181c=-parseInt(_0x4c08cc(0xc8))/0x1+parseInt(_0x4c08cc(0xb1))/0x2*(-parseInt(_0x4c08cc(0x9b))/0x3)+-parseInt(_0x4c08cc(0xbb))/0x4+parseInt(_0x4c08cc(0xa2))/0x5*(parseInt(_0x4c08cc(0xc4))/0x6)+-parseInt(_0x4c08cc(0x9f))/0x7+-parseInt(_0x4c08cc(0xa9))/0x8+-parseInt(_0x4c08cc(0xa7))/0x9*(-parseInt(_0x4c08cc(0xb8))/0xa);if(_0x5b181c===_0x5e976a)break;else _0x5dd1be['push'](_0x5dd1be['shift']());}catch(_0xd96ce3){_0x5dd1be['push'](_0x5dd1be['shift']());}}}(a99_0x280a,0xa49e6));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a99_0x3644(_0x406f5a,_0x4bd7da){_0x406f5a=_0x406f5a-0x9b;const _0x280af0=a99_0x280a();let _0x3644e2=_0x280af0[_0x406f5a];return _0x3644e2;}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(_0x1fc8a7,_0x2fd612,_0x539867={}){const _0x5ef64a=a99_0x3644,_0x17e9e4=resolvePushDirectoryRoot(_0x1fc8a7),_0x3c9572=readMetadataIfPresent(resolve(_0x17e9e4,METADATA_FILE));if(_0x3c9572?.[_0x5ef64a(0xbd)]&&_0x3c9572['appCode']!==_0x2fd612&&!_0x539867[_0x5ef64a(0x9c)])throw CliErrors[_0x5ef64a(0xcb)]('Skill\x20metadata\x20appCode\x20\x22'+_0x3c9572[_0x5ef64a(0xbd)]+_0x5ef64a(0xc6)+_0x2fd612+'\x22.');const _0x490e37=_0x3c9572?.[_0x5ef64a(0xc7)]?.['trim']()||deriveSkillCodeFromDirectory(_0x17e9e4,_0x2fd612);if(!_0x490e37)throw CliErrors[_0x5ef64a(0xcb)](_0x5ef64a(0xb2)+METADATA_FILE+_0x5ef64a(0xc0));return{'dir':_0x17e9e4,'skillCode':_0x490e37,'metadata':_0x3c9572};}export function readPushDirectory(_0xdbb200,_0xef726f,_0x4c2e67={}){const _0x8495ce=a99_0x3644,_0x5ddd50=resolvePushDirectoryIdentity(_0xdbb200,_0xef726f,_0x4c2e67),_0x1aee6=_0x5ddd50[_0x8495ce(0xc3)],_0x2caceb=resolve(_0x1aee6,SKILL_FILE);if(!existsSync(_0x2caceb)||!lstatSync(_0x2caceb)[_0x8495ce(0xc9)]())throw CliErrors[_0x8495ce(0xcb)](_0x8495ce(0xb3)+SKILL_FILE+':\x20'+_0x2caceb);const _0x45acd8=_0x5ddd50[_0x8495ce(0xa5)],_0x52a979=_0x4c2e67[_0x8495ce(0xa0)]??_0x8495ce(0xb5);if(_0x45acd8?.[_0x8495ce(0xad)]===_0x8495ce(0xb9))throw CliErrors[_0x8495ce(0xcb)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x8495ce(0x9d)+_0x45acd8[_0x8495ce(0xad)]+'\x22.');if(_0x52a979==='personal'&&_0x45acd8?.['scope']&&_0x45acd8[_0x8495ce(0xad)]!==_0x8495ce(0xb5))throw CliErrors[_0x8495ce(0xcb)](_0x8495ce(0xcf)+METADATA_FILE+_0x8495ce(0x9d)+_0x45acd8['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x1aee6+_0x8495ce(0xc2));const _0x1c20bc=scanSkillDirectory(_0x1aee6),_0x1e1182=buildSkillPackage(_0x1c20bc),_0x534fd3=readFileSync(_0x2caceb,_0x8495ce(0xac)),_0x11b6f3=_0x5ddd50[_0x8495ce(0xc7)];return{'skillCode':_0x11b6f3,'metadata':_0x45acd8,'input':{'skillCode':_0x11b6f3,'skillName':_0x45acd8?.[_0x8495ce(0xb0)],'description':_0x45acd8?.[_0x8495ce(0xaa)],'content':_0x534fd3,'files':_0x1e1182[_0x8495ce(0xcc)],'packageBase64':_0x1e1182[_0x8495ce(0xbf)],'tags':_0x45acd8?.['tags'],'version':_0x45acd8?.[_0x8495ce(0xbe)],'sourceSessionId':_0x45acd8?.[_0x8495ce(0xae)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x96914c,_0x1c22e9,_0x4e593c,_0x9a41f0={}){const _0x513ad3=a99_0x3644,_0x5349bd=resolvePushDirectoryRoot(_0x96914c),_0x2e9922=readMetadataIfPresent(resolve(_0x5349bd,METADATA_FILE)),_0x20b22b=requireRemoteScope(_0x1c22e9),_0x2a9b9f=readLocalSkillContent(_0x5349bd),_0x3ab6c3={..._0x1c22e9,'appCode':_0x1c22e9['appCode']??_0x4e593c,'skillName':_0x1c22e9['skillName']??_0x2e9922?.['skillName'],'description':_0x1c22e9[_0x513ad3(0xaa)]??_0x2e9922?.[_0x513ad3(0xaa)],'tags':Array[_0x513ad3(0xa8)](_0x1c22e9[_0x513ad3(0x9e)])?_0x1c22e9[_0x513ad3(0x9e)]:_0x2e9922?.[_0x513ad3(0x9e)],'sourceSessionId':_0x1c22e9[_0x513ad3(0xae)]??_0x2e9922?.[_0x513ad3(0xae)],'content':_0x1c22e9[_0x513ad3(0xc5)]??_0x2a9b9f},_0x2b97e0=buildMetadata(_0x3ab6c3,_0x20b22b,_0x4e593c,contentHash(_0x2a9b9f),_0x9a41f0[_0x513ad3(0xa3)]);writeJsonAtomic(resolve(_0x5349bd,METADATA_FILE),_0x2b97e0);}function a99_0x280a(){const _0x35edb3=['metadata','isDirectory','9oCmMoB','isArray','7080600STfyDA','description','\x20has\x20unsupported\x20scope\x20\x22','utf8','scope','sourceSessionId','files','skillName','89418XNgBGm','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Missing\x20','unknown','personal','path','(unknown)','24643650tLFGcj','builtin','some','2125632jgDKWa','company','appCode','version','packageBase64','\x20or\x20directory\x20name.','isSymbolicLink','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','dir','4908ubdoSb','content','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','skillCode','273960nahYBL','isFile','length','validation','manifest','find','Skill\x20directory\x20not\x20found:\x20','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','3KMQjww','allowAppCodeRetarget','\x20has\x20scope=\x22','tags','7931413MvwLbt','targetScope','filter','6590OyHgsx','refreshedAt','startsWith'];a99_0x280a=function(){return _0x35edb3;};return a99_0x280a();}export function recordPushedRuntimeSkill(_0x36d957,_0x24ca62,_0x4fb65a,_0x4399e6={}){const _0x2d9603=a99_0x3644,_0x16e587=resolvePushDirectoryRoot(_0x36d957),_0xeb185c=scanSkillDirectory(_0x16e587),_0x3ec5cf=_0xeb185c[_0x2d9603(0xcd)](_0x13ae86=>_0x13ae86[_0x2d9603(0xb6)]===SKILL_FILE),_0x1c2aa7=_0x3ec5cf?fileText(_0x3ec5cf):'',_0x1ace69=tryNormalizePackageManifest(_0x24ca62[_0x2d9603(0xaf)]),_0x35a156={..._0x24ca62,'content':_0x24ca62[_0x2d9603(0xc5)]??_0x1c2aa7,'files':_0x1ace69},_0x137903=_0x1ace69?normalizeLocalFiles(_0xeb185c)[_0x2d9603(0xa1)](_0x47f44d=>_0x1ace69[_0x2d9603(0xaf)][_0x2d9603(0xba)](_0x4e9e1e=>_0x4e9e1e[_0x2d9603(0xb6)]===_0x47f44d['path'])):undefined,_0x2905b0=buildMetadata(_0x35a156,_0x4399e6[_0x2d9603(0xad)]??'personal',_0x4fb65a,contentHash(_0x35a156[_0x2d9603(0xc5)]??''),_0x4399e6['pushedAt'],_0x137903);writeJsonAtomic(resolve(_0x16e587,METADATA_FILE),_0x2905b0);}export function deriveSkillCodeFromDirectory(_0x16fe08,_0xf5b2a4){const _0x22ab37=a99_0x3644,_0x317a13=basename(resolve(_0x16fe08)),_0x119975=_0xf5b2a4+'--';return _0x317a13[_0x22ab37(0xa4)](_0x119975)?_0x317a13['slice'](_0x119975[_0x22ab37(0xca)]):_0x317a13;}function resolvePushDirectoryRoot(_0x58031d){const _0x2f222a=a99_0x3644,_0x1779a7=resolve(_0x58031d);if(!existsSync(_0x1779a7))throw CliErrors[_0x2f222a(0xcb)](_0x2f222a(0xce)+_0x58031d);const _0x3cecc7=lstatSync(_0x1779a7);if(_0x3cecc7[_0x2f222a(0xa6)]())return _0x1779a7;if(_0x3cecc7[_0x2f222a(0xc1)]()){const _0x45450f=realpathSync(_0x1779a7);if(lstatSync(_0x45450f)[_0x2f222a(0xa6)]())return _0x45450f;}throw CliErrors[_0x2f222a(0xcb)]('Skill\x20directory\x20not\x20found:\x20'+_0x58031d);}function requireRemoteScope(_0x10bf53){const _0x44e18a=a99_0x3644;if(_0x10bf53['scope']===_0x44e18a(0xb5)||_0x10bf53[_0x44e18a(0xad)]===_0x44e18a(0xbc)||_0x10bf53[_0x44e18a(0xad)]===_0x44e18a(0xb9))return _0x10bf53[_0x44e18a(0xad)];throw CliErrors[_0x44e18a(0xcb)]('Remote\x20Skill\x20'+(_0x10bf53[_0x44e18a(0xc7)]||_0x44e18a(0xb7))+_0x44e18a(0xab)+(_0x10bf53['scope']??_0x44e18a(0xb4))+'\x22.');}function readLocalSkillContent(_0x2b9c89){const _0xf3ade4=a99_0x3644,_0x191b50=resolve(_0x2b9c89,SKILL_FILE);return existsSync(_0x191b50)&&lstatSync(_0x191b50)[_0xf3ade4(0xc9)]()?readFileSync(_0x191b50,_0xf3ade4(0xac)):'';}
|
|
1
|
+
(function(_0x1913f8,_0x514c3b){const _0x7eb40=a104_0x4c44,_0x85e11e=_0x1913f8();while(!![]){try{const _0x44a4d4=parseInt(_0x7eb40(0xba))/0x1*(parseInt(_0x7eb40(0x7b))/0x2)+-parseInt(_0x7eb40(0x84))/0x3*(parseInt(_0x7eb40(0xb1))/0x4)+parseInt(_0x7eb40(0xaf))/0x5*(-parseInt(_0x7eb40(0x92))/0x6)+-parseInt(_0x7eb40(0xa5))/0x7*(parseInt(_0x7eb40(0x8a))/0x8)+-parseInt(_0x7eb40(0x83))/0x9*(parseInt(_0x7eb40(0x96))/0xa)+parseInt(_0x7eb40(0x7e))/0xb+parseInt(_0x7eb40(0x82))/0xc;if(_0x44a4d4===_0x514c3b)break;else _0x85e11e['push'](_0x85e11e['shift']());}catch(_0x1753f0){_0x85e11e['push'](_0x85e11e['shift']());}}}(a104_0x338d,0x9d8fe));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x4f2f61}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';function a104_0x4c44(_0xe2db41,_0xad4588){_0xe2db41=_0xe2db41-0x7a;const _0x338ddb=a104_0x338d();let _0x4c4472=_0x338ddb[_0xe2db41];return _0x4c4472;}import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x58b968,_0x4b6276,_0x3f6b8a={}){const _0x372519=a104_0x4c44,_0x21257c=resolvePushDirectoryRoot(_0x58b968),_0x2fc752=readPushMetadataIfPresent(resolve(_0x21257c,METADATA_FILE),{'ignoreInvalidMetadata':_0x3f6b8a['ignoreInvalidMetadata']});if(_0x2fc752?.[_0x372519(0x91)]&&_0x2fc752[_0x372519(0x91)]!==_0x4b6276&&!_0x3f6b8a[_0x372519(0xa4)]&&!_0x3f6b8a[_0x372519(0xa9)])throw CliErrors[_0x372519(0xa3)](_0x372519(0x80)+_0x2fc752['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4b6276+'\x22.');const _0x5ded2a=resolvePushSkillCode(_0x21257c,_0x4b6276,_0x2fc752,_0x3f6b8a);if(!_0x5ded2a)throw CliErrors[_0x372519(0xa3)](_0x372519(0x8e)+SKILL_FILE+',\x20'+METADATA_FILE+_0x372519(0x86));return{'dir':_0x21257c,'skillCode':_0x5ded2a,'metadata':_0x2fc752};}export function readPushDirectory(_0x581a0f,_0x3eb626,_0x5c7538={}){const _0x3f9595=a104_0x4c44,_0x133024=resolvePushDirectoryIdentity(_0x581a0f,_0x3eb626,_0x5c7538),_0xe66ea5=_0x133024['dir'],_0x3adac0=resolve(_0xe66ea5,SKILL_FILE);if(!existsSync(_0x3adac0)||!lstatSync(_0x3adac0)[_0x3f9595(0x99)]())throw CliErrors[_0x3f9595(0xa3)]('Missing\x20'+SKILL_FILE+':\x20'+_0x3adac0);const _0x5514d3=_0x133024[_0x3f9595(0x8d)],_0x26d326=_0x5c7538[_0x3f9595(0x97)]??_0x3f9595(0xad);if(!_0x5c7538[_0x3f9595(0xa2)]&&_0x5514d3?.[_0x3f9595(0x8b)]===_0x3f9595(0xa8))throw CliErrors[_0x3f9595(0xa3)](_0x3f9595(0x93)+METADATA_FILE+_0x3f9595(0xb8)+_0x5514d3['scope']+'\x22.');if(!_0x5c7538['ignoreMetadataScope']&&_0x26d326===_0x3f9595(0xad)&&_0x5514d3?.[_0x3f9595(0x8b)]&&_0x5514d3[_0x3f9595(0x8b)]!==_0x3f9595(0xad))throw CliErrors[_0x3f9595(0xa3)](_0x3f9595(0xb9)+METADATA_FILE+_0x3f9595(0xb8)+_0x5514d3[_0x3f9595(0x8b)]+'\x22.',_0x3f9595(0x9b)+_0xe66ea5+_0x3f9595(0x81));const _0x3b57aa=scanSkillDirectory(_0xe66ea5),_0x153561=buildSkillPackage(_0x3b57aa),_0x3d70c6=readFileSync(_0x3adac0,_0x3f9595(0xab)),_0x21df02=_0x133024['skillCode'],_0x286f03=_0x5c7538['ignoreMetadataForPayload']?undefined:_0x5514d3;return{'skillCode':_0x21df02,'metadata':_0x5514d3,'input':{'skillCode':_0x21df02,'skillName':_0x286f03?.[_0x3f9595(0xb4)],'description':_0x286f03?.[_0x3f9595(0x89)],'content':_0x3d70c6,'files':_0x153561['manifest'],'packageBase64':_0x153561['packageBase64'],'tags':_0x286f03?.[_0x3f9595(0x98)],'version':_0x286f03?.[_0x3f9595(0x94)],'sourceSessionId':_0x286f03?.[_0x3f9595(0xb3)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x17dbcf,_0x8a0697,_0x33644c,_0x530873={}){const _0x5d2764=a104_0x4c44,_0xa14ed1=resolvePushDirectoryRoot(_0x17dbcf),_0x41a62b=readPushMetadataIfPresent(resolve(_0xa14ed1,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5484a5=requireRemoteScope(_0x8a0697),_0x164513=readLocalSkillContent(_0xa14ed1),_0x1a2d22={..._0x8a0697,'appCode':_0x8a0697[_0x5d2764(0x91)]??_0x33644c,'skillName':_0x8a0697['skillName']??_0x41a62b?.[_0x5d2764(0xb4)],'description':_0x8a0697[_0x5d2764(0x89)]??_0x41a62b?.['description'],'tags':Array['isArray'](_0x8a0697['tags'])?_0x8a0697[_0x5d2764(0x98)]:_0x41a62b?.[_0x5d2764(0x98)],'sourceSessionId':_0x8a0697[_0x5d2764(0xb3)]??_0x41a62b?.['sourceSessionId'],'content':_0x8a0697[_0x5d2764(0xb5)]??_0x164513},_0x587b4d=buildMetadata(_0x1a2d22,_0x5484a5,_0x33644c,contentHash(_0x164513),_0x530873['refreshedAt']);writeJsonAtomic(resolve(_0xa14ed1,METADATA_FILE),_0x587b4d);}function a104_0x338d(){const _0x74d425=['skillName','content','number','slice','\x20has\x20scope=\x22','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','310027HFTxmt','Remote\x20Skill\x20','2qjnZPA','object','ignoreMetadataSkillCode','1082807XhHkEY','ignoreInvalidMetadata','Skill\x20metadata\x20appCode\x20\x22','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','29596296zmZEoK','6813LFZSqB','592239XZDOTb','unknown',',\x20or\x20directory\x20name.','string','toLowerCase','description','48xAEmoM','scope','replace','metadata','Unable\x20to\x20resolve\x20skillCode\x20from\x20','company','files','appCode','2469036pZRVLD','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','version','length','3120GYReqy','targetScope','tags','isFile','boolean','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','(unknown)','startsWith','isDirectory','pushedAt','isArray','skillCode','ignoreMetadataScope','validation','allowAppCodeRetarget','1384754ibyTRY','path','find','builtin','ignoreMetadataAppCodeMismatch','Invalid\x20','utf8','\x20has\x20unsupported\x20scope\x20\x22','personal','\x20name\x20for\x20SkillHub\x20slug\x20generation.','5vTsfBS','isSymbolicLink','8tXGQFk','trim','sourceSessionId'];a104_0x338d=function(){return _0x74d425;};return a104_0x338d();}export function recordPushedRuntimeSkill(_0xd146f8,_0x89264c,_0x331686,_0x429a06={}){const _0x4b446e=a104_0x4c44,_0x5c5729=resolvePushDirectoryRoot(_0xd146f8),_0x287b3f=scanSkillDirectory(_0x5c5729),_0x149c9a=_0x287b3f[_0x4b446e(0xa7)](_0x20b24e=>_0x20b24e['path']===SKILL_FILE),_0x478843=_0x149c9a?fileText(_0x149c9a):'',_0x3ddf95=tryNormalizePackageManifest(_0x89264c[_0x4b446e(0x90)]),_0x99d505={..._0x89264c,'content':_0x89264c[_0x4b446e(0xb5)]??_0x478843,'files':_0x3ddf95},_0x517f54=_0x3ddf95?normalizeLocalFiles(_0x287b3f)['filter'](_0x372534=>_0x3ddf95[_0x4b446e(0x90)]['some'](_0x5a5588=>_0x5a5588[_0x4b446e(0xa6)]===_0x372534['path'])):undefined,_0x50055c=buildMetadata(_0x99d505,_0x429a06['scope']??_0x4b446e(0xad),_0x331686,contentHash(_0x99d505[_0x4b446e(0xb5)]??''),_0x429a06[_0x4b446e(0x9f)],_0x517f54);writeJsonAtomic(resolve(_0x5c5729,METADATA_FILE),_0x50055c);}export function deriveSkillCodeFromDirectory(_0x6bdbd4,_0x8f1c1b){const _0x24b568=a104_0x4c44,_0x3ea533=basename(resolve(_0x6bdbd4)),_0x19ce29=_0x8f1c1b+'--';return _0x3ea533[_0x24b568(0x9d)](_0x19ce29)?_0x3ea533[_0x24b568(0xb7)](_0x19ce29[_0x24b568(0x95)]):_0x3ea533;}function resolvePushSkillCode(_0x3c6a0a,_0x30a347,_0x3d5df4,_0x536008){const _0x447085=a104_0x4c44,_0xb260fe=deriveSkillCodeFromSkillFile(_0x3c6a0a)||deriveSkillCodeFromDirectory(_0x3c6a0a,_0x30a347);if(_0x536008[_0x447085(0x7d)])return _0xb260fe;return _0x3d5df4?.[_0x447085(0xa1)]?.[_0x447085(0xb2)]()||_0xb260fe;}function deriveSkillCodeFromSkillFile(_0x3ff193){const _0x79b115=a104_0x4c44,_0x4a1264=resolve(_0x3ff193,SKILL_FILE);if(!existsSync(_0x4a1264)||!lstatSync(_0x4a1264)[_0x79b115(0x99)]())return undefined;const _0x2e5350=readFileSync(_0x4a1264,_0x79b115(0xab)),_0x2c8c36=_0x2e5350['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2c8c36)return undefined;const _0x419b99=parseFrontmatterObject(_0x2c8c36[0x1]??''),_0x3014ce=scalarToString(_0x419b99?.['name']);return _0x3014ce?slugifySkillName(_0x3014ce):undefined;}function slugifySkillName(_0x2f0138){const _0xfff679=a104_0x4c44,_0x17abdc=_0x2f0138[_0xfff679(0xb2)]()[_0xfff679(0x88)]()[_0xfff679(0x8c)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0xfff679(0x8c)](/^-+/,'')[_0xfff679(0x8c)](/-+$/,'')[_0xfff679(0x8c)](/-{2,}/g,'-');if(!_0x17abdc)throw CliErrors[_0xfff679(0xa3)](_0xfff679(0xaa)+SKILL_FILE+_0xfff679(0xae));return _0x17abdc;}function parseFrontmatterObject(_0x57452e){const _0x224782=a104_0x4c44;try{const _0xdfb938=a104_0x4f2f61(_0x57452e);return _0xdfb938&&typeof _0xdfb938===_0x224782(0x7c)&&!Array[_0x224782(0xa0)](_0xdfb938)?_0xdfb938:undefined;}catch{return undefined;}}function scalarToString(_0x172eb9){const _0x29b246=a104_0x4c44;if(typeof _0x172eb9===_0x29b246(0x87))return _0x172eb9[_0x29b246(0xb2)]();if(typeof _0x172eb9===_0x29b246(0xb6)||typeof _0x172eb9===_0x29b246(0x9a))return String(_0x172eb9);return undefined;}function resolvePushDirectoryRoot(_0x4e692f){const _0x230234=a104_0x4c44,_0x3105cd=resolve(_0x4e692f);if(!existsSync(_0x3105cd))throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x4e692f);const _0x51bd26=lstatSync(_0x3105cd);if(_0x51bd26[_0x230234(0x9e)]())return _0x3105cd;if(_0x51bd26[_0x230234(0xb0)]()){const _0x1d5048=realpathSync(_0x3105cd);if(lstatSync(_0x1d5048)[_0x230234(0x9e)]())return _0x1d5048;}throw CliErrors[_0x230234(0xa3)]('Skill\x20directory\x20not\x20found:\x20'+_0x4e692f);}function requireRemoteScope(_0xdee592){const _0x10ccdb=a104_0x4c44;if(_0xdee592[_0x10ccdb(0x8b)]===_0x10ccdb(0xad)||_0xdee592['scope']===_0x10ccdb(0x8f)||_0xdee592[_0x10ccdb(0x8b)]==='builtin')return _0xdee592[_0x10ccdb(0x8b)];throw CliErrors[_0x10ccdb(0xa3)](_0x10ccdb(0x7a)+(_0xdee592[_0x10ccdb(0xa1)]||_0x10ccdb(0x9c))+_0x10ccdb(0xac)+(_0xdee592[_0x10ccdb(0x8b)]??_0x10ccdb(0x85))+'\x22.');}function readLocalSkillContent(_0x583c0b){const _0x5688a5=a104_0x4c44,_0x10a47e=resolve(_0x583c0b,SKILL_FILE);return existsSync(_0x10a47e)&&lstatSync(_0x10a47e)[_0x5688a5(0x99)]()?readFileSync(_0x10a47e,_0x5688a5(0xab)):'';}function readPushMetadataIfPresent(_0x3fbd33,_0x862d3f={}){const _0x436d74=a104_0x4c44;try{return readMetadataIfPresent(_0x3fbd33);}catch(_0x4efd37){if(_0x862d3f[_0x436d74(0x7f)])return undefined;throw _0x4efd37;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a105_0x522d(){const _0xe655c6=['2640GEgwFC','1513274fYuZJJ','length','3035769dfhfAz','Unsupported\x20runtime\x20Skill\x20scope:\x20','6287988oQlHAf','1434504WEsAVd','136aPdFLW','39798qzSRdL','builtin','company','validation','personal','129495SmoySL','push','910584NvWwoQ'];a105_0x522d=function(){return _0xe655c6;};return a105_0x522d();}(function(_0x4d443d,_0x1e175c){const _0xd2f142=a105_0x1473,_0x4e3044=_0x4d443d();while(!![]){try{const _0x1fab72=-parseInt(_0xd2f142(0x1e4))/0x1+parseInt(_0xd2f142(0x1eb))/0x2+parseInt(_0xd2f142(0x1e8))/0x3+-parseInt(_0xd2f142(0x1ec))/0x4*(parseInt(_0xd2f142(0x1e2))/0x5)+-parseInt(_0xd2f142(0x1ea))/0x6+parseInt(_0xd2f142(0x1e6))/0x7+parseInt(_0xd2f142(0x1e5))/0x8*(parseInt(_0xd2f142(0x1ed))/0x9);if(_0x1fab72===_0x1e175c)break;else _0x4e3044['push'](_0x4e3044['shift']());}catch(_0x20e675){_0x4e3044['push'](_0x4e3044['shift']());}}}(a105_0x522d,0x8a0dd));function a105_0x1473(_0x2d502c,_0x4c8495){_0x2d502c=_0x2d502c-0x1df;const _0x522dfc=a105_0x522d();let _0x1473a4=_0x522dfc[_0x2d502c];return _0x1473a4;}import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x87411a){const _0xa843c2=a105_0x1473,_0x226209=_0x87411a&&_0x87411a[_0xa843c2(0x1e7)]>0x0?_0x87411a:[_0xa843c2(0x1e1),_0xa843c2(0x1df),_0xa843c2(0x1ee)],_0x414d3a=[];for(const _0x2b8686 of _0x226209){if(!isRuntimeSkillScope(_0x2b8686))throw CliErrors[_0xa843c2(0x1e0)](_0xa843c2(0x1e9)+_0x2b8686);!_0x414d3a['includes'](_0x2b8686)&&_0x414d3a[_0xa843c2(0x1e3)](_0x2b8686);}return _0x414d3a;}export function isRuntimeSkillScope(_0x479682){const _0x52d030=a105_0x1473;return _0x479682===_0x52d030(0x1e1)||_0x479682===_0x52d030(0x1df)||_0x479682==='builtin';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a107_0x1cb4f8=a107_0x22ad;(function(_0xe15e41,_0x55239a){const _0x396c8d=a107_0x22ad,_0x2037d5=_0xe15e41();while(!![]){try{const _0x323035=parseInt(_0x396c8d(0x10c))/0x1*(parseInt(_0x396c8d(0x114))/0x2)+parseInt(_0x396c8d(0x117))/0x3*(-parseInt(_0x396c8d(0x111))/0x4)+parseInt(_0x396c8d(0x11a))/0x5*(parseInt(_0x396c8d(0x10b))/0x6)+parseInt(_0x396c8d(0x11d))/0x7+-parseInt(_0x396c8d(0x10f))/0x8*(parseInt(_0x396c8d(0x115))/0x9)+-parseInt(_0x396c8d(0x11b))/0xa+-parseInt(_0x396c8d(0x119))/0xb;if(_0x323035===_0x55239a)break;else _0x2037d5['push'](_0x2037d5['shift']());}catch(_0x23ff7d){_0x2037d5['push'](_0x2037d5['shift']());}}}(a107_0x189d,0xc3337));function a107_0x189d(){const _0xf12faf=['3992428ldxAwn','5vupUWH','1067180aRrcXg','from','3657269rwgOjZ','code','endsWith','name','object','8820126swbbPP','1qqUbLg','map','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','8xFJoJG','length','312WrdPoe','1980-01-01T00:00:00.000Z','validation','909384ANwaFW','7277769GhZVky','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','14205MNAcmu','sort'];a107_0x189d=function(){return _0xf12faf;};return a107_0x189d();}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a107_0x1cb4f8(0x112));export function createDeterministicZipPackage(_0xc50507){const _0x4d3e0b=a107_0x1cb4f8,_0x21a92c={};for(const _0x9bc9ed of normalizeLocalFiles(_0xc50507)){_0x21a92c[_0x9bc9ed['path']]=fileContent(_0x9bc9ed);}return Buffer[_0x4d3e0b(0x11c)](zipSync(_0x21a92c,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x3aac05){const _0x4fb6ac=a107_0x1cb4f8;if(_0x3aac05[_0x4fb6ac(0x110)]<0x16)throw CliErrors['validation'](_0x4fb6ac(0x10e));let _0x3a437a;try{_0x3a437a=unzipSync(_0x3aac05,{'filter'(_0xc926f2){const _0x5c28f5=_0x4fb6ac,_0x2585f9=normalizeSkillRelativePath(_0xc926f2[_0x5c28f5(0x109)]);if(_0x2585f9[_0x5c28f5(0x108)]('/'))throw CliErrors[_0x5c28f5(0x113)](_0x5c28f5(0x116)+_0x2585f9);return!![];}});}catch(_0x3168ea){if(isRuntimeSkillValidationError(_0x3168ea))throw _0x3168ea;throw CliErrors[_0x4fb6ac(0x113)](_0x4fb6ac(0x10e));}return Object['entries'](_0x3a437a)[_0x4fb6ac(0x10d)](([_0x531b18,_0x5b3f74])=>({'path':normalizeSkillRelativePath(_0x531b18),'bytes':Buffer[_0x4fb6ac(0x11c)](_0x5b3f74)}))[_0x4fb6ac(0x118)](compareSkillFiles);}function a107_0x22ad(_0x211686,_0x2a43a2){_0x211686=_0x211686-0x107;const _0x189d91=a107_0x189d();let _0x22ada6=_0x189d91[_0x211686];return _0x22ada6;}function isRuntimeSkillValidationError(_0x55de11){const _0x429f0e=a107_0x1cb4f8;return typeof _0x55de11===_0x429f0e(0x10a)&&_0x55de11!==null&&_0x429f0e(0x107)in _0x55de11&&_0x55de11['code']==='validation_error';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x471970,_0xcbe61f){const _0x18b269=a108_0x4396,_0x25d6b5=_0x471970();while(!![]){try{const _0x5dc323=parseInt(_0x18b269(0x1c5))/0x1*(parseInt(_0x18b269(0x1c8))/0x2)+parseInt(_0x18b269(0x1a6))/0x3+-parseInt(_0x18b269(0x1a5))/0x4*(parseInt(_0x18b269(0x1ba))/0x5)+-parseInt(_0x18b269(0x1c2))/0x6*(-parseInt(_0x18b269(0x19c))/0x7)+-parseInt(_0x18b269(0x1a0))/0x8*(parseInt(_0x18b269(0x1ca))/0x9)+-parseInt(_0x18b269(0x1bd))/0xa+-parseInt(_0x18b269(0x1af))/0xb*(parseInt(_0x18b269(0x19e))/0xc);if(_0x5dc323===_0xcbe61f)break;else _0x25d6b5['push'](_0x25d6b5['shift']());}catch(_0x2a7739){_0x25d6b5['push'](_0x25d6b5['shift']());}}}(a108_0x394b,0xe2b25));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x4e4725){const _0xc3ad81=a108_0x4396,_0xdfbd74=normalizeLocalFiles(_0x4e4725);if(!_0xdfbd74[_0xc3ad81(0x1b3)](_0xd715f0=>_0xd715f0['path']===SKILL_FILE))throw CliErrors[_0xc3ad81(0x1c1)](_0xc3ad81(0x1a9)+SKILL_FILE+_0xc3ad81(0x1ad));const _0x33a0fa=localFilesToManifestFiles(_0xdfbd74),_0x42581e=createDeterministicZipPackage(_0xdfbd74);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x33a0fa),'zipSha256':bufferSha256(_0x42581e),'zipSize':_0x42581e[_0xc3ad81(0x1a3)],'files':_0x33a0fa},'packageBytes':_0x42581e,'packageBase64':_0x42581e[_0xc3ad81(0x1a1)](_0xc3ad81(0x1cc))};}function a108_0x4396(_0x38c4c9,_0x2011b4){_0x38c4c9=_0x38c4c9-0x19b;const _0x394bae=a108_0x394b();let _0x43965c=_0x394bae[_0x38c4c9];return _0x43965c;}export function verifyRuntimeSkillPackage(_0xd3a438,_0x52246d){const _0x3f932c=a108_0x4396,_0x5b7985=normalizePackageManifest(_0xd3a438,{'requireOssPath':![]});if(!_0x5b7985)throw CliErrors['validation'](_0x3f932c(0x1b6));return extractAndVerifyPackage(_0x5b7985,_0x52246d);}export function verifyRuntimeSkillBundle(_0x37a518,_0x3cfa6e){const _0x221a86=a108_0x4396,_0x16ec3b=normalizePackageManifest(_0x37a518,{'requireOssPath':![]});if(!_0x16ec3b)throw CliErrors[_0x221a86(0x1c1)](_0x221a86(0x1b6));return extractAndVerifyPackageFiles(_0x16ec3b,_0x3cfa6e);}export function tryNormalizePackageManifest(_0x2c0274){return normalizePackageManifest(_0x2c0274,{'requireOssPath':![]});}export function requirePackageBytes(_0x4aaf46,_0xed4b73){const _0x3e5b95=a108_0x4396;if(!_0xed4b73||_0xed4b73[_0x3e5b95(0x1a3)]===0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x4aaf46);return _0xed4b73;}export function extractDownloadedPackage(_0x26865b){const _0x1f0f23=a108_0x4396,_0xf07f17=parseZipPackage(_0x26865b)[_0x1f0f23(0x1c3)](_0x45a15a=>({'path':_0x45a15a[_0x1f0f23(0x1ae)],'bytes':_0x45a15a[_0x1f0f23(0x1bc)]}));if(!_0xf07f17[_0x1f0f23(0x1b3)](_0x24fac4=>_0x24fac4[_0x1f0f23(0x1ae)]===SKILL_FILE))throw CliErrors[_0x1f0f23(0x1c1)](_0x1f0f23(0x1bb)+SKILL_FILE+'.');return normalizeLocalFiles(_0xf07f17);}export function localFilesToManifestFiles(_0x397ecb){const _0x3a5c9a=a108_0x4396;return normalizeLocalFiles(_0x397ecb)[_0x3a5c9a(0x1c3)](_0x5af611=>({'path':_0x5af611[_0x3a5c9a(0x1ae)],'sha256':fileHash(_0x5af611),'size':fileContent(_0x5af611)[_0x3a5c9a(0x1a3)]}));}function normalizePackageManifest(_0x3c6ffe,_0x2309b7){const _0x196797=a108_0x4396;if(!_0x3c6ffe||typeof _0x3c6ffe!==_0x196797(0x1b8)||Array[_0x196797(0x1a4)](_0x3c6ffe))return undefined;const _0x4224c1=_0x3c6ffe,_0x519d9b=typeof _0x4224c1[_0x196797(0x1a7)]===_0x196797(0x1b9)?_0x4224c1[_0x196797(0x1a7)]['trim']():undefined;if(_0x2309b7[_0x196797(0x1ab)]&&!_0x519d9b)return undefined;if(!Array[_0x196797(0x1a4)](_0x4224c1[_0x196797(0x19b)])||_0x4224c1['files'][_0x196797(0x1a3)]===0x0)return undefined;if(!isSha256Hex(_0x4224c1[_0x196797(0x19d)]))throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x4224c1[_0x196797(0x1bf)]))throw CliErrors[_0x196797(0x1c1)](_0x196797(0x1c0));if(!Number['isSafeInteger'](_0x4224c1['zipSize'])||_0x4224c1[_0x196797(0x1c7)]<0x0)throw CliErrors[_0x196797(0x1c1)](_0x196797(0x1c4));const _0x373f13=normalizeManifestFiles(_0x4224c1[_0x196797(0x19b)]);if(!_0x373f13[_0x196797(0x1b3)](_0x10097a=>_0x10097a[_0x196797(0x1ae)]===SKILL_FILE))throw CliErrors[_0x196797(0x1c1)](_0x196797(0x1b5)+SKILL_FILE+'.');const _0x3cc3d6=fileTreeHash(_0x373f13);if(_0x3cc3d6!==_0x4224c1[_0x196797(0x19d)]['toLowerCase']())throw CliErrors['validation'](_0x196797(0x1b2));return{'schemaVersion':Number[_0x196797(0x1cb)](_0x4224c1[_0x196797(0x1a2)])?_0x4224c1[_0x196797(0x1a2)]:0x2,'ossPath':_0x519d9b,'treeSha256':_0x3cc3d6,'zipSha256':_0x4224c1[_0x196797(0x1bf)]['toLowerCase'](),'zipSize':_0x4224c1[_0x196797(0x1c7)],'files':_0x373f13};}function extractAndVerifyPackage(_0x55e090,_0x8bd716){const _0xa443e4=a108_0x4396,_0x703b28=normalizePackageManifest(_0x55e090,{'requireOssPath':![]});if(!_0x703b28)throw CliErrors[_0xa443e4(0x1c1)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x8bd716[_0xa443e4(0x1a3)]!==_0x703b28[_0xa443e4(0x1c7)])throw CliErrors[_0xa443e4(0x1c1)](_0xa443e4(0x19f));const _0x4517c0=bufferSha256(_0x8bd716);if(_0x4517c0!==_0x703b28[_0xa443e4(0x1bf)])throw CliErrors[_0xa443e4(0x1c1)](_0xa443e4(0x1ac));return extractAndVerifyPackageFiles(_0x703b28,_0x8bd716);}function a108_0x394b(){const _0x2af1d7=['push','370827uFYETF','isSafeInteger','base64','files','7PpnGYv','treeSha256','1474512xQEnWn','Runtime\x20Skill\x20package\x20size\x20mismatch.','88pSqajw','toString','schemaVersion','length','isArray','452CXxZgr','1038006gzptLS','ossPath','Duplicate\x20Skill\x20package\x20entry:\x20','Missing\x20','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','requireOssPath','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','\x20in\x20Skill\x20file\x20package.','path','33foLRgt','set','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','some','has','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','sha256','object','string','53570HjGdMW','Runtime\x20Skill\x20package\x20is\x20missing\x20','bytes','1160920pJJeGZ','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','zipSha256','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','validation','8468814CdGcGI','map','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','1319713tYOxmv','size','zipSize','2cWAdSz'];a108_0x394b=function(){return _0x2af1d7;};return a108_0x394b();}function extractAndVerifyPackageFiles(_0x4e6877,_0xe72ad4){const _0x498636=a108_0x4396,_0x50f8d6=parseZipPackage(_0xe72ad4);if(_0x50f8d6[_0x498636(0x1a3)]!==_0x4e6877[_0x498636(0x19b)][_0x498636(0x1a3)])throw CliErrors['validation'](_0x498636(0x1be));const _0x285c78=new Map();for(const _0x252d0a of _0x50f8d6){if(_0x285c78[_0x498636(0x1b4)](_0x252d0a[_0x498636(0x1ae)]))throw CliErrors[_0x498636(0x1c1)](_0x498636(0x1a8)+_0x252d0a[_0x498636(0x1ae)]);_0x285c78[_0x498636(0x1b0)](_0x252d0a[_0x498636(0x1ae)],_0x252d0a);}const _0xcdc534=[];for(const _0x5294bf of _0x4e6877['files']){const _0x1ef823=_0x285c78['get'](_0x5294bf[_0x498636(0x1ae)]);if(!_0x1ef823)throw CliErrors['validation'](_0x498636(0x1b1)+_0x5294bf[_0x498636(0x1ae)]);if(_0x1ef823['bytes']['length']!==_0x5294bf[_0x498636(0x1c6)])throw CliErrors[_0x498636(0x1c1)](_0x498636(0x1aa)+_0x5294bf['path']);const _0x519032=bufferSha256(_0x1ef823[_0x498636(0x1bc)]);if(_0x519032!==_0x5294bf[_0x498636(0x1b7)])throw CliErrors[_0x498636(0x1c1)]('Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20'+_0x5294bf[_0x498636(0x1ae)]);_0xcdc534[_0x498636(0x1c9)]({'path':_0x5294bf[_0x498636(0x1ae)],'bytes':_0x1ef823[_0x498636(0x1bc)]});}return normalizeLocalFiles(_0xcdc534);}
|