@lovrabet/lovrabet-cli 2.1.10 → 2.1.11-beta.2
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 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- 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 -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/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/rate-limit.js +1 -0
- 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/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a92_0xe980(_0x3a55d8,_0x1bff34){_0x3a55d8=_0x3a55d8-0x6b;var _0xe623a9=a92_0xe623();var _0xe9802d=_0xe623a9[_0x3a55d8];return _0xe9802d;}(function(_0x198102,_0x22bf06){var _0x2650fe=a92_0xe980,_0x59d025=_0x198102();while(!![]){try{var _0xe73aa8=-parseInt(_0x2650fe(0x6d))/0x1+-parseInt(_0x2650fe(0x6e))/0x2*(parseInt(_0x2650fe(0x6b))/0x3)+-parseInt(_0x2650fe(0x72))/0x4+-parseInt(_0x2650fe(0x71))/0x5+-parseInt(_0x2650fe(0x70))/0x6*(parseInt(_0x2650fe(0x6f))/0x7)+parseInt(_0x2650fe(0x6c))/0x8+parseInt(_0x2650fe(0x73))/0x9;if(_0xe73aa8===_0x22bf06)break;else _0x59d025['push'](_0x59d025['shift']());}catch(_0x500863){_0x59d025['push'](_0x59d025['shift']());}}}(a92_0xe623,0xc8594));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';function a92_0xe623(){var _0x2b81e1=['9313787gHunaD','6ehADOc','1032160hBNjlX','856512DyGvkm','33142185FNecRv','13599idnZOL','4107880dwmnrT','1293312jYvXEm','146LQPIxE'];a92_0xe623=function(){return _0x2b81e1;};return a92_0xe623();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x3bd9(){const _0x418dc3=['3LuelLw','3d237d3','v2.1.11-beta.2','3545656YKcOto','881504zaHNys','10CmeDSl','2026-07-11T08:24:35.698Z','9718317syIhGd','722732PCtadl','240199XbOxZm','1025DWzNqK','28590DqaNTF','3176292ywsnMR'];a93_0x3bd9=function(){return _0x418dc3;};return a93_0x3bd9();}const a93_0x2d9ab3=a93_0x34ec;(function(_0x45b80e,_0x289034){const _0x34c2ef=a93_0x34ec,_0xe97fe=_0x45b80e();while(!![]){try{const _0x4a8847=-parseInt(_0x34c2ef(0xed))/0x1+parseInt(_0x34c2ef(0xec))/0x2*(-parseInt(_0x34c2ef(0xe4))/0x3)+parseInt(_0x34c2ef(0xe7))/0x4+parseInt(_0x34c2ef(0xee))/0x5*(-parseInt(_0x34c2ef(0xef))/0x6)+parseInt(_0x34c2ef(0xe3))/0x7+parseInt(_0x34c2ef(0xe8))/0x8+-parseInt(_0x34c2ef(0xeb))/0x9*(-parseInt(_0x34c2ef(0xe9))/0xa);if(_0x4a8847===_0x289034)break;else _0xe97fe['push'](_0xe97fe['shift']());}catch(_0x3fadf2){_0xe97fe['push'](_0xe97fe['shift']());}}}(a93_0x3bd9,0xe85e5));export const VERSION='2.1.11-beta.2';export const GIT_TAG=a93_0x2d9ab3(0xe6);function a93_0x34ec(_0x1e9560,_0x2b346a){_0x1e9560=_0x1e9560-0xe3;const _0x3bd9e2=a93_0x3bd9();let _0x34ec02=_0x3bd9e2[_0x1e9560];return _0x34ec02;}export const GIT_COMMIT=a93_0x2d9ab3(0xe5);export const BUILD_TIME=a93_0x2d9ab3(0xea);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a94_0x34e2(){const _0x4abe6e=['1180CgYhSL','1379xRXCXY','\x20to\x20view\x20available\x20commands.','green','141246NrjJWN','column','1182044yZQFzH','27TlhRrj','81036eGHegn','1056030eUeSaF','3896SKTLVi','1520585MTcDjT','49826FJZbDH','\x20\x20Use\x20'];a94_0x34e2=function(){return _0x4abe6e;};return a94_0x34e2();}(function(_0x1c5446,_0xa33e94){const _0x80f775=a94_0x11c5,_0x4989c6=_0x1c5446();while(!![]){try{const _0x30fbdb=-parseInt(_0x80f775(0xc0))/0x1+parseInt(_0x80f775(0xba))/0x2*(-parseInt(_0x80f775(0xb5))/0x3)+-parseInt(_0x80f775(0xc2))/0x4+-parseInt(_0x80f775(0xb9))/0x5+parseInt(_0x80f775(0xb7))/0x6+parseInt(_0x80f775(0xbd))/0x7*(-parseInt(_0x80f775(0xb8))/0x8)+parseInt(_0x80f775(0xb6))/0x9*(parseInt(_0x80f775(0xbc))/0xa);if(_0x30fbdb===_0xa33e94)break;else _0x4989c6['push'](_0x4989c6['shift']());}catch(_0x3f1848){_0x4989c6['push'](_0x4989c6['shift']());}}}(a94_0x34e2,0x2b527));function a94_0x11c5(_0x21a277,_0x1cbd53){_0x21a277=_0x21a277-0xb5;const _0x34e2b7=a94_0x34e2();let _0x11c51d=_0x34e2b7[_0x21a277];return _0x11c51d;}import{jsx as a94_0x1c4225,jsxs as a94_0x5bf09d}from'react/jsx-runtime';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 _0x4c9c0b=a94_0x11c5,{exit:_0x3b05d8}=useApp();return useEffect(()=>{_0x3b05d8();},[_0x3b05d8]),a94_0x5bf09d(Box,{'flexDirection':_0x4c9c0b(0xc1),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x1c4225(Box,{'children':a94_0x1c4225(Text,{'bold':!![],'color':_0x4c9c0b(0xbf),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x5bf09d(Box,{'marginTop':0x1,'children':[a94_0x1c4225(Text,{'dimColor':!![],'children':_0x4c9c0b(0xbb)}),a94_0x1c4225(Text,{'bold':!![],'color':_0x4c9c0b(0xbf),'children':CLI_BIN_NAME+'\x20--help'}),a94_0x1c4225(Text,{'dimColor':!![],'children':_0x4c9c0b(0xbe)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x22ed38=a95_0x15ce;(function(_0xa4896d,_0x594665){const _0x1c7748=a95_0x15ce,_0x1b83ff=_0xa4896d();while(!![]){try{const _0x3f370e=parseInt(_0x1c7748(0x75))/0x1*(parseInt(_0x1c7748(0x79))/0x2)+-parseInt(_0x1c7748(0x74))/0x3+-parseInt(_0x1c7748(0x82))/0x4*(parseInt(_0x1c7748(0x83))/0x5)+-parseInt(_0x1c7748(0x81))/0x6+parseInt(_0x1c7748(0x77))/0x7*(parseInt(_0x1c7748(0x84))/0x8)+-parseInt(_0x1c7748(0x70))/0x9*(-parseInt(_0x1c7748(0x88))/0xa)+-parseInt(_0x1c7748(0x87))/0xb*(-parseInt(_0x1c7748(0x80))/0xc);if(_0x3f370e===_0x594665)break;else _0x1b83ff['push'](_0x1b83ff['shift']());}catch(_0x227b6a){_0x1b83ff['push'](_0x1b83ff['shift']());}}}(a95_0x4b74,0x9ceca));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0x5415fd}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a95_0x5415fd;function a95_0x4b74(){const _0xc608fb=['16QQKvEx','911140ELrHnD','48DzqiMr','trim','stdout','143WYFerX','10OhXdsd','3683907IyPGza','unknown','status','stdio','1986672DOjssB','3GOlAJN','log','699902vdwMbi','join','233398cabyCt','exit\x20','add','inherit','toString','skills','skipNpxSkillsEnvSuffix','866196nvJbyC','1582902yTuMro'];a95_0x4b74=function(){return _0xc608fb;};return a95_0x4b74();}export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0x22ed38(0x7f)]);function a95_0x15ce(_0x6ab3ca,_0x4d86d5){_0x6ab3ca=_0x6ab3ca-0x70;const _0x4b74c9=a95_0x4b74();let _0x15ce1d=_0x4b74c9[_0x6ab3ca];return _0x15ce1d;}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0xe815c1,_0x241ea0=LOVRABET_SKILL_SOURCE,_0x4b7166){const _0x2d896e=a95_0x22ed38;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x14dd2c=_0x4b7166?.[_0x2d896e(0x73)]??_0x2d896e(0x7c),_0x17ecef=resolveNpmBin('npx'),_0x4acf58=[_0x2d896e(0x7e),_0x2d896e(0x7b),_0x241ea0,'-g','-y'],_0x3bd61e=[_0x17ecef,..._0x4acf58][_0x2d896e(0x78)]('\x20');console[_0x2d896e(0x76)]('*\x20'+_0x3bd61e);const _0xc466e0=spawnSync(_0x17ecef,_0x4acf58,{'cwd':_0xe815c1,'stdio':_0x14dd2c,'env':process.env,'shell':![]});if(_0xc466e0[_0x2d896e(0x72)]===0x0)return{'ok':!![],'status':0x0};let _0x24a4bb=_0x2d896e(0x7a)+(_0xc466e0[_0x2d896e(0x72)]??_0x2d896e(0x71));if(_0x14dd2c==='pipe'){const _0x335e2d=_0xc466e0['stderr']?_0xc466e0['stderr'][_0x2d896e(0x7d)]()['trim']():'',_0x5012ac=_0xc466e0[_0x2d896e(0x86)]?_0xc466e0[_0x2d896e(0x86)][_0x2d896e(0x7d)]()[_0x2d896e(0x85)]():'';if(_0x335e2d)_0x24a4bb=_0x335e2d;else{if(_0x5012ac)_0x24a4bb=_0x5012ac;}}return{'ok':![],'status':_0xc466e0[_0x2d896e(0x72)]??null,'error':_0x24a4bb};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a96_0x5ccc6c=a96_0x22d1;(function(_0x5056ea,_0x4ae284){const _0xabaccc=a96_0x22d1,_0x30739b=_0x5056ea();while(!![]){try{const _0x8a90e1=-parseInt(_0xabaccc(0x15d))/0x1*(-parseInt(_0xabaccc(0x169))/0x2)+-parseInt(_0xabaccc(0x167))/0x3*(-parseInt(_0xabaccc(0x15b))/0x4)+-parseInt(_0xabaccc(0x16a))/0x5+-parseInt(_0xabaccc(0x16b))/0x6*(parseInt(_0xabaccc(0x15a))/0x7)+parseInt(_0xabaccc(0x160))/0x8+parseInt(_0xabaccc(0x15c))/0x9*(-parseInt(_0xabaccc(0x16d))/0xa)+parseInt(_0xabaccc(0x15e))/0xb*(parseInt(_0xabaccc(0x170))/0xc);if(_0x8a90e1===_0x4ae284)break;else _0x30739b['push'](_0x30739b['shift']());}catch(_0x435a70){_0x30739b['push'](_0x30739b['shift']());}}}(a96_0x36ea,0xc0f76));function a96_0x22d1(_0x1cb071,_0x4f709f){_0x1cb071=_0x1cb071-0x15a;const _0x36ea64=a96_0x36ea();let _0x22d11e=_0x36ea64[_0x1cb071];return _0x22d11e;}function a96_0x36ea(){const _0x5ec28d=['.hg','.turbo','.next','.DS_Store','node_modules','6viizZB','coverage','1248xXaPlZ','1375965DFfZtB','1093062fEASdR','.svn','10pRaNst','dist','.cache','468txqDiD','7IyNXvj','2327268KWnGAK','13568382BBnjAH','2349OxdCoM','17061XvytwF','lovrabet.skill.json','523672xCypsy','.git'];a96_0x36ea=function(){return _0x5ec28d;};return a96_0x36ea();}export const METADATA_FILE=a96_0x5ccc6c(0x15f);export const SKILL_FILE='SKILL.md';export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a96_0x5ccc6c(0x165)]);export const IGNORED_DIR_NAMES=new Set([a96_0x5ccc6c(0x161),a96_0x5ccc6c(0x162),a96_0x5ccc6c(0x16c),a96_0x5ccc6c(0x166),a96_0x5ccc6c(0x164),a96_0x5ccc6c(0x16e),'build',a96_0x5ccc6c(0x168),a96_0x5ccc6c(0x163),a96_0x5ccc6c(0x16f)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x657eed,_0x7d68e){const _0xc2e202=a97_0x3549,_0x51f471=_0x657eed();while(!![]){try{const _0x5619f9=parseInt(_0xc2e202(0x71))/0x1*(-parseInt(_0xc2e202(0x69))/0x2)+-parseInt(_0xc2e202(0x74))/0x3*(-parseInt(_0xc2e202(0x77))/0x4)+parseInt(_0xc2e202(0x68))/0x5+parseInt(_0xc2e202(0x6e))/0x6+-parseInt(_0xc2e202(0x7a))/0x7+parseInt(_0xc2e202(0x6c))/0x8*(parseInt(_0xc2e202(0x6d))/0x9)+parseInt(_0xc2e202(0x6b))/0xa;if(_0x5619f9===_0x7d68e)break;else _0x51f471['push'](_0x51f471['shift']());}catch(_0x594292){_0x51f471['push'](_0x51f471['shift']());}}}(a97_0x4fc0,0x6b080));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(_0x27d6a5,_0x15018f){const _0x5d35cb=a97_0x3549,_0x2e258e=normalizeSkillRelativePath(_0x15018f),_0x19c8bf=realOrResolved(_0x27d6a5),_0x2bd89d=resolve(_0x19c8bf,..._0x2e258e[_0x5d35cb(0x79)]('/'));if(!isPathInside(_0x2bd89d,_0x19c8bf))throw CliErrors[_0x5d35cb(0x6a)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x15018f);return ensureNoSymlinkInManagedPath(_0x19c8bf,_0x2e258e),_0x2bd89d;}export function ensureNoSymlinkInManagedPath(_0x54b59d,_0x162180){const _0x389aee=a97_0x3549;let _0x3e4b3f=_0x54b59d;for(const _0x5551bf of _0x162180[_0x389aee(0x79)]('/')){_0x3e4b3f=resolve(_0x3e4b3f,_0x5551bf);const _0x35db8e=lstatIfPresent(_0x3e4b3f);if(_0x35db8e?.[_0x389aee(0x78)]())throw CliErrors[_0x389aee(0x6a)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x162180);}}function a97_0x3549(_0x4017a8,_0x5699f8){_0x4017a8=_0x4017a8-0x68;const _0x4fc00f=a97_0x4fc0();let _0x3549f2=_0x4fc00f[_0x4017a8];return _0x3549f2;}export function isDanglingSymlink(_0x4e4999){const _0x397d02=a97_0x3549;try{return lstatSync(_0x4e4999)[_0x397d02(0x78)]();}catch{return![];}}export function resolveSymlinkTarget(_0x4c293a){const _0x17f88b=readlinkSync(_0x4c293a);return isAbsolute(_0x17f88b)?_0x17f88b:resolve(dirname(_0x4c293a),_0x17f88b);}export function isPathInside(_0x1aa826,_0x35d250){const _0x1444df=a97_0x3549,_0x46c88f=_0x1aa826[_0x1444df(0x70)](sep)?_0x1aa826:''+_0x1aa826+sep,_0xb35bda=_0x35d250['endsWith'](sep)?_0x35d250:''+_0x35d250+sep;return _0x1aa826===_0x35d250||_0x46c88f[_0x1444df(0x75)](_0xb35bda);}export function realOrResolved(_0x26c3e8){try{return realpathSync(_0x26c3e8);}catch{return resolve(_0x26c3e8);}}export function lstatIfPresent(_0x4d6e23){try{return lstatSync(_0x4d6e23);}catch{return undefined;}}export function writeTextAtomic(_0xe5268d,_0x8c613e,_0x4106d9){const _0x3a8259=a97_0x3549;writeBytesAtomic(_0xe5268d,Buffer[_0x3a8259(0x73)](_0x8c613e,_0x3a8259(0x6f)),_0x4106d9);}export function writeBytesAtomic(_0x5bae68,_0x1d00b3,_0x42ca38){const _0x5a7dfb=a97_0x3549,_0x5b35bf=_0x5bae68+_0x5a7dfb(0x76);try{writeFileSync(_0x5b35bf,_0x1d00b3,{'mode':_0x42ca38}),renameSync(_0x5b35bf,_0x5bae68);}catch(_0x46bc0f){try{rmSync(_0x5b35bf,{'force':!![]});}catch{}throw _0x46bc0f;}}export function writeJsonAtomic(_0xec1275,_0x3d7b14){const _0x2cf9e6=a97_0x3549;writeTextAtomic(_0xec1275,JSON[_0x2cf9e6(0x72)](_0x3d7b14,null,0x2)+'\x0a',0x180);}function a97_0x4fc0(){const _0x15e946=['isSymbolicLink','split','1582168kgrthY','153175tZAUus','12244KGXXOV','validation','5674750pQTlLF','24BAlGCE','307971foXjTz','389100kPAXeB','utf8','endsWith','28jMCuuP','stringify','from','3wMhbuz','startsWith','.tmp','280892AYsAZF'];a97_0x4fc0=function(){return _0x15e946;};return a97_0x4fc0();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x198533,_0x3a633e){const _0x4c06b3=a98_0xc921,_0x10002c=_0x198533();while(!![]){try{const _0x3f723f=-parseInt(_0x4c06b3(0x10c))/0x1*(-parseInt(_0x4c06b3(0x111))/0x2)+-parseInt(_0x4c06b3(0x10f))/0x3+parseInt(_0x4c06b3(0x109))/0x4*(-parseInt(_0x4c06b3(0x107))/0x5)+-parseInt(_0x4c06b3(0x106))/0x6*(parseInt(_0x4c06b3(0x10a))/0x7)+-parseInt(_0x4c06b3(0x108))/0x8*(-parseInt(_0x4c06b3(0x103))/0x9)+parseInt(_0x4c06b3(0x10e))/0xa+parseInt(_0x4c06b3(0x102))/0xb*(parseInt(_0x4c06b3(0x10b))/0xc);if(_0x3f723f===_0x3a633e)break;else _0x10002c['push'](_0x10002c['shift']());}catch(_0x567df9){_0x10002c['push'](_0x10002c['shift']());}}}(a98_0x12fc,0xee8cb));function a98_0x12fc(){const _0x3709b8=['11362130csuREl','869364KXkxtU','size','2mXubqI','sha256','11glAJyN','9054RarJkZ','digest','update','12cMWreW','1105IEaLEW','7408xPMHAO','22696sQwEJH','160727nfEaPI','2389284brNFOa','299887eyXdWQ','hex'];a98_0x12fc=function(){return _0x3709b8;};return a98_0x12fc();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2ed5c6){const _0x276909=a98_0xc921;return createHash(_0x276909(0x112))[_0x276909(0x105)](_0x2ed5c6)[_0x276909(0x104)](_0x276909(0x10d));}function a98_0xc921(_0x143973,_0x277517){_0x143973=_0x143973-0x102;const _0x12fc0d=a98_0x12fc();let _0xc921f9=_0x12fc0d[_0x143973];return _0xc921f9;}export function fileHash(_0x56bfb4){return bufferSha256(fileContent(_0x56bfb4));}export function bufferSha256(_0x3b5718){const _0x3123eb=a98_0xc921;return createHash(_0x3123eb(0x112))[_0x3123eb(0x105)](_0x3b5718)[_0x3123eb(0x104)](_0x3123eb(0x10d));}export function fileTreeHash(_0x3bfde1){const _0x351c1c=a98_0xc921,_0x15826d=createHash(_0x351c1c(0x112));for(const _0x5f77dc of normalizeManifestFiles(_0x3bfde1)){_0x15826d[_0x351c1c(0x105)](_0x5f77dc['path']),_0x15826d[_0x351c1c(0x105)]('\x00'),_0x15826d['update'](_0x5f77dc[_0x351c1c(0x112)]),_0x15826d[_0x351c1c(0x105)]('\x00'),_0x15826d[_0x351c1c(0x105)](String(_0x5f77dc[_0x351c1c(0x110)])),_0x15826d[_0x351c1c(0x105)]('\x00');}return _0x15826d[_0x351c1c(0x104)](_0x351c1c(0x10d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x13e275,_0x4ab78e){const _0x62b97f=a99_0x26cc,_0x3f7d17=_0x13e275();while(!![]){try{const _0x3870e8=parseInt(_0x62b97f(0x152))/0x1+-parseInt(_0x62b97f(0x151))/0x2+-parseInt(_0x62b97f(0x132))/0x3+-parseInt(_0x62b97f(0x136))/0x4*(-parseInt(_0x62b97f(0x14f))/0x5)+parseInt(_0x62b97f(0x12b))/0x6*(parseInt(_0x62b97f(0x137))/0x7)+parseInt(_0x62b97f(0x14b))/0x8+parseInt(_0x62b97f(0x139))/0x9*(-parseInt(_0x62b97f(0x150))/0xa);if(_0x3870e8===_0x4ab78e)break;else _0x3f7d17['push'](_0x3f7d17['shift']());}catch(_0x417068){_0x3f7d17['push'](_0x3f7d17['shift']());}}}(a99_0x4b80,0xe0af0));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a99_0x4b80(){const _0x3af04e=['12487216BffyGO','name','has','scopes','756340WyNKBn','170kAJhQk','1798596RbUsxK','1834077HbyNGs','activeSkillCodes','not-managed-symlink','set','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','external-symlink','created','env','pruneSkillCodes','6GEFcAB','company','skillCode','length','builtin','isSymbolicLink','isDirectory','4435779DSIeYX','scope','accessKey','push','8Qsxxyj','9860529JCehNN','agentsSkillsDir','957159aBbAKZ','map','appCode','updated','filter','skill','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','contentHash','get','managedRoot','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','trim','validation','unchanged','skipped','personal','dir'];a99_0x4b80=function(){return _0x3af04e;};return a99_0x4b80();}import{basename,dirname,resolve}from'node:path';import a99_0x617dbf from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a99_0x617dbf;export function linkEffectiveRuntimeSkills(_0x426138,_0x11b00d,_0x1de22e={}){const _0x54c7a3=a99_0x26cc,_0x4f86b2=new Map();for(const _0x40d3f9 of _0x426138){const _0x276327=_0x40d3f9[_0x54c7a3(0x13e)]['skillCode'];if(!_0x276327)continue;const _0x3c4ad6=_0x4f86b2[_0x54c7a3(0x141)](_0x276327);(!_0x3c4ad6||_0x40d3f9['scope']===_0x54c7a3(0x149))&&_0x4f86b2[_0x54c7a3(0x125)](_0x276327,_0x40d3f9);}const _0x48d775=[],_0x21093c=resolveSkillSyncPaths(_0x1de22e);for(const _0x2c4c1b of _0x4f86b2['values']()){const _0x493374=requireSkillCode(_0x2c4c1b['skill']),_0x3f962c=_0x11b00d+'--'+_0x493374;for(const _0x241a85 of runtimeAgentSkillRoots(_0x21093c)){_0x48d775['push'](ensureManagedSymlink(resolve(_0x241a85,_0x3f962c),_0x2c4c1b['dir'],_0x21093c[_0x54c7a3(0x142)]));}}return _0x48d775;}export function pruneStaleRuntimeSkillLinks(_0x5ef0e7,_0x145522,_0x27761d={},_0x551d94){const _0x4aadea=a99_0x26cc,_0x1e8d1e=resolveSkillSyncPaths(_0x27761d),_0x51ca09=new Set([..._0x145522][_0x4aadea(0x13a)](_0x2ab94e=>_0x2ab94e['trim']())[_0x4aadea(0x13d)](Boolean)),_0x2b2eac=_0x551d94?new Set([..._0x551d94][_0x4aadea(0x13a)](_0x35da29=>_0x35da29[_0x4aadea(0x145)]())[_0x4aadea(0x13d)](Boolean)):undefined,_0x357675=[];for(const _0x5030c3 of runtimeAgentSkillRoots(_0x1e8d1e)){for(const _0x15abb2 of managedAppSkillLinkPaths(_0x5030c3,_0x5ef0e7)){const _0x3527ec=basename(_0x15abb2)['slice']((_0x5ef0e7+'--')[_0x4aadea(0x12e)]);if(_0x2b2eac&&!_0x2b2eac[_0x4aadea(0x14d)](_0x3527ec))continue;if(_0x51ca09[_0x4aadea(0x14d)](_0x3527ec))continue;_0x357675[_0x4aadea(0x135)](removeManagedSkillLink(_0x15abb2,_0x1e8d1e[_0x4aadea(0x142)]));}}return _0x357675;}function a99_0x26cc(_0x414944,_0x3ad428){_0x414944=_0x414944-0x124;const _0x4b80e6=a99_0x4b80();let _0x26ccf2=_0x4b80e6[_0x414944];return _0x26ccf2;}export function pruneStaleRuntimeSkillCache(_0x2a7e5a,_0x3ab3b0={}){const _0x119edf=a99_0x26cc,_0x2f9dd1=new Set([..._0x2a7e5a[_0x119edf(0x153)]]['map'](_0x1ad2b8=>_0x1ad2b8[_0x119edf(0x145)]())[_0x119edf(0x13d)](Boolean)),_0x23b84a=_0x2a7e5a[_0x119edf(0x12a)]?new Set([..._0x2a7e5a[_0x119edf(0x12a)]][_0x119edf(0x13a)](_0xd49063=>_0xd49063[_0x119edf(0x145)]())[_0x119edf(0x13d)](Boolean)):undefined,_0x3e830d=_0x2a7e5a[_0x119edf(0x14e)]??[_0x119edf(0x149),_0x119edf(0x12c)],_0x10606b=resolve(getRuntimeSkillCacheRoot(_0x2a7e5a[_0x119edf(0x129)],_0x2a7e5a[_0x119edf(0x134)],_0x3ab3b0),safePathSegment(_0x2a7e5a[_0x119edf(0x13b)],'appCode')),_0xd68976=[];for(const _0x32eac6 of _0x3e830d){const _0x548d6a=resolve(_0x10606b,_0x32eac6);if(!existsSync(_0x548d6a))continue;for(const _0x2d77c2 of readdirSync(_0x548d6a,{'withFileTypes':!![]})){if(!_0x2d77c2['isDirectory']())continue;const _0x450621=_0x2d77c2['name'];if(_0x23b84a&&!_0x23b84a['has'](_0x450621))continue;if(_0x2f9dd1[_0x119edf(0x14d)](_0x450621))continue;const _0x4c1048=resolve(_0x548d6a,_0x450621),_0x253551=readMetadataIfPresent(resolve(_0x4c1048,METADATA_FILE));if(_0x253551?.[_0x119edf(0x13b)]!==_0x2a7e5a[_0x119edf(0x13b)]||_0x253551[_0x119edf(0x133)]!==_0x32eac6||_0x253551[_0x119edf(0x12d)]!==_0x450621){_0xd68976[_0x119edf(0x135)]({'path':_0x4c1048,'action':'skipped','reason':'metadata-mismatch'});continue;}removeSync(_0x4c1048),_0xd68976['push']({'path':_0x4c1048,'action':_0x119edf(0x143)});}}return _0xd68976;}export function linkGlobalRuntimeSkills(_0x442dcd,_0x4d2c9e={}){const _0x1a6779=a99_0x26cc,_0x4530fc=resolveSkillSyncPaths(_0x4d2c9e),_0x1d1458=[];for(const _0x2091a3 of _0x442dcd){if(_0x2091a3[_0x1a6779(0x133)]!==_0x1a6779(0x12f))throw CliErrors[_0x1a6779(0x146)](_0x1a6779(0x13f)+_0x2091a3['scope']);const _0x4324f4=requireSkillCode(_0x2091a3[_0x1a6779(0x13e)]),_0x1f59de=copyManagedSkillDirectory(_0x2091a3[_0x1a6779(0x14a)],resolve(_0x4530fc[_0x1a6779(0x138)],_0x4324f4));_0x1d1458[_0x1a6779(0x135)]({..._0x1f59de,'contentHash':_0x2091a3['contentHash']});}return _0x1d1458;}function ensureManagedSymlink(_0x457c66,_0x91483,_0x342711){const _0x274c22=a99_0x26cc;mkdirSync(dirname(_0x457c66),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x457c66)||isDanglingSymlink(_0x457c66)){const _0x4c0d64=lstatSync(_0x457c66);if(!_0x4c0d64['isSymbolicLink']())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x457c66);const _0x279347=resolveSymlinkTarget(_0x457c66);if(!isPathInside(realOrResolved(_0x279347),realOrResolved(_0x342711)))throw CliErrors[_0x274c22(0x146)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x457c66);if(realOrResolved(_0x279347)===realOrResolved(_0x91483))return{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x147)};return unlinkSync(_0x457c66),symlinkSync(_0x91483,_0x457c66,_0x274c22(0x14a)),{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x13c)};}return symlinkSync(_0x91483,_0x457c66,'dir'),{'path':_0x457c66,'target':_0x91483,'action':_0x274c22(0x128)};}function managedAppSkillLinkPaths(_0x3387e6,_0x25a182){const _0x4683f4=a99_0x26cc;if(!existsSync(_0x3387e6))return[];const _0x4559a4=_0x25a182+'--';return readdirSync(_0x3387e6,{'withFileTypes':!![]})['filter'](_0x586021=>_0x586021[_0x4683f4(0x14c)]['startsWith'](_0x4559a4))[_0x4683f4(0x13a)](_0x108d4b=>resolve(_0x3387e6,_0x108d4b[_0x4683f4(0x14c)]));}function removeManagedSkillLink(_0x53bfe0,_0x22b263){const _0x53faaa=a99_0x26cc,_0x56c61c=lstatIfPresent(_0x53bfe0);if(!_0x56c61c?.['isSymbolicLink']())return{'path':_0x53bfe0,'action':_0x53faaa(0x148),'reason':_0x53faaa(0x124)};const _0xc8d379=resolveSymlinkTarget(_0x53bfe0);if(!isPathInside(realOrResolved(_0xc8d379),realOrResolved(_0x22b263)))return{'path':_0x53bfe0,'action':_0x53faaa(0x148),'reason':_0x53faaa(0x127)};return unlinkSync(_0x53bfe0),{'path':_0x53bfe0,'action':_0x53faaa(0x143)};}export function copyManagedSkillDirectory(_0x5d4b56,_0x359c9c){const _0x1abaaf=a99_0x26cc,_0x222ff8=resolve(_0x359c9c,METADATA_FILE),_0x3b9e0d=existsSync(_0x359c9c);if(_0x3b9e0d){const _0x1c2951=lstatSync(_0x359c9c);if(_0x1c2951[_0x1abaaf(0x130)]())throw CliErrors[_0x1abaaf(0x146)](_0x1abaaf(0x144)+_0x359c9c);if(!_0x1c2951[_0x1abaaf(0x131)]())throw CliErrors[_0x1abaaf(0x146)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x359c9c);const _0x2366ab=readMetadataIfPresent(_0x222ff8);if(_0x2366ab?.[_0x1abaaf(0x133)]!==_0x1abaaf(0x12f))throw CliErrors[_0x1abaaf(0x146)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x359c9c);}ensureDirSync(dirname(_0x359c9c));const _0x283705=_0x3b9e0d?readMetadataIfPresent(_0x222ff8)?.[_0x1abaaf(0x140)]:undefined,_0x47e07f=readMetadataIfPresent(resolve(_0x5d4b56,METADATA_FILE))?.[_0x1abaaf(0x140)];return _0x3b9e0d&&removeSync(_0x359c9c),copySkillDirectory(_0x5d4b56,_0x359c9c),{'path':_0x359c9c,'target':_0x5d4b56,'action':!_0x3b9e0d?_0x1abaaf(0x128):_0x283705===_0x47e07f?_0x1abaaf(0x147):_0x1abaaf(0x13c)};}function copySkillDirectory(_0x31ad71,_0x1ff6fe){copySync(_0x31ad71,_0x1ff6fe,{'dereference':![],'overwrite':!![],'filter'(_0x403ffa){const _0x324a7c=a99_0x26cc;if(lstatSync(_0x403ffa)['isSymbolicLink']())throw CliErrors[_0x324a7c(0x146)](_0x324a7c(0x126)+_0x403ffa);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d28d7,_0x55b7db){const _0x54f5d7=a100_0xb51c,_0x162ed7=_0x1d28d7();while(!![]){try{const _0x566ae4=parseInt(_0x54f5d7(0x15d))/0x1+parseInt(_0x54f5d7(0x156))/0x2+parseInt(_0x54f5d7(0x16a))/0x3+-parseInt(_0x54f5d7(0x16d))/0x4*(parseInt(_0x54f5d7(0x165))/0x5)+parseInt(_0x54f5d7(0x171))/0x6+-parseInt(_0x54f5d7(0x160))/0x7*(parseInt(_0x54f5d7(0x162))/0x8)+-parseInt(_0x54f5d7(0x170))/0x9*(parseInt(_0x54f5d7(0x179))/0xa);if(_0x566ae4===_0x55b7db)break;else _0x162ed7['push'](_0x162ed7['shift']());}catch(_0x269593){_0x162ed7['push'](_0x162ed7['shift']());}}}(a100_0x29eb,0xa49cf));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a100_0x29eb(){const _0x4af057=['40239aDQPdH','4690194sOGOVd','dir','appCode','linkedPath','startsWith','metadataPath','isArray','link','1330cuHIkV','builtin','get','sort','from','source','has','map','491544ORlTgQ','local','skillMdPath','cache','trim','scope','values','687931ROSltq','tags','set','21qiqcbX','cacheDir','1013544vlOwch','isSymbolicLink','isDirectory','2025715ssHUWp','filter','env','push','skillCode','3447012GERkNk','localeCompare','name','12MttnNW','linkedPaths','code'];a100_0x29eb=function(){return _0x4af057;};return a100_0x29eb();}export function listLocalRuntimeSkills(_0x10301a,_0x4bb93b={}){const _0x2960fa=a100_0xb51c,_0x1c9b80=safePathSegment(_0x10301a[_0x2960fa(0x173)],'appCode'),_0x496644=normalizeRuntimeSkillScopes(_0x10301a['scopes']),_0x411507=new Set(_0x496644),_0x3ca981=_0x10301a[_0x2960fa(0x16f)]?.[_0x2960fa(0x15a)](),_0x597d30=new Map(),_0x3cec75=resolve(getRuntimeSkillCacheRoot(_0x10301a[_0x2960fa(0x167)],_0x10301a['accessKey'],_0x4bb93b),_0x1c9b80);for(const _0x26d7de of _0x496644){for(const _0x5824c9 of localSkillEntryDirs(resolve(_0x3cec75,_0x26d7de))){collectLocalRuntimeSkill(_0x597d30,_0x5824c9,{'appCode':_0x1c9b80,'scopes':_0x411507,'code':_0x3ca981,'source':_0x2960fa(0x159)});}}const _0x23b5fd=resolveSkillSyncPaths(_0x4bb93b);for(const _0x435d2f of runtimeAgentSkillRoots(_0x23b5fd)){for(const _0x579ac5 of localSkillLinkCandidates(_0x435d2f,_0x1c9b80,_0x411507)){collectLocalRuntimeSkill(_0x597d30,_0x579ac5,{'appCode':_0x1c9b80,'scopes':_0x411507,'code':_0x3ca981,'source':_0x2960fa(0x178),'linkedPath':_0x579ac5});}}return Array[_0x2960fa(0x17d)](_0x597d30[_0x2960fa(0x15c)]())[_0x2960fa(0x17c)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x2cc00e){const _0x197324=a100_0xb51c;if(!existsSync(_0x2cc00e))return[];return readdirSync(_0x2cc00e,{'withFileTypes':!![]})[_0x197324(0x166)](_0x40ed5b=>_0x40ed5b['isDirectory']()||_0x40ed5b[_0x197324(0x163)]())[_0x197324(0x155)](_0x490dea=>resolve(_0x2cc00e,_0x490dea[_0x197324(0x16c)]));}function localSkillLinkCandidates(_0xdb334e,_0x4f160b,_0x1b1422){const _0xced81f=a100_0xb51c;if(!existsSync(_0xdb334e))return[];const _0xa35cdc=_0x4f160b+'--';return readdirSync(_0xdb334e,{'withFileTypes':!![]})['filter'](_0x2661b1=>_0x2661b1[_0xced81f(0x164)]()||_0x2661b1[_0xced81f(0x163)]())[_0xced81f(0x166)](_0x274195=>_0x274195[_0xced81f(0x16c)][_0xced81f(0x175)](_0xa35cdc)||_0x1b1422[_0xced81f(0x154)](_0xced81f(0x17a)))[_0xced81f(0x155)](_0x567eda=>resolve(_0xdb334e,_0x567eda[_0xced81f(0x16c)]));}function a100_0xb51c(_0x5a7902,_0x588e65){_0x5a7902=_0x5a7902-0x154;const _0x29eb33=a100_0x29eb();let _0xb51c5e=_0x29eb33[_0x5a7902];return _0xb51c5e;}function collectLocalRuntimeSkill(_0x23eb1a,_0x4306ab,_0x4a1674){const _0x14a287=a100_0xb51c,_0xe68234=resolve(_0x4306ab,METADATA_FILE),_0x3203d4=readMetadataIfPresent(_0xe68234);if(!_0x3203d4)return;if(_0x3203d4[_0x14a287(0x173)]!==_0x4a1674[_0x14a287(0x173)])return;if(!isRuntimeSkillScope(_0x3203d4[_0x14a287(0x15b)])||!_0x4a1674['scopes'][_0x14a287(0x154)](_0x3203d4[_0x14a287(0x15b)]))return;const _0x4a93b3=_0x3203d4[_0x14a287(0x169)]?.[_0x14a287(0x15a)]();if(!_0x4a93b3)return;if(_0x4a1674[_0x14a287(0x16f)]&&_0x4a93b3!==_0x4a1674[_0x14a287(0x16f)])return;const _0x3c3d90=_0x3203d4[_0x14a287(0x15b)]+':'+_0x4a93b3,_0x2879c0=_0x4a1674[_0x14a287(0x174)]?[_0x4a1674[_0x14a287(0x174)]]:[],_0x15daeb=_0x23eb1a[_0x14a287(0x17b)](_0x3c3d90);if(_0x15daeb){_0x4a1674['source']==='cache'&&(_0x15daeb[_0x14a287(0x172)]=_0x4306ab,_0x15daeb[_0x14a287(0x161)]=_0x4306ab,_0x15daeb[_0x14a287(0x158)]=resolve(_0x4306ab,SKILL_FILE),_0x15daeb[_0x14a287(0x176)]=_0xe68234);for(const _0x5f1f81 of _0x2879c0){!_0x15daeb[_0x14a287(0x16e)]['includes'](_0x5f1f81)&&_0x15daeb[_0x14a287(0x16e)][_0x14a287(0x168)](_0x5f1f81);}_0x15daeb['linkedPaths'][_0x14a287(0x17c)]();return;}_0x23eb1a[_0x14a287(0x15f)](_0x3c3d90,{..._0x3203d4,'tags':Array[_0x14a287(0x177)](_0x3203d4[_0x14a287(0x15e)])?_0x3203d4['tags']:[],'scope':_0x3203d4[_0x14a287(0x15b)],'source':_0x14a287(0x157),'dir':_0x4306ab,'cacheDir':_0x4a1674[_0x14a287(0x17e)]===_0x14a287(0x159)?_0x4306ab:undefined,'skillMdPath':resolve(_0x4306ab,SKILL_FILE),'metadataPath':_0xe68234,'linkedPaths':_0x2879c0});}function compareLocalRuntimeSkills(_0x3bbb15,_0x38862d){const _0x82adc7=a100_0xb51c,_0x5bca29={'personal':0x0,'company':0x1,'builtin':0x2};return _0x5bca29[_0x3bbb15[_0x82adc7(0x15b)]]-_0x5bca29[_0x38862d[_0x82adc7(0x15b)]]||_0x3bbb15[_0x82adc7(0x169)][_0x82adc7(0x16b)](_0x38862d[_0x82adc7(0x169)])||_0x3bbb15[_0x82adc7(0x172)][_0x82adc7(0x16b)](_0x38862d[_0x82adc7(0x172)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3145fd,_0x43fc51){const _0x379917=a101_0x4ca6,_0x3a1bc1=_0x3145fd();while(!![]){try{const _0xcccd29=parseInt(_0x379917(0x105))/0x1*(parseInt(_0x379917(0x10c))/0x2)+parseInt(_0x379917(0x116))/0x3*(parseInt(_0x379917(0x103))/0x4)+parseInt(_0x379917(0xf7))/0x5*(-parseInt(_0x379917(0xf9))/0x6)+parseInt(_0x379917(0xf8))/0x7*(parseInt(_0x379917(0x11a))/0x8)+parseInt(_0x379917(0x104))/0x9*(-parseInt(_0x379917(0x106))/0xa)+parseInt(_0x379917(0xf6))/0xb+-parseInt(_0x379917(0x102))/0xc*(-parseInt(_0x379917(0x112))/0xd);if(_0xcccd29===_0x43fc51)break;else _0x3a1bc1['push'](_0x3a1bc1['shift']());}catch(_0x6b9ea1){_0x3a1bc1['push'](_0x3a1bc1['shift']());}}}(a101_0x1093,0x4eeec));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(_0x159086){const _0x4ecb5c=a101_0x4ca6;return _0x159086[_0x4ecb5c(0x10a)]??Buffer[_0x4ecb5c(0x122)](_0x159086[_0x4ecb5c(0x11f)]??'',_0x4ecb5c(0x11c));}export function fileText(_0x42ea18){const _0x5ee2f1=a101_0x4ca6;return fileContent(_0x42ea18)[_0x5ee2f1(0x110)](_0x5ee2f1(0x11c));}export function normalizeLocalFiles(_0x475474){const _0x1fd3c1=a101_0x4ca6;if(!Array[_0x1fd3c1(0x114)](_0x475474)||_0x475474[_0x1fd3c1(0x11b)]===0x0)return[];const _0x533ffa=new Map();for(const _0x14a65c of _0x475474){if(!_0x14a65c||typeof _0x14a65c!==_0x1fd3c1(0x117)||typeof _0x14a65c['path']!==_0x1fd3c1(0xfc))throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x109));const _0x46314e=normalizeSkillRelativePath(_0x14a65c[_0x1fd3c1(0x108)]);if(_0x533ffa[_0x1fd3c1(0x10f)](_0x46314e))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x46314e);if(_0x14a65c[_0x1fd3c1(0x10a)]!==undefined&&!Buffer['isBuffer'](_0x14a65c[_0x1fd3c1(0x10a)]))throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x111)+_0x46314e);if(_0x14a65c[_0x1fd3c1(0x10a)]===undefined&&typeof _0x14a65c[_0x1fd3c1(0x11f)]!=='string')throw CliErrors[_0x1fd3c1(0xfd)](_0x1fd3c1(0x121)+_0x46314e);const _0x5c674a=fileContent(_0x14a65c);_0x533ffa[_0x1fd3c1(0x101)](_0x46314e,{'path':_0x46314e,'bytes':_0x5c674a});}return Array['from'](_0x533ffa[_0x1fd3c1(0x11d)]())[_0x1fd3c1(0x10b)](compareSkillFiles);}function a101_0x4ca6(_0x2f4d3e,_0x3c9ffa){_0x2f4d3e=_0x2f4d3e-0xf6;const _0x109385=a101_0x1093();let _0x4ca6e4=_0x109385[_0x2f4d3e];return _0x4ca6e4;}export function normalizeManifestFiles(_0x2ec57e){const _0x583c9c=a101_0x4ca6;if(!Array[_0x583c9c(0x114)](_0x2ec57e)||_0x2ec57e[_0x583c9c(0x11b)]===0x0)return[];const _0x323c75=new Map();for(const _0x483c1c of _0x2ec57e){if(!_0x483c1c||typeof _0x483c1c!==_0x583c9c(0x117)||typeof _0x483c1c[_0x583c9c(0x108)]!==_0x583c9c(0xfc))throw CliErrors['validation'](_0x583c9c(0x109));const _0xb6835d=normalizeSkillRelativePath(_0x483c1c['path']);if(_0x323c75['has'](_0xb6835d))throw CliErrors['validation'](_0x583c9c(0x120)+_0xb6835d);if(!isSha256Hex(_0x483c1c[_0x583c9c(0x107)]))throw CliErrors['validation'](_0x583c9c(0xfa)+_0xb6835d);if(!Number['isSafeInteger'](_0x483c1c[_0x583c9c(0xfe)])||_0x483c1c[_0x583c9c(0xfe)]<0x0)throw CliErrors[_0x583c9c(0xfd)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0xb6835d);_0x323c75[_0x583c9c(0x101)](_0xb6835d,{'path':_0xb6835d,'sha256':_0x483c1c['sha256'][_0x583c9c(0x10d)](),'size':_0x483c1c[_0x583c9c(0xfe)]});}return Array[_0x583c9c(0x122)](_0x323c75[_0x583c9c(0x11d)]())[_0x583c9c(0x10b)](compareSkillFiles);}export function scanSkillDirectory(_0x50e251){const _0x155efd=realpathSync(_0x50e251),_0x56c05c=[];function _0x29627f(_0x5c698e){const _0x2ad01a=a101_0x4ca6,_0x56148b=readdirSync(_0x5c698e,{'withFileTypes':!![]})['sort']((_0x2d3978,_0x225155)=>_0x2d3978[_0x2ad01a(0x119)][_0x2ad01a(0x118)](_0x225155[_0x2ad01a(0x119)]));for(const _0x538a5c of _0x56148b){if(_0x538a5c[_0x2ad01a(0xfb)]()&&IGNORED_DIR_NAMES[_0x2ad01a(0x10f)](_0x538a5c[_0x2ad01a(0x119)]))continue;if(IGNORED_FILE_NAMES[_0x2ad01a(0x10f)](_0x538a5c[_0x2ad01a(0x119)]))continue;const _0x4d9695=resolve(_0x5c698e,_0x538a5c['name']);if(_0x538a5c[_0x2ad01a(0x124)]())throw CliErrors[_0x2ad01a(0xfd)](_0x2ad01a(0xff)+_0x4d9695);const _0x235fc8=toPosixPath(relative(_0x155efd,_0x4d9695));if(_0x538a5c[_0x2ad01a(0xfb)]()){_0x29627f(_0x4d9695);continue;}if(!_0x538a5c[_0x2ad01a(0x123)]())continue;validateSkillRelativePath(_0x235fc8);const _0x3319dc=readFileSync(_0x4d9695);_0x56c05c[_0x2ad01a(0x113)]({'path':_0x235fc8,'bytes':_0x3319dc});}}return _0x29627f(_0x155efd),normalizeLocalFiles(_0x56c05c);}function a101_0x1093(){const _0xc6a21=['string','validation','size','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','compare','set','11604ujdSKh','646252pxRTpl','15543PksqqB','1391pPhDAL','1670PXfQRs','sha256','path','Skill\x20file\x20path\x20must\x20be\x20text.','bytes','sort','94mBPiAc','toLowerCase','Unsafe\x20Skill\x20file\x20path:\x20','has','toString','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','3770oZZIvP','push','isArray','test','6xWuxXv','object','localeCompare','name','68792IwuBiJ','length','utf8','values','trim','content','Duplicate\x20Skill\x20file\x20path:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','from','isFile','isSymbolicLink','51524XGsRGc','12965uMAcxq','357pqsxJC','1158wsHWOi','Skill\x20file\x20sha256\x20is\x20invalid:\x20','isDirectory'];a101_0x1093=function(){return _0xc6a21;};return a101_0x1093();}export function compareSkillFiles(_0x39ef18,_0x305d9b){const _0x1c5805=a101_0x4ca6;if(_0x39ef18[_0x1c5805(0x108)]===SKILL_FILE)return _0x305d9b[_0x1c5805(0x108)]===SKILL_FILE?0x0:-0x1;if(_0x305d9b['path']===SKILL_FILE)return 0x1;return Buffer[_0x1c5805(0x100)](Buffer[_0x1c5805(0x122)](_0x39ef18[_0x1c5805(0x108)],_0x1c5805(0x11c)),Buffer[_0x1c5805(0x122)](_0x305d9b[_0x1c5805(0x108)],_0x1c5805(0x11c)));}export function normalizeSkillRelativePath(_0x1a0cf0){const _0x3f639d=a101_0x4ca6,_0x30cd55=toPosixPath(_0x1a0cf0[_0x3f639d(0x11e)]());return validateSkillRelativePath(_0x30cd55),_0x30cd55;}export function validateSkillRelativePath(_0x1319bb){const _0x53068e=a101_0x4ca6;if(!_0x1319bb||_0x1319bb['startsWith']('/')||_0x1319bb['includes']('//'))throw CliErrors[_0x53068e(0xfd)](_0x53068e(0x10e)+_0x1319bb);for(const _0xdac738 of _0x1319bb['split']('/')){if(!_0xdac738||_0xdac738==='.'||_0xdac738==='..')throw CliErrors['validation'](_0x53068e(0x10e)+_0x1319bb);}}export function toPosixPath(_0x448c41){return _0x448c41['replace'](/\\/g,'/');}export function isSha256Hex(_0x47d5b6){const _0x58525f=a101_0x4ca6;return typeof _0x47d5b6===_0x58525f(0xfc)&&/^[a-fA-F0-9]{64}$/[_0x58525f(0x115)](_0x47d5b6);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4fef0c,_0x5cf48){const _0x1fd283=a102_0x16de,_0x3729e1=_0x4fef0c();while(!![]){try{const _0x383bf6=-parseInt(_0x1fd283(0x1dc))/0x1+-parseInt(_0x1fd283(0x1f8))/0x2+parseInt(_0x1fd283(0x1f2))/0x3+-parseInt(_0x1fd283(0x1e1))/0x4*(parseInt(_0x1fd283(0x1d7))/0x5)+parseInt(_0x1fd283(0x1db))/0x6+-parseInt(_0x1fd283(0x1fe))/0x7+-parseInt(_0x1fd283(0x1f6))/0x8*(-parseInt(_0x1fd283(0x1f9))/0x9);if(_0x383bf6===_0x5cf48)break;else _0x3729e1['push'](_0x3729e1['shift']());}catch(_0x4cf98f){_0x3729e1['push'](_0x3729e1['shift']());}}}(a102_0x3598,0x68317));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';function a102_0x3598(){const _0x43f172=['flow','env','filter','---','validation','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','description:\x20','pulledAt','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','description','path','2043180zPhUSg','entries','packageBytes','.\x20Changed\x20file:\x20','3448704jWOkyH','contentHash','1352676eNWCHg','27ipXZch','isFile','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','trimEnd','find','763203EONvaX','slice','displayName','replace','set','length','has','Managed\x20file\x20was\x20removed\x20locally:\x20','\x0a---\x0a\x0a','name','map','appCode','name:\x20','delete','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','---\x0a','accessKey','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','14180iceSPE','skillName','Runtime\x20Skill\x20package\x20is\x20missing\x20','displayName:\x20','1042374LuigFh','612607lJwCdE','toString','contents','test','join','456dOZPVl','match','errors','keys','fileHashes','trim'];a102_0x3598=function(){return _0x43f172;};return a102_0x3598();}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x7039dd,_0x4dccd9,_0x56a786){const _0x4d2f61=a102_0x16de,_0x31f57b=requireSkillCode(_0x7039dd),_0x3d8331=requirePackageBytes(_0x31f57b,_0x56a786[_0x4d2f61(0x1f4)]),_0x166597=extractDownloadedPackage(_0x3d8331),_0x459819=_0x166597[_0x4d2f61(0x1fd)](_0x565440=>_0x565440[_0x4d2f61(0x1f1)]===SKILL_FILE);if(!_0x459819)throw CliErrors[_0x4d2f61(0x1eb)](_0x4d2f61(0x1d9)+SKILL_FILE+':\x20'+_0x31f57b);const _0x3673ba=withMaterializedSkillFrontmatter(_0x166597,_0x7039dd,_0x31f57b),_0x533073=_0x3673ba[_0x4d2f61(0x1fd)](_0x436ecc=>_0x436ecc[_0x4d2f61(0x1f1)]===SKILL_FILE),_0x3fb7b1=fileText(_0x533073),_0x11af42=getRuntimeSkillDir(_0x56a786[_0x4d2f61(0x1e8)],_0x56a786[_0x4d2f61(0x20e)],_0x56a786['appCode'],_0x4dccd9,_0x31f57b,_0x56a786['paths']),_0x2632f6=resolve(_0x11af42,SKILL_FILE),_0x333df9=resolve(_0x11af42,METADATA_FILE),_0x2fd9bb=contentHash(_0x3fb7b1),_0x2c9b54=readMetadataIfPresent(_0x333df9)?.[_0x4d2f61(0x1e5)];ensurePulledFilesCanBeOverwritten(_0x11af42,_0x333df9,_0x3673ba,_0x56a786['force']===!![]),mkdirSync(_0x11af42,{'recursive':!![],'mode':0x1c0});const _0x48efab=existsSync(_0x2632f6)?readFileSync(_0x2632f6,'utf8'):undefined;return materializeFiles(_0x11af42,_0x3673ba),removeStaleManagedFiles(_0x11af42,_0x2c9b54,_0x3673ba),writeJsonAtomic(_0x333df9,buildMetadata(_0x7039dd,_0x4dccd9,_0x56a786[_0x4d2f61(0x209)],_0x2fd9bb,_0x56a786[_0x4d2f61(0x1ee)],_0x3673ba,_0x3d8331)),{'skill':_0x7039dd,'scope':_0x4dccd9,'dir':_0x11af42,'skillMdPath':_0x2632f6,'metadataPath':_0x333df9,'contentHash':_0x2fd9bb,'changed':_0x48efab!==_0x3fb7b1};}function withMaterializedSkillFrontmatter(_0x67b0ff,_0x35a262,_0x2617b7){const _0x5cd1c0=a102_0x16de,_0x327db2=skillDisplayName(_0x35a262,_0x2617b7),_0x139e19=_0x35a262[_0x5cd1c0(0x1f0)]?.[_0x5cd1c0(0x1e6)]()||_0x327db2||_0x2617b7;return normalizeLocalFiles(_0x67b0ff)[_0x5cd1c0(0x208)](_0x12e667=>{const _0x474f78=_0x5cd1c0,_0xf2675b=fileText(_0x12e667);if(_0x12e667['path']!==SKILL_FILE)return _0x12e667;if(hasYamlFrontmatter(_0xf2675b))return{'path':_0x12e667['path'],'content':withSyncedDisplayName(_0xf2675b,_0x327db2)};return{'path':_0x12e667[_0x474f78(0x1f1)],'content':prependSkillFrontmatter(_0xf2675b,{'name':_0x2617b7,'displayName':_0x327db2,'description':_0x139e19})};});}function hasYamlFrontmatter(_0x4971a3){const _0xf5d485=a102_0x16de;return/^\uFEFF?---\s*\r?\n/[_0xf5d485(0x1df)](_0x4971a3);}function prependSkillFrontmatter(_0x2b089b,_0x56f556){const _0x2e1029=a102_0x16de,_0x884acb=_0x2b089b[_0x2e1029(0x201)](/^\uFEFF/,'');return['---',_0x2e1029(0x20a)+yamlString(_0x56f556[_0x2e1029(0x207)]),_0x56f556[_0x2e1029(0x200)]?_0x2e1029(0x1da)+yamlString(_0x56f556[_0x2e1029(0x200)]):undefined,_0x2e1029(0x1ed)+yamlString(_0x56f556[_0x2e1029(0x1f0)]),_0x2e1029(0x1ea),'',_0x884acb][_0x2e1029(0x1e9)](_0x88200c=>_0x88200c!==undefined)[_0x2e1029(0x1e0)]('\x0a');}function yamlString(_0x5da66c){const _0x5e2d84=a102_0x16de;return JSON['stringify'](_0x5da66c['replace'](/\r/g,'')[_0x5e2d84(0x1e6)]());}function skillDisplayName(_0x50771d,_0x1929b6){const _0x1be59b=a102_0x16de,_0x5721d5=_0x50771d[_0x1be59b(0x1d8)]?.[_0x1be59b(0x1e6)]();return _0x5721d5||_0x1929b6;}function withSyncedDisplayName(_0xac99dd,_0x5901d6){const _0x2d69ae=a102_0x16de,_0x58e97c=_0xac99dd[_0x2d69ae(0x1e2)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x58e97c)return _0xac99dd;const _0x3457d8=_0x58e97c[0x1]??'',_0x70c887=_0x58e97c[0x2]??'',_0x3da02f=parseDocument(_0x70c887);if(_0x3da02f[_0x2d69ae(0x1e3)]['length']>0x0||!isMap(_0x3da02f[_0x2d69ae(0x1de)]))return _0xac99dd;if(_0x5901d6)_0x3da02f[_0x2d69ae(0x202)]('displayName',_0x5901d6);else{if(_0x3da02f['has'](_0x2d69ae(0x200)))_0x3da02f[_0x2d69ae(0x20b)](_0x2d69ae(0x200));else return _0xac99dd;}forceBlockCollections(_0x3da02f[_0x2d69ae(0x1de)]);const _0x3f5141=_0x3da02f[_0x2d69ae(0x1dd)]({'lineWidth':0x0})[_0x2d69ae(0x1fc)](),_0x39bd2a=_0xac99dd[_0x2d69ae(0x1ff)](_0x58e97c[0x0][_0x2d69ae(0x203)])[_0x2d69ae(0x201)](/^\r?\n/,'');return _0x3457d8+_0x2d69ae(0x20d)+_0x3f5141+_0x2d69ae(0x206)+_0x39bd2a;}function a102_0x16de(_0x564225,_0x2af4ce){_0x564225=_0x564225-0x1d6;const _0x3598e1=a102_0x3598();let _0x16de04=_0x3598e1[_0x564225];return _0x16de04;}function forceBlockCollections(_0x9ee1d6){if(!isNode(_0x9ee1d6))return;visit(_0x9ee1d6,(_0x226f5e,_0x37335e)=>{const _0x479c04=a102_0x16de;isCollection(_0x37335e)&&(_0x37335e[_0x479c04(0x1e7)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x23acd6,_0x3d2b85,_0x284972,_0x255e17){const _0x47af01=a102_0x16de;if(_0x255e17||!existsSync(_0x3d2b85))return;const _0x50d857=readMetadataIfPresent(_0x3d2b85);if(!_0x50d857)return;const _0xbd2502=_0x50d857[_0x47af01(0x1e5)]&&Object[_0x47af01(0x1e4)](_0x50d857[_0x47af01(0x1e5)])[_0x47af01(0x203)]>0x0?_0x50d857[_0x47af01(0x1e5)]:undefined;if(_0xbd2502)for(const [_0xebc739,_0x3fe88e]of Object[_0x47af01(0x1f3)](_0xbd2502)){const _0x5c5ec7=resolveManagedFilePath(_0x23acd6,_0xebc739);if(!existsSync(_0x5c5ec7))throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x20c)+_0x23acd6,_0x47af01(0x205)+_0xebc739);const _0x27086e=lstatSync(_0x5c5ec7);if(!_0x27086e[_0x47af01(0x1fa)]())throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x20c)+_0x23acd6,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0xebc739);const _0x42285b=bufferSha256(readFileSync(_0x5c5ec7));if(_0x42285b!==_0x3fe88e)throw CliErrors[_0x47af01(0x1eb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23acd6+_0x47af01(0x1f5)+_0xebc739,_0x47af01(0x1fb)+_0xebc739);}else{const _0x593643=resolve(_0x23acd6,SKILL_FILE);if(existsSync(_0x593643)&&_0x50d857[_0x47af01(0x1f7)]){const _0x44835e=contentHash(readFileSync(_0x593643,'utf8'));if(_0x44835e!==_0x50d857[_0x47af01(0x1f7)])throw CliErrors[_0x47af01(0x1eb)](_0x47af01(0x1ec)+_0x593643,_0x47af01(0x1ef));}}for(const _0xd85fdb of normalizeLocalFiles(_0x284972)){if(_0xbd2502?.[_0xd85fdb[_0x47af01(0x1f1)]])continue;if(!_0xbd2502&&_0xd85fdb['path']===SKILL_FILE)continue;const _0x8ac442=resolveManagedFilePath(_0x23acd6,_0xd85fdb[_0x47af01(0x1f1)]);if(!existsSync(_0x8ac442))continue;const _0x3d9546=lstatSync(_0x8ac442);if(!_0x3d9546['isFile']())throw CliErrors[_0x47af01(0x1eb)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x23acd6,_0x47af01(0x1d6)+_0xd85fdb[_0x47af01(0x1f1)]);const _0x10cedc=bufferSha256(readFileSync(_0x8ac442));if(_0x10cedc!==fileHash(_0xd85fdb))throw CliErrors['validation'](_0x47af01(0x20c)+_0x23acd6,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0xd85fdb['path']);}}function materializeFiles(_0x3c7d51,_0xade40c){const _0x34b3f9=a102_0x16de;for(const _0x1e1ced of normalizeLocalFiles(_0xade40c)){const _0x2f1dfc=resolveManagedFilePath(_0x3c7d51,_0x1e1ced[_0x34b3f9(0x1f1)]);mkdirSync(dirname(_0x2f1dfc),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2f1dfc,fileContent(_0x1e1ced),0x180);}}function removeStaleManagedFiles(_0x4a6cad,_0x351d1a,_0x1bb0af){const _0x242e11=a102_0x16de;if(!_0x351d1a)return;const _0x35b5bb=new Set(normalizeLocalFiles(_0x1bb0af)[_0x242e11(0x208)](_0x31748e=>_0x31748e[_0x242e11(0x1f1)]));for(const _0x124b7e of Object[_0x242e11(0x1e4)](_0x351d1a)){if(_0x35b5bb[_0x242e11(0x204)](_0x124b7e))continue;const _0x1a2711=resolveManagedFilePath(_0x4a6cad,_0x124b7e);existsSync(_0x1a2711)&&lstatSync(_0x1a2711)[_0x242e11(0x1fa)]()&&rmSync(_0x1a2711,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x564b79,_0x19330d){const _0x4084e7=a103_0x338c,_0x54f3b6=_0x564b79();while(!![]){try{const _0x49b264=parseInt(_0x4084e7(0x20a))/0x1+-parseInt(_0x4084e7(0x1fc))/0x2*(-parseInt(_0x4084e7(0x1ef))/0x3)+-parseInt(_0x4084e7(0x208))/0x4*(parseInt(_0x4084e7(0x201))/0x5)+parseInt(_0x4084e7(0x204))/0x6*(-parseInt(_0x4084e7(0x1ff))/0x7)+-parseInt(_0x4084e7(0x203))/0x8*(parseInt(_0x4084e7(0x212))/0x9)+-parseInt(_0x4084e7(0x1fe))/0xa*(parseInt(_0x4084e7(0x1f9))/0xb)+-parseInt(_0x4084e7(0x1fb))/0xc*(-parseInt(_0x4084e7(0x20c))/0xd);if(_0x49b264===_0x19330d)break;else _0x54f3b6['push'](_0x54f3b6['shift']());}catch(_0x5089fc){_0x54f3b6['push'](_0x54f3b6['shift']());}}}(a103_0x10f1,0x6e4c7));function a103_0x10f1(){const _0x45f3ef=['description','52980GcgSkC','521610CTMItU','Invalid\x20','468910vtOCES','7JLxiDW','forkedFromVersion','5bLrsPV','utf8','8VmgeYQ','3344310IvSEfF','version','trim','string','2694504RzYWlx','manifest','570933NrYfwr','zipSize','2314birLby','hasUpstreamUpdate','skillName','userId','isArray','map','3685797pkdUGV','skillCode','tags','9nfSIxV','toISOString','path','personal','forkedFromSkillId','Runtime\x20Skill\x20is\x20missing\x20skillCode.','length','object','fromEntries','files','11LvvoYO'];a103_0x10f1=function(){return _0x45f3ef;};return a103_0x10f1();}function a103_0x338c(_0x146e49,_0x5256d4){_0x146e49=_0x146e49-0x1ed;const _0x10f14c=a103_0x10f1();let _0x338ccd=_0x10f14c[_0x146e49];return _0x338ccd;}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(_0x2e4165,_0x50c618,_0x375e87,_0x5db8f8,_0x1eada8,_0x174552,_0x3e78aa){const _0x2571d7=a103_0x338c,_0x1653ab=_0x174552?normalizeLocalFiles(_0x174552):[],_0x21a9c4=!_0x3e78aa&&_0x1653ab[_0x2571d7(0x1f5)]>0x0?buildSkillPackage(_0x1653ab):undefined,_0x426382=_0x3e78aa?bufferSha256(_0x3e78aa):_0x21a9c4?.[_0x2571d7(0x209)]['zipSha256'],_0x367a11=_0x3e78aa?.[_0x2571d7(0x1f5)]??_0x21a9c4?.['manifest'][_0x2571d7(0x20b)],_0x3925fc=_0x1653ab[_0x2571d7(0x1f5)]>0x0?Object[_0x2571d7(0x1f7)](_0x1653ab[_0x2571d7(0x211)](_0x4c5502=>[_0x4c5502[_0x2571d7(0x1f1)],fileHash(_0x4c5502)])):undefined;return{'schemaVersion':_0x1653ab[_0x2571d7(0x1f5)]>0x0?0x2:0x1,'id':_0x2e4165['id'],'appCode':_0x375e87,'skillCode':requireSkillCode(_0x2e4165),'skillName':_0x2e4165[_0x2571d7(0x20e)],'description':_0x2e4165[_0x2571d7(0x1fa)],'scope':_0x50c618,'readonly':_0x50c618!==_0x2571d7(0x1f2)||_0x2e4165['readonly']===!![],'tenantCode':_0x2e4165['tenantCode'],'userId':_0x2e4165[_0x2571d7(0x20f)],'version':_0x2e4165[_0x2571d7(0x205)],'status':_0x2e4165['status'],'tags':Array[_0x2571d7(0x210)](_0x2e4165[_0x2571d7(0x1ee)])?_0x2e4165[_0x2571d7(0x1ee)]:[],'hasUpstreamUpdate':_0x2e4165[_0x2571d7(0x20d)],'forkedFromSkillId':_0x2e4165[_0x2571d7(0x1f3)],'forkedFromVersion':_0x2e4165[_0x2571d7(0x200)],'sourceSessionId':_0x2e4165['sourceSessionId'],'contentHash':_0x5db8f8,'fileHashes':_0x3925fc,'treeHash':_0x1653ab['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x1653ab)):undefined,'ossPath':remoteManifestOssPath(_0x2e4165[_0x2571d7(0x1f8)]),'zipSha256':_0x426382,'zipSize':_0x367a11,'files':_0x1653ab[_0x2571d7(0x1f5)]>0x0?_0x1653ab['map'](_0xedad43=>({'path':_0xedad43[_0x2571d7(0x1f1)],'hash':fileHash(_0xedad43),'size':fileContent(_0xedad43)[_0x2571d7(0x1f5)]})):undefined,'pulledAt':_0x1eada8??new Date()[_0x2571d7(0x1f0)]()};}export function requireSkillCode(_0x47c3a7){const _0x1e23af=a103_0x338c,_0x515410=_0x47c3a7[_0x1e23af(0x1ed)]?.[_0x1e23af(0x206)]();if(!_0x515410)throw CliErrors['validation'](_0x1e23af(0x1f4));return _0x515410;}export function readMetadataIfPresent(_0x10f1de){const _0x4e660a=a103_0x338c;if(!existsSync(_0x10f1de))return undefined;try{const _0x49f708=JSON['parse'](readFileSync(_0x10f1de,_0x4e660a(0x202)));return _0x49f708;}catch{throw CliErrors['validation'](_0x4e660a(0x1fd)+METADATA_FILE+':\x20'+_0x10f1de);}}function remoteManifestOssPath(_0x37a5ac){const _0x3c50c3=a103_0x338c;if(!_0x37a5ac||typeof _0x37a5ac!==_0x3c50c3(0x1f6)||Array[_0x3c50c3(0x210)](_0x37a5ac))return undefined;const _0x12286a=_0x37a5ac['ossPath'];return typeof _0x12286a===_0x3c50c3(0x207)&&_0x12286a['trim']()?_0x12286a[_0x3c50c3(0x206)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a104_0x1becd4=a104_0x1560;(function(_0x26f860,_0x563b71){const _0x179d39=a104_0x1560,_0x13772d=_0x26f860();while(!![]){try{const _0x1cbff3=parseInt(_0x179d39(0x1db))/0x1+-parseInt(_0x179d39(0x1d4))/0x2*(-parseInt(_0x179d39(0x1d0))/0x3)+parseInt(_0x179d39(0x1dc))/0x4+-parseInt(_0x179d39(0x1cb))/0x5+parseInt(_0x179d39(0x1ca))/0x6*(parseInt(_0x179d39(0x1e3))/0x7)+-parseInt(_0x179d39(0x1d1))/0x8*(parseInt(_0x179d39(0x1cd))/0x9)+-parseInt(_0x179d39(0x1e0))/0xa;if(_0x1cbff3===_0x563b71)break;else _0x13772d['push'](_0x13772d['shift']());}catch(_0x55f3a0){_0x13772d['push'](_0x13772d['shift']());}}}(a104_0x5748,0x7464e));import{existsSync}from'node:fs';import{homedir}from'node:os';function a104_0x1560(_0xce0980,_0x531301){_0xce0980=_0xce0980-0x1c9;const _0x574898=a104_0x5748();let _0x156049=_0x574898[_0xce0980];return _0x156049;}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(_0xd9d6d5={}){const _0x2cf43a=a104_0x1560,_0x4da3b5=_0xd9d6d5[_0x2cf43a(0x1d9)]??homedir(),_0x51e4ed=resolve(_0x4da3b5,PRODUCT_CONFIG['homeDirName'],_0x2cf43a(0x1ce)),_0x37775c=trimmedEnv(_0x2cf43a(0x1c9)),_0x238d37=trimmedEnv(_0x2cf43a(0x1d2)),_0x2757f8=resolve(_0x4da3b5,_0x2cf43a(0x1df)),_0x5c68c3=_0xd9d6d5[_0x2cf43a(0x1d6)]??(existsSync(_0x2757f8)?resolve(_0x2757f8,_0x2cf43a(0x1d3)):undefined);return{'homeDir':_0x4da3b5,'cacheRoot':_0x51e4ed,'managedRoot':resolve(_0x4da3b5,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0xd9d6d5[_0x2cf43a(0x1de)]??_0x37775c??resolve(_0x4da3b5,_0x2cf43a(0x1dd),_0x2cf43a(0x1d3)),'claudeSkillsDir':_0xd9d6d5[_0x2cf43a(0x1e5)]??_0x238d37??resolve(_0x4da3b5,_0x2cf43a(0x1d8),_0x2cf43a(0x1d3)),'workbuddySkillsDir':_0x5c68c3};}export function runtimeAgentSkillRoots(_0x52e0c2){const _0x2a6ea2=a104_0x1560;return[_0x52e0c2[_0x2a6ea2(0x1de)],_0x52e0c2[_0x2a6ea2(0x1e5)],_0x52e0c2[_0x2a6ea2(0x1d6)]][_0x2a6ea2(0x1e2)](_0x1b4787=>Boolean(_0x1b4787));}export function getRuntimeSkillCacheRoot(_0x43eaea,_0x371003,_0x1498b0={}){const _0x2112ee=a104_0x1560,_0x59c92c=resolveSkillSyncPaths(_0x1498b0);return resolve(_0x59c92c['cacheRoot'],_0x43eaea,fingerprintAccessKey(_0x371003),_0x2112ee(0x1d3));}export function getRuntimeSkillDir(_0x39e72b,_0x385c13,_0x608e7b,_0x1756ef,_0x33383b,_0x31dbcf={}){const _0x152722=a104_0x1560;return resolve(getRuntimeSkillCacheRoot(_0x39e72b,_0x385c13,_0x31dbcf),safePathSegment(_0x608e7b,_0x152722(0x1cc)),_0x1756ef,safePathSegment(_0x33383b,_0x152722(0x1e1)));}function a104_0x5748(){const _0x5a23f5=['cache','Unsafe\x20','27nIOTBd','16yKBTYm','CLAUDE_SKILL_ROOT','skills','41522IsdgFp','includes','workbuddySkillsDir','path\x20segment','.claude','homeDir','validation','371402WGZhin','3614632NLaZcs','.agents','agentsSkillsDir','.workbuddy','3684960lLEdOH','skillCode','filter','19397ufKioC','\x20for\x20local\x20path:\x20','claudeSkillsDir','SKILL_ROOT','834exiqFl','1090350tmTtBg','appCode','3526929hoHfxK'];a104_0x5748=function(){return _0x5a23f5;};return a104_0x5748();}export function safePathSegment(_0x2f01dc,_0x1c9cad=a104_0x1becd4(0x1d7)){const _0x175e5f=a104_0x1becd4;if(!_0x2f01dc||_0x2f01dc[_0x175e5f(0x1d5)]('/')||_0x2f01dc['includes']('\x5c')||_0x2f01dc[_0x175e5f(0x1d5)]('..'))throw CliErrors[_0x175e5f(0x1da)](_0x175e5f(0x1cf)+_0x1c9cad+_0x175e5f(0x1e4)+_0x2f01dc);return _0x2f01dc;}function trimmedEnv(_0x437b13){const _0x6d661b=productEnv(_0x437b13)?.['trim']();return _0x6d661b?_0x6d661b:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function a104_0x5969(_0x1a4833,_0x584121){_0x1a4833=_0x1a4833-0x10a;const _0x55396c=a104_0x5539();let _0x59694=_0x55396c[_0x1a4833];return _0x59694;}(function(_0xb03c02,_0x5a4f3b){const _0x3be624=a104_0x5969,_0x21218d=_0xb03c02();while(!![]){try{const _0x44dbee=-parseInt(_0x3be624(0x13c))/0x1+-parseInt(_0x3be624(0x131))/0x2*(parseInt(_0x3be624(0x137))/0x3)+-parseInt(_0x3be624(0x10e))/0x4+parseInt(_0x3be624(0x10a))/0x5*(-parseInt(_0x3be624(0x118))/0x6)+parseInt(_0x3be624(0x117))/0x7*(-parseInt(_0x3be624(0x136))/0x8)+parseInt(_0x3be624(0x11e))/0x9+parseInt(_0x3be624(0x135))/0xa*(parseInt(_0x3be624(0x10b))/0xb);if(_0x44dbee===_0x5a4f3b)break;else _0x21218d['push'](_0x21218d['shift']());}catch(_0x2c5103){_0x21218d['push'](_0x21218d['shift']());}}}(a104_0x5539,0xde658));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x296489}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(_0xefdd23,_0x2cbc56,_0x48b44f={}){const _0xb51fb7=a104_0x5969,_0x2bdab0=resolvePushDirectoryRoot(_0xefdd23),_0x2aae40=readPushMetadataIfPresent(resolve(_0x2bdab0,METADATA_FILE),{'ignoreInvalidMetadata':_0x48b44f[_0xb51fb7(0x145)]});if(_0x2aae40?.['appCode']&&_0x2aae40[_0xb51fb7(0x11b)]!==_0x2cbc56&&!_0x48b44f['allowAppCodeRetarget']&&!_0x48b44f[_0xb51fb7(0x10d)])throw CliErrors[_0xb51fb7(0x114)](_0xb51fb7(0x119)+_0x2aae40[_0xb51fb7(0x11b)]+_0xb51fb7(0x139)+_0x2cbc56+'\x22.');const _0x5b9616=resolvePushSkillCode(_0x2bdab0,_0x2cbc56,_0x2aae40,_0x48b44f);if(!_0x5b9616)throw CliErrors[_0xb51fb7(0x114)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0xb51fb7(0x14c));return{'dir':_0x2bdab0,'skillCode':_0x5b9616,'metadata':_0x2aae40};}export function readPushDirectory(_0x49506f,_0x89d176,_0x257cc7={}){const _0xdfad54=a104_0x5969,_0x964ebd=resolvePushDirectoryIdentity(_0x49506f,_0x89d176,_0x257cc7),_0xb90b73=_0x964ebd[_0xdfad54(0x14d)],_0x24c086=resolve(_0xb90b73,SKILL_FILE);if(!existsSync(_0x24c086)||!lstatSync(_0x24c086)[_0xdfad54(0x11a)]())throw CliErrors['validation'](_0xdfad54(0x12d)+SKILL_FILE+':\x20'+_0x24c086);const _0x4c7c7c=_0x964ebd[_0xdfad54(0x13e)],_0x5e7e0a=_0x257cc7[_0xdfad54(0x113)]??_0xdfad54(0x146);if(!_0x257cc7['ignoreMetadataScope']&&_0x4c7c7c?.[_0xdfad54(0x128)]===_0xdfad54(0x13b))throw CliErrors[_0xdfad54(0x114)](_0xdfad54(0x140)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x4c7c7c['scope']+'\x22.');if(!_0x257cc7['ignoreMetadataScope']&&_0x5e7e0a===_0xdfad54(0x146)&&_0x4c7c7c?.[_0xdfad54(0x128)]&&_0x4c7c7c['scope']!==_0xdfad54(0x146))throw CliErrors[_0xdfad54(0x114)](_0xdfad54(0x138)+METADATA_FILE+_0xdfad54(0x129)+_0x4c7c7c[_0xdfad54(0x128)]+'\x22.',_0xdfad54(0x134)+_0xb90b73+_0xdfad54(0x110));const _0x5760a5=scanSkillDirectory(_0xb90b73),_0x3866a7=buildSkillPackage(_0x5760a5),_0xc708fd=readFileSync(_0x24c086,'utf8'),_0xb3e92a=_0x964ebd['skillCode'],_0x476436=_0x257cc7['ignoreMetadataForPayload']?undefined:_0x4c7c7c,_0x3a608c=readSkillDisplayName(_0xc708fd);return{'skillCode':_0xb3e92a,'metadata':_0x4c7c7c,'frontmatterDisplayName':_0x3a608c,'input':{'skillCode':_0xb3e92a,'skillName':_0x3a608c??_0x476436?.[_0xdfad54(0x116)],'description':_0x476436?.[_0xdfad54(0x12a)],'content':_0xc708fd,'files':_0x3866a7[_0xdfad54(0x115)],'packageBase64':_0x3866a7[_0xdfad54(0x11c)],'tags':_0x476436?.[_0xdfad54(0x121)],'version':_0x476436?.[_0xdfad54(0x147)],'sourceSessionId':_0x476436?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x1446c3,_0x377803,_0x52594a,_0x443437={}){const _0x3dfaff=a104_0x5969,_0x419de1=resolvePushDirectoryRoot(_0x1446c3),_0x53e83e=readPushMetadataIfPresent(resolve(_0x419de1,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x20bc1c=requireRemoteScope(_0x377803),_0x11c9f9=readLocalSkillContent(_0x419de1),_0x4d4b69={..._0x377803,'appCode':_0x377803[_0x3dfaff(0x11b)]??_0x52594a,'skillName':_0x377803['skillName']??_0x53e83e?.[_0x3dfaff(0x116)],'description':_0x377803[_0x3dfaff(0x12a)]??_0x53e83e?.[_0x3dfaff(0x12a)],'tags':Array[_0x3dfaff(0x148)](_0x377803[_0x3dfaff(0x121)])?_0x377803['tags']:_0x53e83e?.[_0x3dfaff(0x121)],'sourceSessionId':_0x377803['sourceSessionId']??_0x53e83e?.[_0x3dfaff(0x12b)],'content':_0x377803[_0x3dfaff(0x120)]??_0x11c9f9},_0xaf2020=buildMetadata(_0x4d4b69,_0x20bc1c,_0x52594a,contentHash(_0x11c9f9),_0x443437[_0x3dfaff(0x11f)]);writeJsonAtomic(resolve(_0x419de1,METADATA_FILE),_0xaf2020);}export function recordPushedRuntimeSkill(_0xce3af2,_0x2b55d5,_0x51e60b,_0x2712dc={}){const _0xd01b1=a104_0x5969,_0x5999b9=resolvePushDirectoryRoot(_0xce3af2),_0xf208ef=scanSkillDirectory(_0x5999b9),_0x2bd3a2=_0xf208ef[_0xd01b1(0x144)](_0x3a916a=>_0x3a916a[_0xd01b1(0x111)]===SKILL_FILE),_0x38ec8e=_0x2bd3a2?fileText(_0x2bd3a2):'',_0x128112=tryNormalizePackageManifest(_0x2b55d5[_0xd01b1(0x13a)]),_0x10f376={..._0x2b55d5,'content':_0x2b55d5[_0xd01b1(0x120)]??_0x38ec8e,'files':_0x128112},_0x1bd500=_0x128112?normalizeLocalFiles(_0xf208ef)['filter'](_0x17c487=>_0x128112[_0xd01b1(0x13a)][_0xd01b1(0x12f)](_0x3bb696=>_0x3bb696['path']===_0x17c487[_0xd01b1(0x111)])):undefined,_0x223c08=buildMetadata(_0x10f376,_0x2712dc[_0xd01b1(0x128)]??_0xd01b1(0x146),_0x51e60b,contentHash(_0x10f376[_0xd01b1(0x120)]??''),_0x2712dc[_0xd01b1(0x132)],_0x1bd500);writeJsonAtomic(resolve(_0x5999b9,METADATA_FILE),_0x223c08);}export function deriveSkillCodeFromDirectory(_0x1a1840,_0x5a5f01){const _0x48b76c=a104_0x5969,_0x39b9b0=basename(resolve(_0x1a1840)),_0x56cc22=_0x5a5f01+'--';return _0x39b9b0[_0x48b76c(0x142)](_0x56cc22)?_0x39b9b0['slice'](_0x56cc22[_0x48b76c(0x10f)]):_0x39b9b0;}function resolvePushSkillCode(_0x4c468f,_0x5fb8dd,_0x76bb74,_0x1916c7){const _0x24c9c2=a104_0x5969,_0x4760bf=deriveSkillCodeFromSkillFile(_0x4c468f)||deriveSkillCodeFromDirectory(_0x4c468f,_0x5fb8dd);if(_0x1916c7[_0x24c9c2(0x14e)])return _0x4760bf;return _0x76bb74?.['skillCode']?.[_0x24c9c2(0x12e)]()||_0x4760bf;}function deriveSkillCodeFromSkillFile(_0x57cd08){const _0x173902=a104_0x5969,_0x4f5b6e=resolve(_0x57cd08,SKILL_FILE);if(!existsSync(_0x4f5b6e)||!lstatSync(_0x4f5b6e)[_0x173902(0x11a)]())return undefined;const _0x38df9b=readFileSync(_0x4f5b6e,_0x173902(0x122)),_0x5c579e=_0x38df9b[_0x173902(0x10c)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5c579e)return undefined;const _0x3eac99=parseFrontmatterObject(_0x5c579e[0x1]??''),_0x4d6cb3=scalarToString(_0x3eac99?.[_0x173902(0x12c)]);return _0x4d6cb3?slugifySkillName(_0x4d6cb3):undefined;}function a104_0x5539(){const _0x4abdeb=['packageBase64','isDirectory','8331984qDmCgV','refreshedAt','content','tags','utf8','skillCode','company','number','toLowerCase','isSymbolicLink','scope','\x20has\x20scope=\x22','description','sourceSessionId','name','Missing\x20','trim','some','(unknown)','2eWqwYy','pushedAt','string','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','44568580uRXpGj','16ovXNZT','1913853dBsnvN','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','files','builtin','1492613iiiTXO','boolean','metadata','Invalid\x20','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','object','startsWith','Remote\x20Skill\x20','find','ignoreInvalidMetadata','personal','version','isArray','Skill\x20directory\x20not\x20found:\x20','replace','displayName',',\x20or\x20directory\x20name.','dir','ignoreMetadataSkillCode','35iDKhcb','11MsYAaI','match','ignoreMetadataAppCodeMismatch','2409044iDThuo','length','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','path','unknown','targetScope','validation','manifest','skillName','4837266gUUGGM','305826FkOvSM','Skill\x20metadata\x20appCode\x20\x22','isFile','appCode'];a104_0x5539=function(){return _0x4abdeb;};return a104_0x5539();}function readSkillDisplayName(_0x34eaa7){const _0x519579=a104_0x5969,_0x4f780c=_0x34eaa7[_0x519579(0x10c)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4f780c)return undefined;const _0x49d527=parseFrontmatterObject(_0x4f780c[0x1]??'');return scalarToString(_0x49d527?.[_0x519579(0x14b)]);}function slugifySkillName(_0x36da0c){const _0x6e6f4c=a104_0x5969,_0x5a4248=_0x36da0c[_0x6e6f4c(0x12e)]()[_0x6e6f4c(0x126)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x6e6f4c(0x14a)](/^-+/,'')[_0x6e6f4c(0x14a)](/-+$/,'')[_0x6e6f4c(0x14a)](/-{2,}/g,'-');if(!_0x5a4248)throw CliErrors[_0x6e6f4c(0x114)](_0x6e6f4c(0x13f)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x5a4248;}function parseFrontmatterObject(_0x228ee6){const _0x12b3ab=a104_0x5969;try{const _0x508ed3=a104_0x296489(_0x228ee6);return _0x508ed3&&typeof _0x508ed3===_0x12b3ab(0x141)&&!Array[_0x12b3ab(0x148)](_0x508ed3)?_0x508ed3:undefined;}catch{return undefined;}}function scalarToString(_0x337ae1){const _0x5bec62=a104_0x5969;if(typeof _0x337ae1===_0x5bec62(0x133))return _0x337ae1[_0x5bec62(0x12e)]();if(typeof _0x337ae1===_0x5bec62(0x125)||typeof _0x337ae1===_0x5bec62(0x13d))return String(_0x337ae1);return undefined;}function resolvePushDirectoryRoot(_0x1c5899){const _0x2a9938=a104_0x5969,_0x29d380=resolve(_0x1c5899);if(!existsSync(_0x29d380))throw CliErrors['validation'](_0x2a9938(0x149)+_0x1c5899);const _0x879624=lstatSync(_0x29d380);if(_0x879624[_0x2a9938(0x11d)]())return _0x29d380;if(_0x879624[_0x2a9938(0x127)]()){const _0x17aec1=realpathSync(_0x29d380);if(lstatSync(_0x17aec1)[_0x2a9938(0x11d)]())return _0x17aec1;}throw CliErrors[_0x2a9938(0x114)]('Skill\x20directory\x20not\x20found:\x20'+_0x1c5899);}function requireRemoteScope(_0xa09206){const _0x254733=a104_0x5969;if(_0xa09206[_0x254733(0x128)]===_0x254733(0x146)||_0xa09206[_0x254733(0x128)]===_0x254733(0x124)||_0xa09206['scope']==='builtin')return _0xa09206['scope'];throw CliErrors['validation'](_0x254733(0x143)+(_0xa09206[_0x254733(0x123)]||_0x254733(0x130))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0xa09206[_0x254733(0x128)]??_0x254733(0x112))+'\x22.');}function readLocalSkillContent(_0x45d48f){const _0x134985=a104_0x5969,_0xd8813e=resolve(_0x45d48f,SKILL_FILE);return existsSync(_0xd8813e)&&lstatSync(_0xd8813e)[_0x134985(0x11a)]()?readFileSync(_0xd8813e,_0x134985(0x122)):'';}function readPushMetadataIfPresent(_0x3d904b,_0x3438db={}){try{return readMetadataIfPresent(_0x3d904b);}catch(_0x3d2494){if(_0x3438db['ignoreInvalidMetadata'])return undefined;throw _0x3d2494;}}
|
|
1
|
+
(function(_0x4ba8dd,_0x4d04f4){const _0x117899=a105_0x3a6f,_0x118df1=_0x4ba8dd();while(!![]){try{const _0x307563=-parseInt(_0x117899(0x1ae))/0x1+parseInt(_0x117899(0x19e))/0x2+parseInt(_0x117899(0x1c3))/0x3*(-parseInt(_0x117899(0x1b7))/0x4)+parseInt(_0x117899(0x1d2))/0x5*(-parseInt(_0x117899(0x1b5))/0x6)+-parseInt(_0x117899(0x1a1))/0x7+parseInt(_0x117899(0x1d1))/0x8+parseInt(_0x117899(0x1b0))/0x9;if(_0x307563===_0x4d04f4)break;else _0x118df1['push'](_0x118df1['shift']());}catch(_0x2baa4d){_0x118df1['push'](_0x118df1['shift']());}}}(a105_0x31d1,0x96b88));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x2c46b2}from'yaml';import{CliErrors}from'../../errors.js';function a105_0x3a6f(_0x36da04,_0x4a8a59){_0x36da04=_0x36da04-0x198;const _0x31d14d=a105_0x31d1();let _0x3a6fb0=_0x31d14d[_0x36da04];return _0x3a6fb0;}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';function a105_0x31d1(){const _0x4a017f=['string','skillName','5443095wFvkEr','match','object','boolean','skillCode','length','isFile','allowAppCodeRetarget','isDirectory','tags','scope','Unable\x20to\x20resolve\x20skillCode\x20from\x20','version','934925xjbOMJ','some','30152682DOgbyq','path','number','targetScope','trim','150RfTDJy',',\x20or\x20directory\x20name.','68esWwwP','startsWith','\x20has\x20scope=\x22','utf8','sourceSessionId','refreshedAt','content','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','dir','Invalid\x20','metadata','199239CuYKxu','builtin','isArray','replace','ignoreInvalidMetadata','filter','ignoreMetadataScope','\x20name\x20for\x20SkillHub\x20slug\x20generation.','ignoreMetadataSkillCode','files','description','Skill\x20directory\x20not\x20found:\x20','validation','appCode','3272296LJptIC','163105xRIenF','find','isSymbolicLink','ignoreMetadataForPayload','Missing\x20','Skill\x20metadata\x20appCode\x20\x22','packageBase64','Remote\x20Skill\x20','company','\x20has\x20unsupported\x20scope\x20\x22','personal','ignoreMetadataAppCodeMismatch','toLowerCase','1030146jlZDJW'];a105_0x31d1=function(){return _0x4a017f;};return a105_0x31d1();}export function resolvePushDirectoryIdentity(_0x256b99,_0x3dca97,_0x5819e7={}){const _0x4256a1=a105_0x3a6f,_0x5f3793=resolvePushDirectoryRoot(_0x256b99),_0x34b9a1=readPushMetadataIfPresent(resolve(_0x5f3793,METADATA_FILE),{'ignoreInvalidMetadata':_0x5819e7[_0x4256a1(0x1c7)]});if(_0x34b9a1?.[_0x4256a1(0x1d0)]&&_0x34b9a1['appCode']!==_0x3dca97&&!_0x5819e7[_0x4256a1(0x1a8)]&&!_0x5819e7[_0x4256a1(0x19c)])throw CliErrors[_0x4256a1(0x1cf)](_0x4256a1(0x1d7)+_0x34b9a1[_0x4256a1(0x1d0)]+_0x4256a1(0x1be)+_0x3dca97+'\x22.');const _0x5e3f26=resolvePushSkillCode(_0x5f3793,_0x3dca97,_0x34b9a1,_0x5819e7);if(!_0x5e3f26)throw CliErrors[_0x4256a1(0x1cf)](_0x4256a1(0x1ac)+SKILL_FILE+',\x20'+METADATA_FILE+_0x4256a1(0x1b6));return{'dir':_0x5f3793,'skillCode':_0x5e3f26,'metadata':_0x34b9a1};}export function readPushDirectory(_0x5aaf07,_0x28744b,_0x178580={}){const _0x32c65b=a105_0x3a6f,_0x32498d=resolvePushDirectoryIdentity(_0x5aaf07,_0x28744b,_0x178580),_0x550391=_0x32498d[_0x32c65b(0x1c0)],_0x3f57a6=resolve(_0x550391,SKILL_FILE);if(!existsSync(_0x3f57a6)||!lstatSync(_0x3f57a6)[_0x32c65b(0x1a7)]())throw CliErrors[_0x32c65b(0x1cf)](_0x32c65b(0x1d6)+SKILL_FILE+':\x20'+_0x3f57a6);const _0x46e801=_0x32498d[_0x32c65b(0x1c2)],_0x3d0f44=_0x178580[_0x32c65b(0x1b3)]??'personal';if(!_0x178580[_0x32c65b(0x1c9)]&&_0x46e801?.[_0x32c65b(0x1ab)]===_0x32c65b(0x1c4))throw CliErrors[_0x32c65b(0x1cf)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x32c65b(0x1b9)+_0x46e801['scope']+'\x22.');if(!_0x178580[_0x32c65b(0x1c9)]&&_0x3d0f44===_0x32c65b(0x19b)&&_0x46e801?.[_0x32c65b(0x1ab)]&&_0x46e801[_0x32c65b(0x1ab)]!==_0x32c65b(0x19b))throw CliErrors[_0x32c65b(0x1cf)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x32c65b(0x1b9)+_0x46e801['scope']+'\x22.',_0x32c65b(0x1bf)+_0x550391+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x35f2f4=scanSkillDirectory(_0x550391),_0x6b613=buildSkillPackage(_0x35f2f4),_0x460b9d=readFileSync(_0x3f57a6,_0x32c65b(0x1ba)),_0xfe3f1c=_0x32498d[_0x32c65b(0x1a5)],_0x296f7c=_0x178580[_0x32c65b(0x1d5)]?undefined:_0x46e801,_0x1d0aa2=readSkillDisplayName(_0x460b9d);return{'skillCode':_0xfe3f1c,'metadata':_0x46e801,'frontmatterDisplayName':_0x1d0aa2,'input':{'skillCode':_0xfe3f1c,'skillName':_0x1d0aa2??_0x296f7c?.[_0x32c65b(0x1a0)],'description':_0x296f7c?.[_0x32c65b(0x1cd)],'content':_0x460b9d,'files':_0x6b613['manifest'],'packageBase64':_0x6b613[_0x32c65b(0x1d8)],'tags':_0x296f7c?.['tags'],'version':_0x296f7c?.[_0x32c65b(0x1ad)],'sourceSessionId':_0x296f7c?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x1cae12,_0x3f8524,_0x195266,_0x36ba58={}){const _0x460875=a105_0x3a6f,_0x6175cb=resolvePushDirectoryRoot(_0x1cae12),_0x2c66fb=readPushMetadataIfPresent(resolve(_0x6175cb,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x54851c=requireRemoteScope(_0x3f8524),_0x3f0d97=readLocalSkillContent(_0x6175cb),_0x3832ac={..._0x3f8524,'appCode':_0x3f8524[_0x460875(0x1d0)]??_0x195266,'skillName':_0x3f8524[_0x460875(0x1a0)]??_0x2c66fb?.[_0x460875(0x1a0)],'description':_0x3f8524[_0x460875(0x1cd)]??_0x2c66fb?.[_0x460875(0x1cd)],'tags':Array[_0x460875(0x1c5)](_0x3f8524['tags'])?_0x3f8524[_0x460875(0x1aa)]:_0x2c66fb?.[_0x460875(0x1aa)],'sourceSessionId':_0x3f8524[_0x460875(0x1bb)]??_0x2c66fb?.[_0x460875(0x1bb)],'content':_0x3f8524[_0x460875(0x1bd)]??_0x3f0d97},_0x5a6027=buildMetadata(_0x3832ac,_0x54851c,_0x195266,contentHash(_0x3f0d97),_0x36ba58[_0x460875(0x1bc)]);writeJsonAtomic(resolve(_0x6175cb,METADATA_FILE),_0x5a6027);}export function recordPushedRuntimeSkill(_0x5532ad,_0x45bf0a,_0x347a8b,_0x2de695={}){const _0x5e6407=a105_0x3a6f,_0x474d34=resolvePushDirectoryRoot(_0x5532ad),_0x36bac5=scanSkillDirectory(_0x474d34),_0x51d4d8=_0x36bac5[_0x5e6407(0x1d3)](_0x74fc5e=>_0x74fc5e[_0x5e6407(0x1b1)]===SKILL_FILE),_0x27e67a=_0x51d4d8?fileText(_0x51d4d8):'',_0x973d48=tryNormalizePackageManifest(_0x45bf0a[_0x5e6407(0x1cc)]),_0x180f56={..._0x45bf0a,'content':_0x45bf0a[_0x5e6407(0x1bd)]??_0x27e67a,'files':_0x973d48},_0x315090=_0x973d48?normalizeLocalFiles(_0x36bac5)[_0x5e6407(0x1c8)](_0x250e3f=>_0x973d48['files'][_0x5e6407(0x1af)](_0x23d35f=>_0x23d35f[_0x5e6407(0x1b1)]===_0x250e3f['path'])):undefined,_0x8cbbd1=buildMetadata(_0x180f56,_0x2de695[_0x5e6407(0x1ab)]??'personal',_0x347a8b,contentHash(_0x180f56[_0x5e6407(0x1bd)]??''),_0x2de695['pushedAt'],_0x315090);writeJsonAtomic(resolve(_0x474d34,METADATA_FILE),_0x8cbbd1);}export function deriveSkillCodeFromDirectory(_0x5a0a80,_0x631c91){const _0x3e2be3=a105_0x3a6f,_0x30fadf=basename(resolve(_0x5a0a80)),_0x57f4a3=_0x631c91+'--';return _0x30fadf[_0x3e2be3(0x1b8)](_0x57f4a3)?_0x30fadf['slice'](_0x57f4a3[_0x3e2be3(0x1a6)]):_0x30fadf;}function resolvePushSkillCode(_0x5044fb,_0x45eecb,_0x4fd050,_0xaa3b37){const _0x3ab440=a105_0x3a6f,_0x13bb98=deriveSkillCodeFromSkillFile(_0x5044fb)||deriveSkillCodeFromDirectory(_0x5044fb,_0x45eecb);if(_0xaa3b37[_0x3ab440(0x1cb)])return _0x13bb98;return _0x4fd050?.['skillCode']?.[_0x3ab440(0x1b4)]()||_0x13bb98;}function deriveSkillCodeFromSkillFile(_0x55536e){const _0x5b8e6f=a105_0x3a6f,_0x26c05e=resolve(_0x55536e,SKILL_FILE);if(!existsSync(_0x26c05e)||!lstatSync(_0x26c05e)[_0x5b8e6f(0x1a7)]())return undefined;const _0x293d0c=readFileSync(_0x26c05e,'utf8'),_0x23cf69=_0x293d0c[_0x5b8e6f(0x1a2)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x23cf69)return undefined;const _0x1828b3=parseFrontmatterObject(_0x23cf69[0x1]??''),_0x114262=scalarToString(_0x1828b3?.['name']);return _0x114262?slugifySkillName(_0x114262):undefined;}function readSkillDisplayName(_0x5a569f){const _0x2d4e33=_0x5a569f['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2d4e33)return undefined;const _0x1e27ef=parseFrontmatterObject(_0x2d4e33[0x1]??'');return scalarToString(_0x1e27ef?.['displayName']);}function slugifySkillName(_0x5e7fae){const _0x2bcccf=a105_0x3a6f,_0x20f798=_0x5e7fae[_0x2bcccf(0x1b4)]()[_0x2bcccf(0x19d)]()[_0x2bcccf(0x1c6)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x2bcccf(0x1c6)](/^-+/,'')['replace'](/-+$/,'')[_0x2bcccf(0x1c6)](/-{2,}/g,'-');if(!_0x20f798)throw CliErrors[_0x2bcccf(0x1cf)](_0x2bcccf(0x1c1)+SKILL_FILE+_0x2bcccf(0x1ca));return _0x20f798;}function parseFrontmatterObject(_0x42efeb){const _0x40bfe5=a105_0x3a6f;try{const _0x4b6a91=a105_0x2c46b2(_0x42efeb);return _0x4b6a91&&typeof _0x4b6a91===_0x40bfe5(0x1a3)&&!Array[_0x40bfe5(0x1c5)](_0x4b6a91)?_0x4b6a91:undefined;}catch{return undefined;}}function scalarToString(_0x174f7d){const _0x14d3b8=a105_0x3a6f;if(typeof _0x174f7d===_0x14d3b8(0x19f))return _0x174f7d[_0x14d3b8(0x1b4)]();if(typeof _0x174f7d===_0x14d3b8(0x1b2)||typeof _0x174f7d===_0x14d3b8(0x1a4))return String(_0x174f7d);return undefined;}function resolvePushDirectoryRoot(_0x4d9fa6){const _0x5e4a96=a105_0x3a6f,_0x51d1b6=resolve(_0x4d9fa6);if(!existsSync(_0x51d1b6))throw CliErrors[_0x5e4a96(0x1cf)](_0x5e4a96(0x1ce)+_0x4d9fa6);const _0x3ea4bb=lstatSync(_0x51d1b6);if(_0x3ea4bb[_0x5e4a96(0x1a9)]())return _0x51d1b6;if(_0x3ea4bb[_0x5e4a96(0x1d4)]()){const _0xf4d8a=realpathSync(_0x51d1b6);if(lstatSync(_0xf4d8a)['isDirectory']())return _0xf4d8a;}throw CliErrors['validation'](_0x5e4a96(0x1ce)+_0x4d9fa6);}function requireRemoteScope(_0x9c5968){const _0x1c7fda=a105_0x3a6f;if(_0x9c5968[_0x1c7fda(0x1ab)]===_0x1c7fda(0x19b)||_0x9c5968['scope']===_0x1c7fda(0x199)||_0x9c5968['scope']===_0x1c7fda(0x1c4))return _0x9c5968[_0x1c7fda(0x1ab)];throw CliErrors[_0x1c7fda(0x1cf)](_0x1c7fda(0x198)+(_0x9c5968[_0x1c7fda(0x1a5)]||'(unknown)')+_0x1c7fda(0x19a)+(_0x9c5968['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x54b998){const _0x1da0af=a105_0x3a6f,_0x989ccf=resolve(_0x54b998,SKILL_FILE);return existsSync(_0x989ccf)&&lstatSync(_0x989ccf)[_0x1da0af(0x1a7)]()?readFileSync(_0x989ccf,_0x1da0af(0x1ba)):'';}function readPushMetadataIfPresent(_0x4b9ba9,_0xf4aed7={}){const _0x2b4ccb=a105_0x3a6f;try{return readMetadataIfPresent(_0x4b9ba9);}catch(_0x549fa3){if(_0xf4aed7[_0x2b4ccb(0x1c7)])return undefined;throw _0x549fa3;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3337ad,_0x12813d){const _0x5e7c78=a106_0xec37,_0x223bfc=_0x3337ad();while(!![]){try{const _0x335c5c=-parseInt(_0x5e7c78(0x92))/0x1+parseInt(_0x5e7c78(0x8d))/0x2+parseInt(_0x5e7c78(0x90))/0x3+parseInt(_0x5e7c78(0x8e))/0x4*(-parseInt(_0x5e7c78(0x9b))/0x5)+parseInt(_0x5e7c78(0x91))/0x6+parseInt(_0x5e7c78(0x94))/0x7+-parseInt(_0x5e7c78(0x8f))/0x8*(parseInt(_0x5e7c78(0x99))/0x9);if(_0x335c5c===_0x12813d)break;else _0x223bfc['push'](_0x223bfc['shift']());}catch(_0x372628){_0x223bfc['push'](_0x223bfc['shift']());}}}(a106_0x266c,0xce567));function a106_0x266c(){const _0x1af916=['217456vZLqmz','builtin','10496633JXcSQz','includes','push','personal','company','9wWklNA','Unsupported\x20runtime\x20Skill\x20scope:\x20','6185wnubtx','46142UoxqnO','3372gHTyhj','9482608peOvSP','2616438eLtEXj','5375976qyIMvX'];a106_0x266c=function(){return _0x1af916;};return a106_0x266c();}import{CliErrors}from'../../errors.js';function a106_0xec37(_0xc308ad,_0x4a3406){_0xc308ad=_0xc308ad-0x8d;const _0x266c33=a106_0x266c();let _0xec3764=_0x266c33[_0xc308ad];return _0xec3764;}export function normalizeRuntimeSkillScopes(_0x3ef124){const _0x437107=a106_0xec37,_0x3589bd=_0x3ef124&&_0x3ef124['length']>0x0?_0x3ef124:[_0x437107(0x97),'company',_0x437107(0x93)],_0x37b67d=[];for(const _0x51628f of _0x3589bd){if(!isRuntimeSkillScope(_0x51628f))throw CliErrors['validation'](_0x437107(0x9a)+_0x51628f);!_0x37b67d[_0x437107(0x95)](_0x51628f)&&_0x37b67d[_0x437107(0x96)](_0x51628f);}return _0x37b67d;}export function isRuntimeSkillScope(_0x19b5d0){const _0x3edec5=a106_0xec37;return _0x19b5d0==='personal'||_0x19b5d0===_0x3edec5(0x98)||_0x19b5d0===_0x3edec5(0x93);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a108_0x5bfecf=a108_0x2482;(function(_0x24949c,_0xd9cc13){const _0xf7dce9=a108_0x2482,_0x499c8f=_0x24949c();while(!![]){try{const _0xb31dde=-parseInt(_0xf7dce9(0xff))/0x1*(-parseInt(_0xf7dce9(0x102))/0x2)+parseInt(_0xf7dce9(0x10e))/0x3*(parseInt(_0xf7dce9(0x101))/0x4)+-parseInt(_0xf7dce9(0x100))/0x5+-parseInt(_0xf7dce9(0x10d))/0x6*(-parseInt(_0xf7dce9(0x109))/0x7)+parseInt(_0xf7dce9(0x105))/0x8+parseInt(_0xf7dce9(0x111))/0x9*(-parseInt(_0xf7dce9(0x106))/0xa)+-parseInt(_0xf7dce9(0x104))/0xb;if(_0xb31dde===_0xd9cc13)break;else _0x499c8f['push'](_0x499c8f['shift']());}catch(_0x4d3659){_0x499c8f['push'](_0x499c8f['shift']());}}}(a108_0x2dbb,0x29939));function a108_0x2482(_0x2ee08a,_0x5e38f6){_0x2ee08a=_0x2ee08a-0xfb;const _0x2dbbec=a108_0x2dbb();let _0x24820a=_0x2dbbec[_0x2ee08a];return _0x24820a;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a108_0x5bfecf(0x10c));export function createDeterministicZipPackage(_0x225093){const _0x3fa343=a108_0x5bfecf,_0x8b4bf8={};for(const _0x217362 of normalizeLocalFiles(_0x225093)){_0x8b4bf8[_0x217362['path']]=fileContent(_0x217362);}return Buffer[_0x3fa343(0xfe)](zipSync(_0x8b4bf8,{'level':0x0,'mtime':ZIP_MTIME}));}function a108_0x2dbb(){const _0x57c7ae=['sort','1089571ocigBt','object','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','1980-01-01T00:00:00.000Z','6AtcXDi','2904FkHqYc','code','entries','1640502fVbKXd','validation_error','name','length','from','15cJMBSl','908865PBOIue','492SpgCVn','360yInwHs','map','855833etFVlu','2677872sCobeJ','10YtIuPn','validation'];a108_0x2dbb=function(){return _0x57c7ae;};return a108_0x2dbb();}export function parseZipPackage(_0x334a6e){const _0x1893f2=a108_0x5bfecf;if(_0x334a6e[_0x1893f2(0xfd)]<0x16)throw CliErrors[_0x1893f2(0x107)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x4d5c0d;try{_0x4d5c0d=unzipSync(_0x334a6e,{'filter'(_0x429417){const _0x28b551=_0x1893f2,_0x3197e7=normalizeSkillRelativePath(_0x429417[_0x28b551(0xfc)]);if(_0x3197e7['endsWith']('/'))throw CliErrors[_0x28b551(0x107)](_0x28b551(0x10b)+_0x3197e7);return!![];}});}catch(_0x1cec15){if(isRuntimeSkillValidationError(_0x1cec15))throw _0x1cec15;throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object[_0x1893f2(0x110)](_0x4d5c0d)[_0x1893f2(0x103)](([_0x25ffd0,_0x385ac7])=>({'path':normalizeSkillRelativePath(_0x25ffd0),'bytes':Buffer['from'](_0x385ac7)}))[_0x1893f2(0x108)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x416706){const _0x3c2f7e=a108_0x5bfecf;return typeof _0x416706===_0x3c2f7e(0x10a)&&_0x416706!==null&&_0x3c2f7e(0x10f)in _0x416706&&_0x416706[_0x3c2f7e(0x10f)]===_0x3c2f7e(0xfb);}
|