@lovrabet/lovrabet-cli 2.1.8-beta.3 → 2.1.8
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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a92_0x23ed4c=a92_0x2183;(function(_0x4513a0,_0x2fd344){const _0x150d8b=a92_0x2183,_0xaec112=_0x4513a0();while(!![]){try{const _0x7bcc11=-parseInt(_0x150d8b(0x96))/0x1+-parseInt(_0x150d8b(0x99))/0x2+-parseInt(_0x150d8b(0x97))/0x3*(-parseInt(_0x150d8b(0x98))/0x4)+-parseInt(_0x150d8b(0x9b))/0x5+-parseInt(_0x150d8b(0x94))/0x6+-parseInt(_0x150d8b(0x9c))/0x7*(-parseInt(_0x150d8b(0x9a))/0x8)+-parseInt(_0x150d8b(0x93))/0x9*(-parseInt(_0x150d8b(0x95))/0xa);if(_0x7bcc11===_0x2fd344)break;else _0xaec112['push'](_0xaec112['shift']());}catch(_0x54055e){_0xaec112['push'](_0xaec112['shift']());}}}(a92_0x48ff,0x842d1));export const VERSION='2.1.8';export const GIT_TAG='v2.1.8-beta.3';function a92_0x2183(_0x4b4ed0,_0x5f4a9b){_0x4b4ed0=_0x4b4ed0-0x93;const _0x48ff8a=a92_0x48ff();let _0x21834a=_0x48ff8a[_0x4b4ed0];return _0x21834a;}export const GIT_COMMIT=a92_0x23ed4c(0x9d);function a92_0x48ff(){const _0xaa5a1f=['11973LAvTrX','740pueeeB','1965964BIbnnP','720zIDeCk','1853765vEpnOu','9905KmcIOd','18d879c','18mtUbqr','2792286PFOGLh','8179900Yhiwry','141156eSvtfE'];a92_0x48ff=function(){return _0xaa5a1f;};return a92_0x48ff();}export const BUILD_TIME='2026-07-08T06:21:25.636Z';
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c6fc9,_0x42b12c){const _0x11e8e4=a93_0x70c8,_0x3c5876=_0x3c6fc9();while(!![]){try{const _0x7a3768=-parseInt(_0x11e8e4(0x13f))/0x1+-parseInt(_0x11e8e4(0x143))/0x2+-parseInt(_0x11e8e4(0x146))/0x3*(parseInt(_0x11e8e4(0x147))/0x4)+parseInt(_0x11e8e4(0x140))/0x5*(-parseInt(_0x11e8e4(0x141))/0x6)+parseInt(_0x11e8e4(0x13a))/0x7*(parseInt(_0x11e8e4(0x142))/0x8)+parseInt(_0x11e8e4(0x13b))/0x9*(-parseInt(_0x11e8e4(0x144))/0xa)+-parseInt(_0x11e8e4(0x145))/0xb*(-parseInt(_0x11e8e4(0x138))/0xc);if(_0x7a3768===_0x42b12c)break;else _0x3c5876['push'](_0x3c5876['shift']());}catch(_0x16b515){_0x3c5876['push'](_0x3c5876['shift']());}}}(a93_0x4f8b,0x29c16));function a93_0x4f8b(){const _0x348ef6=['42kGreUN','67492tRYUZX','16036932RLJAye','column','7bbISNe','51759fZTpaw','green','\x20to\x20view\x20available\x20commands.','\x20--help','320251nTJnbN','1664445ViOZDb','6OaivTk','109472cdTyUa','27310ILwHRE','480mcoWUH','11HtEQmd'];a93_0x4f8b=function(){return _0x348ef6;};return a93_0x4f8b();}import{jsx as a93_0xf0c6fb,jsxs as a93_0x2aa40f}from'react/jsx-runtime';import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a93_0x70c8(_0x4bd139,_0x4dee9a){_0x4bd139=_0x4bd139-0x138;const _0x4f8b7e=a93_0x4f8b();let _0x70c818=_0x4f8b7e[_0x4bd139];return _0x70c818;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x247870=a93_0x70c8,{exit:_0x26cde1}=useApp();return useEffect(()=>{_0x26cde1();},[_0x26cde1]),a93_0x2aa40f(Box,{'flexDirection':_0x247870(0x139),'marginTop':0x1,'marginBottom':0x1,'children':[a93_0xf0c6fb(Box,{'children':a93_0xf0c6fb(Text,{'bold':!![],'color':_0x247870(0x13c),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a93_0x2aa40f(Box,{'marginTop':0x1,'children':[a93_0xf0c6fb(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a93_0xf0c6fb(Text,{'bold':!![],'color':'green','children':CLI_BIN_NAME+_0x247870(0x13e)}),a93_0xf0c6fb(Text,{'dimColor':!![],'children':_0x247870(0x13d)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x134a10,_0x321d09){const _0x90f2b7=a94_0x5f2a,_0x477a2f=_0x134a10();while(!![]){try{const _0x52549e=parseInt(_0x90f2b7(0xee))/0x1+parseInt(_0x90f2b7(0xe0))/0x2*(-parseInt(_0x90f2b7(0xe7))/0x3)+-parseInt(_0x90f2b7(0xed))/0x4*(parseInt(_0x90f2b7(0xdb))/0x5)+parseInt(_0x90f2b7(0xda))/0x6+-parseInt(_0x90f2b7(0xea))/0x7*(parseInt(_0x90f2b7(0xdf))/0x8)+-parseInt(_0x90f2b7(0xe1))/0x9*(parseInt(_0x90f2b7(0xf1))/0xa)+-parseInt(_0x90f2b7(0xe5))/0xb*(-parseInt(_0x90f2b7(0xe4))/0xc);if(_0x52549e===_0x321d09)break;else _0x477a2f['push'](_0x477a2f['shift']());}catch(_0x568ffa){_0x477a2f['push'](_0x477a2f['shift']());}}}(a94_0x4f1c,0x188c1));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a94_0x5f2a(_0x260262,_0x14ed47){_0x260262=_0x260262-0xda;const _0x4f1c2b=a94_0x4f1c();let _0x5f2a3e=_0x4f1c2b[_0x260262];return _0x5f2a3e;}import{LOVRABET_SKILL_SOURCE as a94_0x2a79c3}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';export const LOVRABET_SKILL_SOURCE=a94_0x2a79c3;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG['skipNpxSkillsEnvSuffix']);function a94_0x4f1c(){const _0x3043d2=['exit\x20','add','168jGHNuA','130537AQZGem','inherit','3PaVWdF','stdout','npx','14QQppkn','toString','stderr','632TtyULT','101084taPoYF','unknown','join','10qDqHeN','pipe','924822EsWwbD','785tUpfEU','trim','status','skills','317728JyTxdJ','270626PgLjfa','731367rwBMtX'];a94_0x4f1c=function(){return _0x3043d2;};return a94_0x4f1c();}export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x577716,_0xc6c944=LOVRABET_SKILL_SOURCE,_0x210575){const _0x89001a=a94_0x5f2a;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x9b7972=_0x210575?.['stdio']??_0x89001a(0xe6),_0x48c4bb=resolveNpmBin(_0x89001a(0xe9)),_0x579cfe=[_0x89001a(0xde),_0x89001a(0xe3),_0xc6c944,'-g','-y'],_0x1497b0=[_0x48c4bb,..._0x579cfe][_0x89001a(0xf0)]('\x20');console['log']('*\x20'+_0x1497b0);const _0x1b8815=spawnSync(_0x48c4bb,_0x579cfe,{'cwd':_0x577716,'stdio':_0x9b7972,'env':process.env,'shell':![]});if(_0x1b8815[_0x89001a(0xdd)]===0x0)return{'ok':!![],'status':0x0};let _0x2c920e=_0x89001a(0xe2)+(_0x1b8815[_0x89001a(0xdd)]??_0x89001a(0xef));if(_0x9b7972===_0x89001a(0xf2)){const _0x9590ea=_0x1b8815[_0x89001a(0xec)]?_0x1b8815['stderr']['toString']()[_0x89001a(0xdc)]():'',_0x235a2c=_0x1b8815[_0x89001a(0xe8)]?_0x1b8815[_0x89001a(0xe8)][_0x89001a(0xeb)]()[_0x89001a(0xdc)]():'';if(_0x9590ea)_0x2c920e=_0x9590ea;else{if(_0x235a2c)_0x2c920e=_0x235a2c;}}return{'ok':![],'status':_0x1b8815['status']??null,'error':_0x2c920e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a95_0x1611(_0x5b565c,_0x2c8a56){_0x5b565c=_0x5b565c-0xc8;const _0x5cfba0=a95_0x5cfb();let _0x161167=_0x5cfba0[_0x5b565c];return _0x161167;}const a95_0x421507=a95_0x1611;(function(_0x5a04ce,_0x241cd9){const _0x3fd7e7=a95_0x1611,_0x5a50a5=_0x5a04ce();while(!![]){try{const _0x31b7f1=parseInt(_0x3fd7e7(0xd1))/0x1*(-parseInt(_0x3fd7e7(0xd9))/0x2)+-parseInt(_0x3fd7e7(0xda))/0x3*(-parseInt(_0x3fd7e7(0xd2))/0x4)+-parseInt(_0x3fd7e7(0xce))/0x5*(parseInt(_0x3fd7e7(0xd4))/0x6)+parseInt(_0x3fd7e7(0xd3))/0x7*(parseInt(_0x3fd7e7(0xd5))/0x8)+-parseInt(_0x3fd7e7(0xd8))/0x9*(parseInt(_0x3fd7e7(0xc9))/0xa)+parseInt(_0x3fd7e7(0xd7))/0xb+-parseInt(_0x3fd7e7(0xcd))/0xc*(-parseInt(_0x3fd7e7(0xc8))/0xd);if(_0x31b7f1===_0x241cd9)break;else _0x5a50a5['push'](_0x5a50a5['shift']());}catch(_0x149b80){_0x5a50a5['push'](_0x5a50a5['shift']());}}}(a95_0x5cfb,0xa859c));function a95_0x5cfb(){const _0x29505c=['1257MpCkYv','.git','coverage','.hg','node_modules','SKILL.md','26wjhVrv','12106460lrrhhx','.svn','lovrabet.skill.json','.turbo','10618212MOqNSG','15qbMyhK','.cache','.next','9WqztjN','1964EXevyo','924091SJsNIJ','253884GCduLX','8IIzdrJ','dist','3492687EsbaHu','9jFJspM','88402NCKmct'];a95_0x5cfb=function(){return _0x29505c;};return a95_0x5cfb();}export const METADATA_FILE=a95_0x421507(0xcb);export const SKILL_FILE=a95_0x421507(0xdf);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a95_0x421507(0xdb),a95_0x421507(0xdd),a95_0x421507(0xca),a95_0x421507(0xde),a95_0x421507(0xd0),a95_0x421507(0xd6),'build',a95_0x421507(0xdc),a95_0x421507(0xcc),a95_0x421507(0xcf)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xdcdacf,_0xdcbe86){const _0x5e1c80=a96_0x3b10,_0x575a27=_0xdcdacf();while(!![]){try{const _0x10977b=parseInt(_0x5e1c80(0x123))/0x1+parseInt(_0x5e1c80(0x12c))/0x2+parseInt(_0x5e1c80(0x126))/0x3*(parseInt(_0x5e1c80(0x12d))/0x4)+-parseInt(_0x5e1c80(0x130))/0x5+-parseInt(_0x5e1c80(0x124))/0x6+-parseInt(_0x5e1c80(0x12b))/0x7*(-parseInt(_0x5e1c80(0x127))/0x8)+-parseInt(_0x5e1c80(0x131))/0x9*(parseInt(_0x5e1c80(0x120))/0xa);if(_0x10977b===_0xdcbe86)break;else _0x575a27['push'](_0x575a27['shift']());}catch(_0x544d89){_0x575a27['push'](_0x575a27['shift']());}}}(a96_0x35cf,0x73608));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(_0x23325d,_0x3d60f4){const _0x217c10=a96_0x3b10,_0x19a5d7=normalizeSkillRelativePath(_0x3d60f4),_0xc14f11=realOrResolved(_0x23325d),_0x4ff1f9=resolve(_0xc14f11,..._0x19a5d7[_0x217c10(0x132)]('/'));if(!isPathInside(_0x4ff1f9,_0xc14f11))throw CliErrors[_0x217c10(0x128)](_0x217c10(0x129)+_0x3d60f4);return ensureNoSymlinkInManagedPath(_0xc14f11,_0x19a5d7),_0x4ff1f9;}export function ensureNoSymlinkInManagedPath(_0x1763ae,_0x48137f){const _0x773494=a96_0x3b10;let _0x1038d0=_0x1763ae;for(const _0x3651fb of _0x48137f[_0x773494(0x132)]('/')){_0x1038d0=resolve(_0x1038d0,_0x3651fb);const _0x5d94aa=lstatIfPresent(_0x1038d0);if(_0x5d94aa?.['isSymbolicLink']())throw CliErrors[_0x773494(0x128)](_0x773494(0x12f)+_0x48137f);}}export function isDanglingSymlink(_0x123d4f){try{return lstatSync(_0x123d4f)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x564da7){const _0x36b8d9=readlinkSync(_0x564da7);return isAbsolute(_0x36b8d9)?_0x36b8d9:resolve(dirname(_0x564da7),_0x36b8d9);}export function isPathInside(_0x3dccee,_0x5ef511){const _0x5c1d1e=a96_0x3b10,_0x552948=_0x3dccee[_0x5c1d1e(0x125)](sep)?_0x3dccee:''+_0x3dccee+sep,_0x5ecdad=_0x5ef511['endsWith'](sep)?_0x5ef511:''+_0x5ef511+sep;return _0x3dccee===_0x5ef511||_0x552948[_0x5c1d1e(0x122)](_0x5ecdad);}function a96_0x3b10(_0x4ae4bf,_0x785434){_0x4ae4bf=_0x4ae4bf-0x120;const _0x35cf9a=a96_0x35cf();let _0x3b10f1=_0x35cf9a[_0x4ae4bf];return _0x3b10f1;}export function realOrResolved(_0x4e9331){try{return realpathSync(_0x4e9331);}catch{return resolve(_0x4e9331);}}export function lstatIfPresent(_0xe498df){try{return lstatSync(_0xe498df);}catch{return undefined;}}export function writeTextAtomic(_0x28b7af,_0x12d562,_0x3d9b7d){const _0x109c5f=a96_0x3b10;writeBytesAtomic(_0x28b7af,Buffer[_0x109c5f(0x121)](_0x12d562,_0x109c5f(0x12e)),_0x3d9b7d);}export function writeBytesAtomic(_0x364677,_0x180deb,_0xbc3cba){const _0x1a49fe=_0x364677+'.tmp';try{writeFileSync(_0x1a49fe,_0x180deb,{'mode':_0xbc3cba}),renameSync(_0x1a49fe,_0x364677);}catch(_0x57de8a){try{rmSync(_0x1a49fe,{'force':!![]});}catch{}throw _0x57de8a;}}export function writeJsonAtomic(_0x3c0157,_0x181d73){const _0x10475f=a96_0x3b10;writeTextAtomic(_0x3c0157,JSON[_0x10475f(0x12a)](_0x181d73,null,0x2)+'\x0a',0x180);}function a96_0x35cf(){const _0x4f35af=['4921992fmulxW','endsWith','1122219qJMlJu','1173704cKgcad','validation','Unsafe\x20Skill\x20file\x20path:\x20','stringify','35PTTnlk','868536xPPejm','4QvfPnm','utf8','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','1577750eyOYlX','108ZxvIrd','split','229630JvyuEU','from','startsWith','342116zWXPyk'];a96_0x35cf=function(){return _0x4f35af;};return a96_0x35cf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2fdf60,_0x5e9b2c){const _0x523467=a97_0x1c3a,_0x18c819=_0x2fdf60();while(!![]){try{const _0x3e830e=parseInt(_0x523467(0x73))/0x1*(parseInt(_0x523467(0x7d))/0x2)+parseInt(_0x523467(0x7b))/0x3+-parseInt(_0x523467(0x7e))/0x4*(parseInt(_0x523467(0x7c))/0x5)+-parseInt(_0x523467(0x78))/0x6+parseInt(_0x523467(0x7a))/0x7+-parseInt(_0x523467(0x75))/0x8+parseInt(_0x523467(0x7f))/0x9;if(_0x3e830e===_0x5e9b2c)break;else _0x18c819['push'](_0x18c819['shift']());}catch(_0x9fc3e2){_0x18c819['push'](_0x18c819['shift']());}}}(a97_0x599c,0x82513));function a97_0x599c(){const _0x2445b5=['7243OveRas','size','7294648RRFXCf','sha256','hex','6131400uHXJah','digest','492877yJbbDP','2986677USopKL','85FzZzwJ','4JpXsFG','50356jHFuqQ','14409603bkPzet','update'];a97_0x599c=function(){return _0x2445b5;};return a97_0x599c();}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x4765b0){const _0x3beb2b=a97_0x1c3a;return createHash(_0x3beb2b(0x76))[_0x3beb2b(0x80)](_0x4765b0)[_0x3beb2b(0x79)](_0x3beb2b(0x77));}function a97_0x1c3a(_0x5ba587,_0x112d27){_0x5ba587=_0x5ba587-0x73;const _0x599c6c=a97_0x599c();let _0x1c3a16=_0x599c6c[_0x5ba587];return _0x1c3a16;}export function fileHash(_0x1af56a){return bufferSha256(fileContent(_0x1af56a));}export function bufferSha256(_0x11ab0f){const _0x279f35=a97_0x1c3a;return createHash(_0x279f35(0x76))[_0x279f35(0x80)](_0x11ab0f)['digest']('hex');}export function fileTreeHash(_0x164258){const _0x3a4055=a97_0x1c3a,_0x1204df=createHash(_0x3a4055(0x76));for(const _0x2fb790 of normalizeManifestFiles(_0x164258)){_0x1204df[_0x3a4055(0x80)](_0x2fb790['path']),_0x1204df[_0x3a4055(0x80)]('\x00'),_0x1204df[_0x3a4055(0x80)](_0x2fb790[_0x3a4055(0x76)]),_0x1204df[_0x3a4055(0x80)]('\x00'),_0x1204df[_0x3a4055(0x80)](String(_0x2fb790[_0x3a4055(0x74)])),_0x1204df['update']('\x00');}return _0x1204df[_0x3a4055(0x79)](_0x3a4055(0x77));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d54a6,_0x20a242){const _0x25b049=a98_0x24b1,_0x351d8b=_0x4d54a6();while(!![]){try{const _0x560027=parseInt(_0x25b049(0x165))/0x1*(parseInt(_0x25b049(0x16f))/0x2)+-parseInt(_0x25b049(0x184))/0x3*(-parseInt(_0x25b049(0x174))/0x4)+-parseInt(_0x25b049(0x15b))/0x5+-parseInt(_0x25b049(0x160))/0x6*(parseInt(_0x25b049(0x166))/0x7)+-parseInt(_0x25b049(0x17f))/0x8*(-parseInt(_0x25b049(0x176))/0x9)+-parseInt(_0x25b049(0x177))/0xa+parseInt(_0x25b049(0x17d))/0xb;if(_0x560027===_0x20a242)break;else _0x351d8b['push'](_0x351d8b['shift']());}catch(_0x14c29e){_0x351d8b['push'](_0x351d8b['shift']());}}}(a98_0x292c,0xa95f3));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a98_0x44d28c from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a98_0x292c(){const _0x55973a=['2000270BYUPZC','trim','env','length','updated','1770HHOJgE','scope','has','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','skillCode','20549EXUkBG','28882RUGJNA','created','get','name','values','external-symlink','claudeSkillsDir','set','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','52GzgoWu','map','metadata-mismatch','removed','pruneSkillCodes','1092ZOGQyw','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','2402919GtemaY','8461120pnISBg','push','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','slice','isDirectory','accessKey','11544775uWXLgg','startsWith','40qioxEs','appCode','not-managed-symlink','skill','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','2619dQnexy','builtin','skipped','isSymbolicLink','filter','validation','unchanged','dir','agentsSkillsDir','managedRoot','contentHash','personal','activeSkillCodes','scopes'];a98_0x292c=function(){return _0x55973a;};return a98_0x292c();}import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a98_0x44d28c;export function linkEffectiveRuntimeSkills(_0x1d1311,_0x4a3dba,_0x39104e={}){const _0x4426ab=a98_0x24b1,_0x30ba70=new Map();for(const _0x154a01 of _0x1d1311){const _0x4b35e2=_0x154a01[_0x4426ab(0x182)][_0x4426ab(0x164)];if(!_0x4b35e2)continue;const _0x34d8c1=_0x30ba70[_0x4426ab(0x168)](_0x4b35e2);(!_0x34d8c1||_0x154a01['scope']==='personal')&&_0x30ba70[_0x4426ab(0x16d)](_0x4b35e2,_0x154a01);}const _0x350e90=[],_0x4a32d3=resolveSkillSyncPaths(_0x39104e);for(const _0x29b3c6 of _0x30ba70[_0x4426ab(0x16a)]()){const _0x47ebc3=requireSkillCode(_0x29b3c6[_0x4426ab(0x182)]),_0x2c971b=_0x4a3dba+'--'+_0x47ebc3;for(const _0x324a8a of[_0x4a32d3['agentsSkillsDir'],_0x4a32d3['claudeSkillsDir']]){_0x350e90['push'](ensureManagedSymlink(resolve(_0x324a8a,_0x2c971b),_0x29b3c6[_0x4426ab(0x154)],_0x4a32d3[_0x4426ab(0x156)]));}}return _0x350e90;}export function pruneStaleRuntimeSkillLinks(_0x57da9e,_0x531cbc,_0x8e8e29={},_0x4acb7c){const _0x1159bc=a98_0x24b1,_0x3bda8f=resolveSkillSyncPaths(_0x8e8e29),_0x2ba1c8=new Set([..._0x531cbc][_0x1159bc(0x170)](_0x1689ae=>_0x1689ae['trim']())[_0x1159bc(0x188)](Boolean)),_0x50f44f=_0x4acb7c?new Set([..._0x4acb7c][_0x1159bc(0x170)](_0x2a00b0=>_0x2a00b0[_0x1159bc(0x15c)]())[_0x1159bc(0x188)](Boolean)):undefined,_0x5d299d=[];for(const _0x5ba3cd of[_0x3bda8f[_0x1159bc(0x155)],_0x3bda8f[_0x1159bc(0x16c)]]){for(const _0x4ce98e of managedAppSkillLinkPaths(_0x5ba3cd,_0x57da9e)){const _0x166fc7=basename(_0x4ce98e)[_0x1159bc(0x17a)]((_0x57da9e+'--')[_0x1159bc(0x15e)]);if(_0x50f44f&&!_0x50f44f['has'](_0x166fc7))continue;if(_0x2ba1c8[_0x1159bc(0x162)](_0x166fc7))continue;_0x5d299d['push'](removeManagedSkillLink(_0x4ce98e,_0x3bda8f['managedRoot']));}}return _0x5d299d;}export function pruneStaleRuntimeSkillCache(_0x47a9a3,_0x395583={}){const _0x2c02fe=a98_0x24b1,_0x2c0ba1=new Set([..._0x47a9a3[_0x2c02fe(0x159)]][_0x2c02fe(0x170)](_0x62640c=>_0x62640c['trim']())[_0x2c02fe(0x188)](Boolean)),_0x2d919f=_0x47a9a3[_0x2c02fe(0x173)]?new Set([..._0x47a9a3['pruneSkillCodes']]['map'](_0x51e245=>_0x51e245[_0x2c02fe(0x15c)]())[_0x2c02fe(0x188)](Boolean)):undefined,_0xecd13b=_0x47a9a3[_0x2c02fe(0x15a)]??[_0x2c02fe(0x158),'company'],_0x2993f0=resolve(getRuntimeSkillCacheRoot(_0x47a9a3[_0x2c02fe(0x15d)],_0x47a9a3[_0x2c02fe(0x17c)],_0x395583),safePathSegment(_0x47a9a3[_0x2c02fe(0x180)],_0x2c02fe(0x180))),_0x2fa1a6=[];for(const _0x597cf1 of _0xecd13b){const _0x505018=resolve(_0x2993f0,_0x597cf1);if(!existsSync(_0x505018))continue;for(const _0x51ca10 of readdirSync(_0x505018,{'withFileTypes':!![]})){if(!_0x51ca10[_0x2c02fe(0x17b)]())continue;const _0x18e42d=_0x51ca10[_0x2c02fe(0x169)];if(_0x2d919f&&!_0x2d919f[_0x2c02fe(0x162)](_0x18e42d))continue;if(_0x2c0ba1[_0x2c02fe(0x162)](_0x18e42d))continue;const _0x3d5cb6=resolve(_0x505018,_0x18e42d),_0x5cc98c=readMetadataIfPresent(resolve(_0x3d5cb6,METADATA_FILE));if(_0x5cc98c?.[_0x2c02fe(0x180)]!==_0x47a9a3[_0x2c02fe(0x180)]||_0x5cc98c[_0x2c02fe(0x161)]!==_0x597cf1||_0x5cc98c[_0x2c02fe(0x164)]!==_0x18e42d){_0x2fa1a6[_0x2c02fe(0x178)]({'path':_0x3d5cb6,'action':'skipped','reason':_0x2c02fe(0x171)});continue;}removeSync(_0x3d5cb6),_0x2fa1a6['push']({'path':_0x3d5cb6,'action':_0x2c02fe(0x172)});}}return _0x2fa1a6;}export function linkGlobalRuntimeSkills(_0x5aa720,_0x575db1={}){const _0x3388c8=a98_0x24b1,_0x3103e3=resolveSkillSyncPaths(_0x575db1),_0x152510=[];for(const _0x1e5e78 of _0x5aa720){if(_0x1e5e78[_0x3388c8(0x161)]!==_0x3388c8(0x185))throw CliErrors[_0x3388c8(0x189)](_0x3388c8(0x16e)+_0x1e5e78[_0x3388c8(0x161)]);const _0x5c692b=requireSkillCode(_0x1e5e78[_0x3388c8(0x182)]),_0x5497b4=copyManagedSkillDirectory(_0x1e5e78[_0x3388c8(0x154)],resolve(_0x3103e3['agentsSkillsDir'],_0x5c692b));_0x152510['push']({..._0x5497b4,'contentHash':_0x1e5e78[_0x3388c8(0x157)]});}return _0x152510;}function ensureManagedSymlink(_0x5920e8,_0x2b34df,_0x44839c){const _0x3e9c0a=a98_0x24b1;mkdirSync(dirname(_0x5920e8),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x5920e8)||isDanglingSymlink(_0x5920e8)){const _0x557c78=lstatSync(_0x5920e8);if(!_0x557c78[_0x3e9c0a(0x187)]())throw CliErrors[_0x3e9c0a(0x189)](_0x3e9c0a(0x163)+_0x5920e8);const _0x17bd87=resolveSymlinkTarget(_0x5920e8);if(!isPathInside(realOrResolved(_0x17bd87),realOrResolved(_0x44839c)))throw CliErrors[_0x3e9c0a(0x189)](_0x3e9c0a(0x175)+_0x5920e8);if(realOrResolved(_0x17bd87)===realOrResolved(_0x2b34df))return{'path':_0x5920e8,'target':_0x2b34df,'action':_0x3e9c0a(0x18a)};return unlinkSync(_0x5920e8),symlinkSync(_0x2b34df,_0x5920e8,_0x3e9c0a(0x154)),{'path':_0x5920e8,'target':_0x2b34df,'action':_0x3e9c0a(0x15f)};}return symlinkSync(_0x2b34df,_0x5920e8,'dir'),{'path':_0x5920e8,'target':_0x2b34df,'action':'created'};}function managedAppSkillLinkPaths(_0x108e3a,_0x400618){const _0x78dfe1=a98_0x24b1;if(!existsSync(_0x108e3a))return[];const _0x47654b=_0x400618+'--';return readdirSync(_0x108e3a,{'withFileTypes':!![]})[_0x78dfe1(0x188)](_0x10c8fb=>_0x10c8fb['name'][_0x78dfe1(0x17e)](_0x47654b))[_0x78dfe1(0x170)](_0x497f5e=>resolve(_0x108e3a,_0x497f5e[_0x78dfe1(0x169)]));}function removeManagedSkillLink(_0xaafe52,_0x4472ab){const _0xc5f225=a98_0x24b1,_0x321bcb=lstatIfPresent(_0xaafe52);if(!_0x321bcb?.['isSymbolicLink']())return{'path':_0xaafe52,'action':_0xc5f225(0x186),'reason':_0xc5f225(0x181)};const _0x395961=resolveSymlinkTarget(_0xaafe52);if(!isPathInside(realOrResolved(_0x395961),realOrResolved(_0x4472ab)))return{'path':_0xaafe52,'action':_0xc5f225(0x186),'reason':_0xc5f225(0x16b)};return unlinkSync(_0xaafe52),{'path':_0xaafe52,'action':_0xc5f225(0x172)};}export function copyManagedSkillDirectory(_0x450b65,_0x3a2eb4){const _0x1ebd26=a98_0x24b1,_0x421921=resolve(_0x3a2eb4,METADATA_FILE),_0x100b92=existsSync(_0x3a2eb4);if(_0x100b92){const _0x3f1f6f=lstatSync(_0x3a2eb4);if(_0x3f1f6f[_0x1ebd26(0x187)]())throw CliErrors[_0x1ebd26(0x189)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x3a2eb4);if(!_0x3f1f6f[_0x1ebd26(0x17b)]())throw CliErrors[_0x1ebd26(0x189)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x3a2eb4);const _0x3dd10e=readMetadataIfPresent(_0x421921);if(_0x3dd10e?.[_0x1ebd26(0x161)]!==_0x1ebd26(0x185))throw CliErrors['validation'](_0x1ebd26(0x179)+_0x3a2eb4);}ensureDirSync(dirname(_0x3a2eb4));const _0x574b15=_0x100b92?readMetadataIfPresent(_0x421921)?.[_0x1ebd26(0x157)]:undefined,_0x13a086=readMetadataIfPresent(resolve(_0x450b65,METADATA_FILE))?.[_0x1ebd26(0x157)];return _0x100b92&&removeSync(_0x3a2eb4),copySkillDirectory(_0x450b65,_0x3a2eb4),{'path':_0x3a2eb4,'target':_0x450b65,'action':!_0x100b92?_0x1ebd26(0x167):_0x574b15===_0x13a086?_0x1ebd26(0x18a):_0x1ebd26(0x15f)};}function a98_0x24b1(_0x55bd9b,_0x3609ce){_0x55bd9b=_0x55bd9b-0x154;const _0x292c96=a98_0x292c();let _0x24b141=_0x292c96[_0x55bd9b];return _0x24b141;}function copySkillDirectory(_0x4652fb,_0x536fe3){copySync(_0x4652fb,_0x536fe3,{'dereference':![],'overwrite':!![],'filter'(_0x373428){const _0x211527=a98_0x24b1;if(lstatSync(_0x373428)[_0x211527(0x187)]())throw CliErrors['validation'](_0x211527(0x183)+_0x373428);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xc328d8,_0x27e46a){const _0x5a4965=a99_0x2424,_0x111e53=_0xc328d8();while(!![]){try{const _0x3ec993=-parseInt(_0x5a4965(0x1bd))/0x1+parseInt(_0x5a4965(0x1b0))/0x2+parseInt(_0x5a4965(0x19e))/0x3*(-parseInt(_0x5a4965(0x1b6))/0x4)+-parseInt(_0x5a4965(0x1a3))/0x5*(parseInt(_0x5a4965(0x1a4))/0x6)+parseInt(_0x5a4965(0x1bb))/0x7*(-parseInt(_0x5a4965(0x1a6))/0x8)+parseInt(_0x5a4965(0x198))/0x9*(-parseInt(_0x5a4965(0x1a5))/0xa)+parseInt(_0x5a4965(0x19d))/0xb;if(_0x3ec993===_0x27e46a)break;else _0x111e53['push'](_0x111e53['shift']());}catch(_0x4f17c2){_0x111e53['push'](_0x111e53['shift']());}}}(a99_0x2bcb,0xb7723));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,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';function a99_0x2424(_0x20a067,_0x3d8ca7){_0x20a067=_0x20a067-0x193;const _0x2bcb44=a99_0x2bcb();let _0x242436=_0x2bcb44[_0x20a067];return _0x242436;}export function listLocalRuntimeSkills(_0x3e1187,_0x336c0d={}){const _0x335b82=a99_0x2424,_0x145b78=safePathSegment(_0x3e1187[_0x335b82(0x19a)],_0x335b82(0x19a)),_0x1f1e74=normalizeRuntimeSkillScopes(_0x3e1187['scopes']),_0x2fed5f=new Set(_0x1f1e74),_0x3cf04a=_0x3e1187[_0x335b82(0x1b7)]?.[_0x335b82(0x1a1)](),_0x3e34a5=new Map(),_0x317998=resolve(getRuntimeSkillCacheRoot(_0x3e1187[_0x335b82(0x1b1)],_0x3e1187[_0x335b82(0x1ba)],_0x336c0d),_0x145b78);for(const _0x32c735 of _0x1f1e74){for(const _0x28ae99 of localSkillEntryDirs(resolve(_0x317998,_0x32c735))){collectLocalRuntimeSkill(_0x3e34a5,_0x28ae99,{'appCode':_0x145b78,'scopes':_0x2fed5f,'code':_0x3cf04a,'source':_0x335b82(0x1a9)});}}const _0x791653=resolveSkillSyncPaths(_0x336c0d);for(const _0x491abe of[_0x791653[_0x335b82(0x195)],_0x791653[_0x335b82(0x1ac)]]){for(const _0x596785 of localSkillLinkCandidates(_0x491abe,_0x145b78,_0x2fed5f)){collectLocalRuntimeSkill(_0x3e34a5,_0x596785,{'appCode':_0x145b78,'scopes':_0x2fed5f,'code':_0x3cf04a,'source':_0x335b82(0x1ab),'linkedPath':_0x596785});}}return Array[_0x335b82(0x19c)](_0x3e34a5[_0x335b82(0x1be)]())['sort'](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x4315c4){const _0xce5608=a99_0x2424;if(!existsSync(_0x4315c4))return[];return readdirSync(_0x4315c4,{'withFileTypes':!![]})[_0xce5608(0x1b5)](_0x52ab2c=>_0x52ab2c[_0xce5608(0x194)]()||_0x52ab2c[_0xce5608(0x196)]())[_0xce5608(0x19b)](_0x555c55=>resolve(_0x4315c4,_0x555c55[_0xce5608(0x1a2)]));}function a99_0x2bcb(){const _0x3bbebe=['code','startsWith','get','accessKey','7mmnWcT','scopes','852437lpVgUU','values','includes','isDirectory','agentsSkillsDir','isSymbolicLink','skillMdPath','135uxMAQw','linkedPaths','appCode','map','from','45854523suqKUF','239007GJiauK','push','set','trim','name','875395cmPaQE','12QZfQcv','911030QpOAeK','3785384jhUulq','local','dir','cache','metadataPath','link','claudeSkillsDir','linkedPath','localeCompare','tags','365596dnCQTI','env','scope','builtin','skillCode','filter','28hBBIZu'];a99_0x2bcb=function(){return _0x3bbebe;};return a99_0x2bcb();}function localSkillLinkCandidates(_0x461332,_0x5d203e,_0x2520ed){const _0x242b82=a99_0x2424;if(!existsSync(_0x461332))return[];const _0x3c2b93=_0x5d203e+'--';return readdirSync(_0x461332,{'withFileTypes':!![]})[_0x242b82(0x1b5)](_0x282c78=>_0x282c78['isDirectory']()||_0x282c78['isSymbolicLink']())[_0x242b82(0x1b5)](_0x378324=>_0x378324[_0x242b82(0x1a2)][_0x242b82(0x1b8)](_0x3c2b93)||_0x2520ed['has'](_0x242b82(0x1b3)))['map'](_0x83fd9=>resolve(_0x461332,_0x83fd9[_0x242b82(0x1a2)]));}function collectLocalRuntimeSkill(_0x597f98,_0x2ed043,_0x367dae){const _0x338f92=a99_0x2424,_0x2200e4=resolve(_0x2ed043,METADATA_FILE),_0x3474c7=readMetadataIfPresent(_0x2200e4);if(!_0x3474c7)return;if(_0x3474c7['appCode']!==_0x367dae['appCode'])return;if(!isRuntimeSkillScope(_0x3474c7[_0x338f92(0x1b2)])||!_0x367dae[_0x338f92(0x1bc)]['has'](_0x3474c7[_0x338f92(0x1b2)]))return;const _0x3bb511=_0x3474c7[_0x338f92(0x1b4)]?.['trim']();if(!_0x3bb511)return;if(_0x367dae[_0x338f92(0x1b7)]&&_0x3bb511!==_0x367dae['code'])return;const _0x13da60=_0x3474c7[_0x338f92(0x1b2)]+':'+_0x3bb511,_0x47c09a=_0x367dae[_0x338f92(0x1ad)]?[_0x367dae['linkedPath']]:[],_0x1573e0=_0x597f98[_0x338f92(0x1b9)](_0x13da60);if(_0x1573e0){_0x367dae['source']==='cache'&&(_0x1573e0['dir']=_0x2ed043,_0x1573e0['cacheDir']=_0x2ed043,_0x1573e0[_0x338f92(0x197)]=resolve(_0x2ed043,SKILL_FILE),_0x1573e0[_0x338f92(0x1aa)]=_0x2200e4);for(const _0x995324 of _0x47c09a){!_0x1573e0[_0x338f92(0x199)][_0x338f92(0x193)](_0x995324)&&_0x1573e0[_0x338f92(0x199)][_0x338f92(0x19f)](_0x995324);}_0x1573e0[_0x338f92(0x199)]['sort']();return;}_0x597f98[_0x338f92(0x1a0)](_0x13da60,{..._0x3474c7,'tags':Array['isArray'](_0x3474c7['tags'])?_0x3474c7[_0x338f92(0x1af)]:[],'scope':_0x3474c7[_0x338f92(0x1b2)],'source':_0x338f92(0x1a7),'dir':_0x2ed043,'cacheDir':_0x367dae['source']===_0x338f92(0x1a9)?_0x2ed043:undefined,'skillMdPath':resolve(_0x2ed043,SKILL_FILE),'metadataPath':_0x2200e4,'linkedPaths':_0x47c09a});}function compareLocalRuntimeSkills(_0x2ef0c9,_0xe85c27){const _0x563a30=a99_0x2424,_0x4310c3={'personal':0x0,'company':0x1,'builtin':0x2};return _0x4310c3[_0x2ef0c9['scope']]-_0x4310c3[_0xe85c27['scope']]||_0x2ef0c9[_0x563a30(0x1b4)][_0x563a30(0x1ae)](_0xe85c27[_0x563a30(0x1b4)])||_0x2ef0c9[_0x563a30(0x1a8)][_0x563a30(0x1ae)](_0xe85c27[_0x563a30(0x1a8)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3db9de,_0x378d02){const _0x40d078=a100_0x132f,_0x4532ef=_0x3db9de();while(!![]){try{const _0x4306dd=parseInt(_0x40d078(0x134))/0x1*(parseInt(_0x40d078(0x112))/0x2)+-parseInt(_0x40d078(0x113))/0x3+parseInt(_0x40d078(0x12e))/0x4+parseInt(_0x40d078(0x124))/0x5+parseInt(_0x40d078(0x123))/0x6*(parseInt(_0x40d078(0x117))/0x7)+-parseInt(_0x40d078(0x114))/0x8*(parseInt(_0x40d078(0x115))/0x9)+-parseInt(_0x40d078(0x10f))/0xa*(-parseInt(_0x40d078(0x11f))/0xb);if(_0x4306dd===_0x378d02)break;else _0x4532ef['push'](_0x4532ef['shift']());}catch(_0x4fd976){_0x4532ef['push'](_0x4532ef['shift']());}}}(a100_0x4705,0xd94d8));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(_0x25e8f7){const _0x4c4643=a100_0x132f;return _0x25e8f7[_0x4c4643(0x120)]??Buffer[_0x4c4643(0x12c)](_0x25e8f7['content']??'',_0x4c4643(0x127));}export function fileText(_0x53b211){const _0x247cfe=a100_0x132f;return fileContent(_0x53b211)[_0x247cfe(0x10e)]('utf8');}export function normalizeLocalFiles(_0x363a4d){const _0x2bae80=a100_0x132f;if(!Array[_0x2bae80(0x138)](_0x363a4d)||_0x363a4d[_0x2bae80(0x13a)]===0x0)return[];const _0x25b007=new Map();for(const _0x3bd052 of _0x363a4d){if(!_0x3bd052||typeof _0x3bd052!==_0x2bae80(0x122)||typeof _0x3bd052['path']!==_0x2bae80(0x132))throw CliErrors[_0x2bae80(0x128)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x3850a1=normalizeSkillRelativePath(_0x3bd052[_0x2bae80(0x131)]);if(_0x25b007[_0x2bae80(0x135)](_0x3850a1))throw CliErrors['validation'](_0x2bae80(0x12b)+_0x3850a1);if(_0x3bd052[_0x2bae80(0x120)]!==undefined&&!Buffer[_0x2bae80(0x11d)](_0x3bd052['bytes']))throw CliErrors[_0x2bae80(0x128)](_0x2bae80(0x110)+_0x3850a1);if(_0x3bd052['bytes']===undefined&&typeof _0x3bd052[_0x2bae80(0x139)]!=='string')throw CliErrors[_0x2bae80(0x128)](_0x2bae80(0x12d)+_0x3850a1);const _0x26d206=fileContent(_0x3bd052);_0x25b007[_0x2bae80(0x12a)](_0x3850a1,{'path':_0x3850a1,'bytes':_0x26d206});}return Array[_0x2bae80(0x12c)](_0x25b007[_0x2bae80(0x130)]())['sort'](compareSkillFiles);}function a100_0x4705(){const _0x364829=['Duplicate\x20Skill\x20file\x20path:\x20','from','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','643732BVxesm','localeCompare','values','path','string','test','1619791OpemSh','has','Skill\x20file\x20path\x20must\x20be\x20text.','includes','isArray','content','length','split','compare','toLowerCase','isDirectory','toString','3297040GrABjh','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','isSymbolicLink','2BmvrvG','3309339KePOeM','72tFalUj','1626597cxshkK','sort','7BefhCQ','size','startsWith','sha256','isSafeInteger','Skill\x20file\x20size\x20is\x20invalid:\x20','isBuffer','push','33KhzZNv','bytes','Unsafe\x20Skill\x20file\x20path:\x20','object','2885712kXMcSh','1844970DWyUHj','name','replace','utf8','validation','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','set'];a100_0x4705=function(){return _0x364829;};return a100_0x4705();}export function normalizeManifestFiles(_0x42eff4){const _0x2afb19=a100_0x132f;if(!Array['isArray'](_0x42eff4)||_0x42eff4[_0x2afb19(0x13a)]===0x0)return[];const _0x5cde7d=new Map();for(const _0x1a542e of _0x42eff4){if(!_0x1a542e||typeof _0x1a542e!==_0x2afb19(0x122)||typeof _0x1a542e['path']!==_0x2afb19(0x132))throw CliErrors[_0x2afb19(0x128)](_0x2afb19(0x136));const _0x2270ba=normalizeSkillRelativePath(_0x1a542e[_0x2afb19(0x131)]);if(_0x5cde7d[_0x2afb19(0x135)](_0x2270ba))throw CliErrors[_0x2afb19(0x128)](_0x2afb19(0x12b)+_0x2270ba);if(!isSha256Hex(_0x1a542e[_0x2afb19(0x11a)]))throw CliErrors[_0x2afb19(0x128)]('Skill\x20file\x20sha256\x20is\x20invalid:\x20'+_0x2270ba);if(!Number[_0x2afb19(0x11b)](_0x1a542e[_0x2afb19(0x118)])||_0x1a542e[_0x2afb19(0x118)]<0x0)throw CliErrors[_0x2afb19(0x128)](_0x2afb19(0x11c)+_0x2270ba);_0x5cde7d[_0x2afb19(0x12a)](_0x2270ba,{'path':_0x2270ba,'sha256':_0x1a542e[_0x2afb19(0x11a)][_0x2afb19(0x13d)](),'size':_0x1a542e[_0x2afb19(0x118)]});}return Array['from'](_0x5cde7d['values']())[_0x2afb19(0x116)](compareSkillFiles);}export function scanSkillDirectory(_0x144e27){const _0x350e00=realpathSync(_0x144e27),_0x59d327=[];function _0x28a8b9(_0x73c0d1){const _0x4029d5=a100_0x132f,_0xde56c1=readdirSync(_0x73c0d1,{'withFileTypes':!![]})[_0x4029d5(0x116)]((_0xae9e8e,_0x3ce783)=>_0xae9e8e[_0x4029d5(0x125)][_0x4029d5(0x12f)](_0x3ce783[_0x4029d5(0x125)]));for(const _0x3e2053 of _0xde56c1){if(_0x3e2053['isDirectory']()&&IGNORED_DIR_NAMES[_0x4029d5(0x135)](_0x3e2053[_0x4029d5(0x125)]))continue;if(IGNORED_FILE_NAMES[_0x4029d5(0x135)](_0x3e2053[_0x4029d5(0x125)]))continue;const _0x29f5fd=resolve(_0x73c0d1,_0x3e2053['name']);if(_0x3e2053[_0x4029d5(0x111)]())throw CliErrors[_0x4029d5(0x128)](_0x4029d5(0x129)+_0x29f5fd);const _0x41a49c=toPosixPath(relative(_0x350e00,_0x29f5fd));if(_0x3e2053[_0x4029d5(0x10d)]()){_0x28a8b9(_0x29f5fd);continue;}if(!_0x3e2053['isFile']())continue;validateSkillRelativePath(_0x41a49c);const _0x3c9193=readFileSync(_0x29f5fd);_0x59d327[_0x4029d5(0x11e)]({'path':_0x41a49c,'bytes':_0x3c9193});}}return _0x28a8b9(_0x350e00),normalizeLocalFiles(_0x59d327);}export function compareSkillFiles(_0x4867bd,_0x24421c){const _0x383d64=a100_0x132f;if(_0x4867bd[_0x383d64(0x131)]===SKILL_FILE)return _0x24421c[_0x383d64(0x131)]===SKILL_FILE?0x0:-0x1;if(_0x24421c[_0x383d64(0x131)]===SKILL_FILE)return 0x1;return Buffer[_0x383d64(0x13c)](Buffer[_0x383d64(0x12c)](_0x4867bd[_0x383d64(0x131)],_0x383d64(0x127)),Buffer[_0x383d64(0x12c)](_0x24421c[_0x383d64(0x131)],'utf8'));}function a100_0x132f(_0x1bc1b2,_0x118546){_0x1bc1b2=_0x1bc1b2-0x10d;const _0x47057c=a100_0x4705();let _0x132f11=_0x47057c[_0x1bc1b2];return _0x132f11;}export function normalizeSkillRelativePath(_0x579b44){const _0x5bc2f9=toPosixPath(_0x579b44['trim']());return validateSkillRelativePath(_0x5bc2f9),_0x5bc2f9;}export function validateSkillRelativePath(_0xb3720e){const _0x343298=a100_0x132f;if(!_0xb3720e||_0xb3720e[_0x343298(0x119)]('/')||_0xb3720e[_0x343298(0x137)]('//'))throw CliErrors[_0x343298(0x128)](_0x343298(0x121)+_0xb3720e);for(const _0x14aeb8 of _0xb3720e[_0x343298(0x13b)]('/')){if(!_0x14aeb8||_0x14aeb8==='.'||_0x14aeb8==='..')throw CliErrors['validation'](_0x343298(0x121)+_0xb3720e);}}export function toPosixPath(_0x4e9e83){const _0x58a068=a100_0x132f;return _0x4e9e83[_0x58a068(0x126)](/\\/g,'/');}export function isSha256Hex(_0x45a8d1){const _0x2a68b6=a100_0x132f;return typeof _0x45a8d1==='string'&&/^[a-fA-F0-9]{64}$/[_0x2a68b6(0x133)](_0x45a8d1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfd62c0,_0x547550){const _0x459a48=a101_0x2574,_0xc892e6=_0xfd62c0();while(!![]){try{const _0x4d6138=-parseInt(_0x459a48(0x135))/0x1*(-parseInt(_0x459a48(0x122))/0x2)+-parseInt(_0x459a48(0x146))/0x3*(parseInt(_0x459a48(0x128))/0x4)+-parseInt(_0x459a48(0x14d))/0x5*(-parseInt(_0x459a48(0x151))/0x6)+parseInt(_0x459a48(0x125))/0x7*(parseInt(_0x459a48(0x130))/0x8)+-parseInt(_0x459a48(0x138))/0x9+parseInt(_0x459a48(0x12b))/0xa+parseInt(_0x459a48(0x129))/0xb;if(_0x4d6138===_0x547550)break;else _0xc892e6['push'](_0xc892e6['shift']());}catch(_0x254cdf){_0xc892e6['push'](_0xc892e6['shift']());}}}(a101_0x4e6c,0xc45da));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isMap,parseDocument}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';function a101_0x4e6c(){const _0x5576ac=['length','test','description','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','env','map','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','39yOzkGU','entries','appCode','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','stringify','contents','displayName','365DWgUtx','---\x0a','trimEnd','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','17634ldOVhr','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','skillName','name','displayName:\x20','89428XvYYHO','force','utf8','7CZXjVm','pulledAt','Managed\x20file\x20was\x20removed\x20locally:\x20','274136pNcDWQ','8420302JEThje','Runtime\x20Skill\x20package\x20is\x20missing\x20','2456850OgBdDl','replace','trim','validation','path','3669576MaFiPi','.\x20Changed\x20file:\x20','fileHashes','isFile','keys','19ohCMfB','has','---','7548489SrrMlw','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','accessKey','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','contentHash','filter','join'];a101_0x4e6c=function(){return _0x5576ac;};return a101_0x4e6c();}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_0x2574(_0x45ac48,_0xd008a9){_0x45ac48=_0x45ac48-0x122;const _0x4e6c47=a101_0x4e6c();let _0x2574a1=_0x4e6c47[_0x45ac48];return _0x2574a1;}import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x578b3f,_0x5da9fa,_0xf7cb6){const _0x20a466=a101_0x2574,_0x3f2681=requireSkillCode(_0x578b3f),_0xebf01c=requirePackageBytes(_0x3f2681,_0xf7cb6['packageBytes']),_0x35a0c9=extractDownloadedPackage(_0xebf01c),_0xc3e2e3=_0x35a0c9['find'](_0xe9716e=>_0xe9716e[_0x20a466(0x12f)]===SKILL_FILE);if(!_0xc3e2e3)throw CliErrors[_0x20a466(0x12e)](_0x20a466(0x12a)+SKILL_FILE+':\x20'+_0x3f2681);const _0x41c142=withMaterializedSkillFrontmatter(_0x35a0c9,_0x578b3f,_0x3f2681),_0x5e645a=_0x41c142['find'](_0x12fea2=>_0x12fea2[_0x20a466(0x12f)]===SKILL_FILE),_0x2aaffc=fileText(_0x5e645a),_0x35d3fe=getRuntimeSkillDir(_0xf7cb6[_0x20a466(0x143)],_0xf7cb6[_0x20a466(0x13a)],_0xf7cb6[_0x20a466(0x148)],_0x5da9fa,_0x3f2681,_0xf7cb6['paths']),_0x4efa52=resolve(_0x35d3fe,SKILL_FILE),_0x41c741=resolve(_0x35d3fe,METADATA_FILE),_0xb56850=contentHash(_0x2aaffc),_0x14c6f3=readMetadataIfPresent(_0x41c741)?.[_0x20a466(0x132)];ensurePulledFilesCanBeOverwritten(_0x35d3fe,_0x41c741,_0x41c142,_0xf7cb6[_0x20a466(0x123)]===!![]),mkdirSync(_0x35d3fe,{'recursive':!![],'mode':0x1c0});const _0x448e0b=existsSync(_0x4efa52)?readFileSync(_0x4efa52,_0x20a466(0x124)):undefined;return materializeFiles(_0x35d3fe,_0x41c142),removeStaleManagedFiles(_0x35d3fe,_0x14c6f3,_0x41c142),writeJsonAtomic(_0x41c741,buildMetadata(_0x578b3f,_0x5da9fa,_0xf7cb6['appCode'],_0xb56850,_0xf7cb6[_0x20a466(0x126)],_0x41c142,_0xebf01c)),{'skill':_0x578b3f,'scope':_0x5da9fa,'dir':_0x35d3fe,'skillMdPath':_0x4efa52,'metadataPath':_0x41c741,'contentHash':_0xb56850,'changed':_0x448e0b!==_0x2aaffc};}function withMaterializedSkillFrontmatter(_0x94878,_0x4e753c,_0x1487f6){const _0x50ef1d=a101_0x2574,_0x3a90e8=skillDisplayName(_0x4e753c,_0x1487f6),_0xa8bcd2=_0x4e753c[_0x50ef1d(0x141)]?.[_0x50ef1d(0x12d)]()||_0x3a90e8||_0x1487f6;return normalizeLocalFiles(_0x94878)[_0x50ef1d(0x144)](_0x442413=>{const _0x236550=_0x50ef1d,_0x5f49d7=fileText(_0x442413);if(_0x442413[_0x236550(0x12f)]!==SKILL_FILE)return _0x442413;if(hasYamlFrontmatter(_0x5f49d7))return{'path':_0x442413[_0x236550(0x12f)],'content':withSyncedDisplayName(_0x5f49d7,_0x3a90e8)};return{'path':_0x442413[_0x236550(0x12f)],'content':prependSkillFrontmatter(_0x5f49d7,{'name':_0x1487f6,'displayName':_0x3a90e8,'description':_0xa8bcd2})};});}function hasYamlFrontmatter(_0x1dfe65){const _0x194c97=a101_0x2574;return/^\uFEFF?---\s*\r?\n/[_0x194c97(0x140)](_0x1dfe65);}function prependSkillFrontmatter(_0x594806,_0x29596c){const _0x420185=a101_0x2574,_0x27f504=_0x594806['replace'](/^\uFEFF/,'');return[_0x420185(0x137),'name:\x20'+yamlString(_0x29596c[_0x420185(0x154)]),_0x29596c[_0x420185(0x14c)]?_0x420185(0x155)+yamlString(_0x29596c['displayName']):undefined,'description:\x20'+yamlString(_0x29596c[_0x420185(0x141)]),_0x420185(0x137),'',_0x27f504][_0x420185(0x13d)](_0x33b628=>_0x33b628!==undefined)[_0x420185(0x13e)]('\x0a');}function yamlString(_0x210c83){const _0x10f518=a101_0x2574;return JSON[_0x10f518(0x14a)](_0x210c83[_0x10f518(0x12c)](/\r/g,'')[_0x10f518(0x12d)]());}function skillDisplayName(_0x4fb34a,_0x14e962){const _0x5395f5=a101_0x2574,_0x58e0e4=_0x4fb34a[_0x5395f5(0x153)]?.['trim']();return _0x58e0e4||_0x14e962;}function withSyncedDisplayName(_0x183e80,_0x1142af){const _0x328b53=a101_0x2574,_0x141a77=_0x183e80['match'](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x141a77)return _0x183e80;const _0x40f9f8=_0x141a77[0x1]??'',_0x5d6ff5=_0x141a77[0x2]??'',_0x3a8209=parseDocument(_0x5d6ff5);if(_0x3a8209['errors'][_0x328b53(0x13f)]>0x0||!isMap(_0x3a8209[_0x328b53(0x14b)]))return _0x183e80;if(_0x1142af)_0x3a8209['set'](_0x328b53(0x14c),_0x1142af);else{if(_0x3a8209[_0x328b53(0x136)](_0x328b53(0x14c)))_0x3a8209['delete'](_0x328b53(0x14c));else return _0x183e80;}const _0x351611=String(_0x3a8209)[_0x328b53(0x14f)](),_0x21ef65=_0x183e80['slice'](_0x141a77[0x0][_0x328b53(0x13f)])['replace'](/^\r?\n/,'');return _0x40f9f8+_0x328b53(0x14e)+_0x351611+'\x0a---\x0a\x0a'+_0x21ef65;}function ensurePulledFilesCanBeOverwritten(_0x11d500,_0x3cd022,_0x23724e,_0x23749b){const _0x17b40e=a101_0x2574;if(_0x23749b||!existsSync(_0x3cd022))return;const _0x564942=readMetadataIfPresent(_0x3cd022);if(!_0x564942)return;const _0x15f658=_0x564942[_0x17b40e(0x132)]&&Object['keys'](_0x564942[_0x17b40e(0x132)])['length']>0x0?_0x564942[_0x17b40e(0x132)]:undefined;if(_0x15f658)for(const [_0x2d76cc,_0xa85584]of Object[_0x17b40e(0x147)](_0x15f658)){const _0x147b79=resolveManagedFilePath(_0x11d500,_0x2d76cc);if(!existsSync(_0x147b79))throw CliErrors[_0x17b40e(0x12e)](_0x17b40e(0x150)+_0x11d500,_0x17b40e(0x127)+_0x2d76cc);const _0x3ba555=lstatSync(_0x147b79);if(!_0x3ba555[_0x17b40e(0x133)]())throw CliErrors[_0x17b40e(0x12e)](_0x17b40e(0x150)+_0x11d500,_0x17b40e(0x149)+_0x2d76cc);const _0x1f16f0=bufferSha256(readFileSync(_0x147b79));if(_0x1f16f0!==_0xa85584)throw CliErrors[_0x17b40e(0x12e)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x11d500+_0x17b40e(0x131)+_0x2d76cc,_0x17b40e(0x139)+_0x2d76cc);}else{const _0x2d032a=resolve(_0x11d500,SKILL_FILE);if(existsSync(_0x2d032a)&&_0x564942[_0x17b40e(0x13c)]){const _0x4b15c3=contentHash(readFileSync(_0x2d032a,'utf8'));if(_0x4b15c3!==_0x564942[_0x17b40e(0x13c)])throw CliErrors['validation'](_0x17b40e(0x145)+_0x2d032a,_0x17b40e(0x152));}}for(const _0x594323 of normalizeLocalFiles(_0x23724e)){if(_0x15f658?.[_0x594323[_0x17b40e(0x12f)]])continue;if(!_0x15f658&&_0x594323[_0x17b40e(0x12f)]===SKILL_FILE)continue;const _0x595ccc=resolveManagedFilePath(_0x11d500,_0x594323['path']);if(!existsSync(_0x595ccc))continue;const _0x58d4e0=lstatSync(_0x595ccc);if(!_0x58d4e0[_0x17b40e(0x133)]())throw CliErrors[_0x17b40e(0x12e)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x11d500,_0x17b40e(0x142)+_0x594323[_0x17b40e(0x12f)]);const _0x58c9ad=bufferSha256(readFileSync(_0x595ccc));if(_0x58c9ad!==fileHash(_0x594323))throw CliErrors[_0x17b40e(0x12e)](_0x17b40e(0x150)+_0x11d500,_0x17b40e(0x13b)+_0x594323[_0x17b40e(0x12f)]);}}function materializeFiles(_0x1ff89e,_0x4448f0){const _0x393df2=a101_0x2574;for(const _0x5e6e51 of normalizeLocalFiles(_0x4448f0)){const _0x247103=resolveManagedFilePath(_0x1ff89e,_0x5e6e51[_0x393df2(0x12f)]);mkdirSync(dirname(_0x247103),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x247103,fileContent(_0x5e6e51),0x180);}}function removeStaleManagedFiles(_0xe5fc02,_0x151d6d,_0x201b0c){const _0x4dfa80=a101_0x2574;if(!_0x151d6d)return;const _0x5cfc4e=new Set(normalizeLocalFiles(_0x201b0c)[_0x4dfa80(0x144)](_0x180087=>_0x180087['path']));for(const _0x5bc467 of Object[_0x4dfa80(0x134)](_0x151d6d)){if(_0x5cfc4e[_0x4dfa80(0x136)](_0x5bc467))continue;const _0x56228a=resolveManagedFilePath(_0xe5fc02,_0x5bc467);existsSync(_0x56228a)&&lstatSync(_0x56228a)[_0x4dfa80(0x133)]()&&rmSync(_0x56228a,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55e4b5,_0x13a10e){const _0x3ed626=a102_0x692e,_0xbfc815=_0x55e4b5();while(!![]){try{const _0x2f0df1=parseInt(_0x3ed626(0x9a))/0x1+parseInt(_0x3ed626(0xa2))/0x2*(parseInt(_0x3ed626(0x94))/0x3)+parseInt(_0x3ed626(0x8f))/0x4+parseInt(_0x3ed626(0xa1))/0x5*(parseInt(_0x3ed626(0x9c))/0x6)+-parseInt(_0x3ed626(0x98))/0x7*(parseInt(_0x3ed626(0x88))/0x8)+-parseInt(_0x3ed626(0x86))/0x9*(parseInt(_0x3ed626(0x85))/0xa)+parseInt(_0x3ed626(0xa6))/0xb*(-parseInt(_0x3ed626(0x87))/0xc);if(_0x2f0df1===_0x13a10e)break;else _0xbfc815['push'](_0xbfc815['shift']());}catch(_0x129784){_0xbfc815['push'](_0xbfc815['shift']());}}}(a102_0x4a61,0x5f311));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a102_0x4a61(){const _0x23f54e=['13196kWycKd','version','Invalid\x20','map','491557YZOdrF','isArray','personal','10kVNHLM','6425883sZLqDo','108uOukgc','32rHVZLV','zipSha256','fromEntries','skillName','path','parse','sourceSessionId','2815084QSJVDe','files','string','trim','tenantCode','351JwhjXK','manifest','length','zipSize','593278wxOzIE','forkedFromSkillId','287718amhWdm','skillCode','81636FAkyww','object','utf8','status','validation','30eOaIcG'];a102_0x4a61=function(){return _0x23f54e;};return a102_0x4a61();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x464be1,_0xf1a61b,_0x439260,_0x27ddca,_0x29a842,_0x38c0e0,_0xb3d680){const _0x27fb5d=a102_0x692e,_0x4c85cf=_0x38c0e0?normalizeLocalFiles(_0x38c0e0):[],_0x2c3f45=!_0xb3d680&&_0x4c85cf[_0x27fb5d(0x96)]>0x0?buildSkillPackage(_0x4c85cf):undefined,_0x27c030=_0xb3d680?bufferSha256(_0xb3d680):_0x2c3f45?.['manifest'][_0x27fb5d(0x89)],_0x1be8ea=_0xb3d680?.[_0x27fb5d(0x96)]??_0x2c3f45?.[_0x27fb5d(0x95)][_0x27fb5d(0x97)],_0x872a4=_0x4c85cf[_0x27fb5d(0x96)]>0x0?Object[_0x27fb5d(0x8a)](_0x4c85cf[_0x27fb5d(0xa5)](_0x14d172=>[_0x14d172[_0x27fb5d(0x8c)],fileHash(_0x14d172)])):undefined;return{'schemaVersion':_0x4c85cf[_0x27fb5d(0x96)]>0x0?0x2:0x1,'id':_0x464be1['id'],'appCode':_0x439260,'skillCode':requireSkillCode(_0x464be1),'skillName':_0x464be1[_0x27fb5d(0x8b)],'description':_0x464be1['description'],'scope':_0xf1a61b,'readonly':_0xf1a61b!==_0x27fb5d(0x84)||_0x464be1['readonly']===!![],'tenantCode':_0x464be1[_0x27fb5d(0x93)],'userId':_0x464be1['userId'],'version':_0x464be1[_0x27fb5d(0xa3)],'status':_0x464be1[_0x27fb5d(0x9f)],'tags':Array['isArray'](_0x464be1['tags'])?_0x464be1['tags']:[],'hasUpstreamUpdate':_0x464be1['hasUpstreamUpdate'],'forkedFromSkillId':_0x464be1[_0x27fb5d(0x99)],'forkedFromVersion':_0x464be1['forkedFromVersion'],'sourceSessionId':_0x464be1[_0x27fb5d(0x8e)],'contentHash':_0x27ddca,'fileHashes':_0x872a4,'treeHash':_0x4c85cf[_0x27fb5d(0x96)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x4c85cf)):undefined,'ossPath':remoteManifestOssPath(_0x464be1[_0x27fb5d(0x90)]),'zipSha256':_0x27c030,'zipSize':_0x1be8ea,'files':_0x4c85cf[_0x27fb5d(0x96)]>0x0?_0x4c85cf['map'](_0x1a44a4=>({'path':_0x1a44a4['path'],'hash':fileHash(_0x1a44a4),'size':fileContent(_0x1a44a4)[_0x27fb5d(0x96)]})):undefined,'pulledAt':_0x29a842??new Date()['toISOString']()};}function a102_0x692e(_0x946f24,_0x1740bd){_0x946f24=_0x946f24-0x83;const _0x4a6166=a102_0x4a61();let _0x692e16=_0x4a6166[_0x946f24];return _0x692e16;}export function requireSkillCode(_0x31cd58){const _0x31178d=a102_0x692e,_0x26852a=_0x31cd58[_0x31178d(0x9b)]?.[_0x31178d(0x92)]();if(!_0x26852a)throw CliErrors[_0x31178d(0xa0)]('Runtime\x20Skill\x20is\x20missing\x20skillCode.');return _0x26852a;}export function readMetadataIfPresent(_0x4aa514){const _0x22b2ac=a102_0x692e;if(!existsSync(_0x4aa514))return undefined;try{const _0x2b9bfc=JSON[_0x22b2ac(0x8d)](readFileSync(_0x4aa514,_0x22b2ac(0x9e)));return _0x2b9bfc;}catch{throw CliErrors['validation'](_0x22b2ac(0xa4)+METADATA_FILE+':\x20'+_0x4aa514);}}function remoteManifestOssPath(_0x1ab7f8){const _0xdd549c=a102_0x692e;if(!_0x1ab7f8||typeof _0x1ab7f8!==_0xdd549c(0x9d)||Array[_0xdd549c(0x83)](_0x1ab7f8))return undefined;const _0x337447=_0x1ab7f8['ossPath'];return typeof _0x337447===_0xdd549c(0x91)&&_0x337447[_0xdd549c(0x92)]()?_0x337447['trim']():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2fd316,_0x168a56){const _0x186200=a103_0x4d0f,_0x1c4d6e=_0x2fd316();while(!![]){try{const _0x321218=-parseInt(_0x186200(0x17a))/0x1+parseInt(_0x186200(0x17b))/0x2*(-parseInt(_0x186200(0x174))/0x3)+parseInt(_0x186200(0x173))/0x4*(parseInt(_0x186200(0x179))/0x5)+-parseInt(_0x186200(0x170))/0x6*(-parseInt(_0x186200(0x163))/0x7)+parseInt(_0x186200(0x166))/0x8+parseInt(_0x186200(0x16d))/0x9+-parseInt(_0x186200(0x172))/0xa*(parseInt(_0x186200(0x167))/0xb);if(_0x321218===_0x168a56)break;else _0x1c4d6e['push'](_0x1c4d6e['shift']());}catch(_0x34f8e2){_0x1c4d6e['push'](_0x1c4d6e['shift']());}}}(a103_0xf31f,0x81add));function a103_0xf31f(){const _0x4a79ac=['claudeSkillsDir','cache','SKILL_ROOT','7777395jDibFF','homeDirName','CLAUDE_SKILL_ROOT','1032sKwERu','.agents','6369470fgppwR','6512SJvVvF','6tGqBXs','homeDir','agentsSkillsDir','appCode','cacheRoot','560yytnmt','239292nrTRcq','137726WcCnAe','Unsafe\x20','.claude','includes','5362HNdIMJ','skills','trim','2935096ouktcE','11FLLEPv','\x20for\x20local\x20path:\x20','skillCode'];a103_0xf31f=function(){return _0x4a79ac;};return a103_0xf31f();}function a103_0x4d0f(_0x23aa34,_0x2cf64e){_0x23aa34=_0x23aa34-0x160;const _0xf31f3b=a103_0xf31f();let _0x4d0fff=_0xf31f3b[_0x23aa34];return _0x4d0fff;}import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0xac9a05={}){const _0x233223=a103_0x4d0f,_0x140ac9=_0xac9a05[_0x233223(0x175)]??homedir(),_0x416503=resolve(_0x140ac9,PRODUCT_CONFIG[_0x233223(0x16e)],_0x233223(0x16b)),_0x1a4752=trimmedEnv(_0x233223(0x16c)),_0x2cecda=trimmedEnv(_0x233223(0x16f));return{'homeDir':_0x140ac9,'cacheRoot':_0x416503,'managedRoot':resolve(_0x140ac9,PRODUCT_CONFIG[_0x233223(0x16e)]),'agentsSkillsDir':_0xac9a05[_0x233223(0x176)]??_0x1a4752??resolve(_0x140ac9,_0x233223(0x171),_0x233223(0x164)),'claudeSkillsDir':_0xac9a05[_0x233223(0x16a)]??_0x2cecda??resolve(_0x140ac9,_0x233223(0x161),'skills')};}export function getRuntimeSkillCacheRoot(_0x36c125,_0x1121b6,_0x9c1f78={}){const _0x1f7627=a103_0x4d0f,_0x2ad41e=resolveSkillSyncPaths(_0x9c1f78);return resolve(_0x2ad41e[_0x1f7627(0x178)],_0x36c125,fingerprintAccessKey(_0x1121b6),_0x1f7627(0x164));}export function getRuntimeSkillDir(_0x426908,_0x3d65c7,_0x4eb2ce,_0x1ba61e,_0x5ca416,_0x4fba3e={}){const _0x27e98e=a103_0x4d0f;return resolve(getRuntimeSkillCacheRoot(_0x426908,_0x3d65c7,_0x4fba3e),safePathSegment(_0x4eb2ce,_0x27e98e(0x177)),_0x1ba61e,safePathSegment(_0x5ca416,_0x27e98e(0x169)));}export function safePathSegment(_0x3e59df,_0x519644='path\x20segment'){const _0x2768a7=a103_0x4d0f;if(!_0x3e59df||_0x3e59df[_0x2768a7(0x162)]('/')||_0x3e59df[_0x2768a7(0x162)]('\x5c')||_0x3e59df[_0x2768a7(0x162)]('..'))throw CliErrors['validation'](_0x2768a7(0x160)+_0x519644+_0x2768a7(0x168)+_0x3e59df);return _0x3e59df;}function trimmedEnv(_0x3bf285){const _0x186566=a103_0x4d0f,_0x507307=productEnv(_0x3bf285)?.[_0x186566(0x165)]();return _0x507307?_0x507307:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x23b98d,_0x1fc2e6){const _0x2375e9=a104_0x3204,_0x4e05f3=_0x23b98d();while(!![]){try{const _0x8c1406=parseInt(_0x2375e9(0x218))/0x1*(parseInt(_0x2375e9(0x207))/0x2)+-parseInt(_0x2375e9(0x1df))/0x3*(-parseInt(_0x2375e9(0x212))/0x4)+parseInt(_0x2375e9(0x20a))/0x5+parseInt(_0x2375e9(0x1fd))/0x6+parseInt(_0x2375e9(0x1e1))/0x7*(parseInt(_0x2375e9(0x1f5))/0x8)+parseInt(_0x2375e9(0x1f1))/0x9+-parseInt(_0x2375e9(0x1e6))/0xa;if(_0x8c1406===_0x1fc2e6)break;else _0x4e05f3['push'](_0x4e05f3['shift']());}catch(_0x360705){_0x4e05f3['push'](_0x4e05f3['shift']());}}}(a104_0xea7c,0xd0fa4));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x382d26}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(_0x3637cf,_0x50e04d,_0x2d2e00={}){const _0x33a3ea=a104_0x3204,_0x49e4d0=resolvePushDirectoryRoot(_0x3637cf),_0x3bba77=readPushMetadataIfPresent(resolve(_0x49e4d0,METADATA_FILE),{'ignoreInvalidMetadata':_0x2d2e00[_0x33a3ea(0x1e7)]});if(_0x3bba77?.[_0x33a3ea(0x1f8)]&&_0x3bba77['appCode']!==_0x50e04d&&!_0x2d2e00[_0x33a3ea(0x1dd)]&&!_0x2d2e00[_0x33a3ea(0x1da)])throw CliErrors[_0x33a3ea(0x1dc)]('Skill\x20metadata\x20appCode\x20\x22'+_0x3bba77['appCode']+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x50e04d+'\x22.');const _0x558095=resolvePushSkillCode(_0x49e4d0,_0x50e04d,_0x3bba77,_0x2d2e00);if(!_0x558095)throw CliErrors[_0x33a3ea(0x1dc)](_0x33a3ea(0x1d8)+SKILL_FILE+',\x20'+METADATA_FILE+_0x33a3ea(0x1e5));return{'dir':_0x49e4d0,'skillCode':_0x558095,'metadata':_0x3bba77};}export function readPushDirectory(_0x219f3b,_0x34c946,_0x3a4c2a={}){const _0x21c071=a104_0x3204,_0x398974=resolvePushDirectoryIdentity(_0x219f3b,_0x34c946,_0x3a4c2a),_0x368532=_0x398974[_0x21c071(0x211)],_0x54602a=resolve(_0x368532,SKILL_FILE);if(!existsSync(_0x54602a)||!lstatSync(_0x54602a)[_0x21c071(0x203)]())throw CliErrors[_0x21c071(0x1dc)](_0x21c071(0x1d9)+SKILL_FILE+':\x20'+_0x54602a);const _0x553741=_0x398974[_0x21c071(0x20c)],_0x594104=_0x3a4c2a[_0x21c071(0x210)]??_0x21c071(0x1f6);if(!_0x3a4c2a[_0x21c071(0x201)]&&_0x553741?.[_0x21c071(0x217)]===_0x21c071(0x208))throw CliErrors[_0x21c071(0x1dc)](_0x21c071(0x216)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x553741[_0x21c071(0x217)]+'\x22.');if(!_0x3a4c2a[_0x21c071(0x201)]&&_0x594104==='personal'&&_0x553741?.['scope']&&_0x553741['scope']!=='personal')throw CliErrors[_0x21c071(0x1dc)](_0x21c071(0x20d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x553741['scope']+'\x22.',_0x21c071(0x1d7)+_0x368532+_0x21c071(0x1f4));const _0x5f4b4f=scanSkillDirectory(_0x368532),_0x5837be=buildSkillPackage(_0x5f4b4f),_0x3ed09a=readFileSync(_0x54602a,'utf8'),_0x5f25af=_0x398974[_0x21c071(0x1e8)],_0x4130a9=_0x3a4c2a['ignoreMetadataForPayload']?undefined:_0x553741,_0x59eda6=readSkillDisplayName(_0x3ed09a);return{'skillCode':_0x5f25af,'metadata':_0x553741,'frontmatterDisplayName':_0x59eda6,'input':{'skillCode':_0x5f25af,'skillName':_0x59eda6??_0x4130a9?.[_0x21c071(0x1eb)],'description':_0x4130a9?.[_0x21c071(0x1e4)],'content':_0x3ed09a,'files':_0x5837be[_0x21c071(0x20b)],'packageBase64':_0x5837be[_0x21c071(0x1f2)],'tags':_0x4130a9?.[_0x21c071(0x1d6)],'version':_0x4130a9?.[_0x21c071(0x1fb)],'sourceSessionId':_0x4130a9?.[_0x21c071(0x1e9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x5909e1,_0x21a9ed,_0x334ad0,_0xfbb909={}){const _0x94e640=a104_0x3204,_0x12846b=resolvePushDirectoryRoot(_0x5909e1),_0x4c36f3=readPushMetadataIfPresent(resolve(_0x12846b,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x101d6b=requireRemoteScope(_0x21a9ed),_0x5a35b8=readLocalSkillContent(_0x12846b),_0x159f46={..._0x21a9ed,'appCode':_0x21a9ed[_0x94e640(0x1f8)]??_0x334ad0,'skillName':_0x21a9ed[_0x94e640(0x1eb)]??_0x4c36f3?.[_0x94e640(0x1eb)],'description':_0x21a9ed[_0x94e640(0x1e4)]??_0x4c36f3?.['description'],'tags':Array['isArray'](_0x21a9ed[_0x94e640(0x1d6)])?_0x21a9ed[_0x94e640(0x1d6)]:_0x4c36f3?.[_0x94e640(0x1d6)],'sourceSessionId':_0x21a9ed[_0x94e640(0x1e9)]??_0x4c36f3?.[_0x94e640(0x1e9)],'content':_0x21a9ed['content']??_0x5a35b8},_0x691ddc=buildMetadata(_0x159f46,_0x101d6b,_0x334ad0,contentHash(_0x5a35b8),_0xfbb909[_0x94e640(0x214)]);writeJsonAtomic(resolve(_0x12846b,METADATA_FILE),_0x691ddc);}function a104_0xea7c(){const _0x3d672f=['8372601ehkrzQ','packageBase64','displayName','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','120ICSMiw','personal','length','appCode','startsWith','some','version','pushedAt','4187118TgaktJ','isSymbolicLink','toLowerCase','string','ignoreMetadataScope','Remote\x20Skill\x20','isFile','company','ignoreMetadataSkillCode','files','678228OHYnpL','builtin','number','2200510Jsxzrk','manifest','metadata','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','Skill\x20directory\x20not\x20found:\x20','\x20name\x20for\x20SkillHub\x20slug\x20generation.','targetScope','dir','200300FVfcxM','replace','refreshedAt','match','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','scope','4JQtpts','tags','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Missing\x20','ignoreMetadataAppCodeMismatch','isDirectory','validation','allowAppCodeRetarget','find','57JIIINd','unknown','672371PGKEVP','name','utf8','description',',\x20or\x20directory\x20name.','49609480JcpNbj','ignoreInvalidMetadata','skillCode','sourceSessionId','boolean','skillName','trim','Invalid\x20','content','path','\x20has\x20unsupported\x20scope\x20\x22'];a104_0xea7c=function(){return _0x3d672f;};return a104_0xea7c();}export function recordPushedRuntimeSkill(_0x154378,_0x147934,_0x36098d,_0x305bbf={}){const _0x296d37=a104_0x3204,_0x442aeb=resolvePushDirectoryRoot(_0x154378),_0x5a9506=scanSkillDirectory(_0x442aeb),_0x34c23c=_0x5a9506[_0x296d37(0x1de)](_0x25679a=>_0x25679a[_0x296d37(0x1ef)]===SKILL_FILE),_0x268597=_0x34c23c?fileText(_0x34c23c):'',_0x5d67b6=tryNormalizePackageManifest(_0x147934['files']),_0x3d01d8={..._0x147934,'content':_0x147934[_0x296d37(0x1ee)]??_0x268597,'files':_0x5d67b6},_0xd4c245=_0x5d67b6?normalizeLocalFiles(_0x5a9506)['filter'](_0x55b2b9=>_0x5d67b6[_0x296d37(0x206)][_0x296d37(0x1fa)](_0x1f5216=>_0x1f5216['path']===_0x55b2b9[_0x296d37(0x1ef)])):undefined,_0x236fa0=buildMetadata(_0x3d01d8,_0x305bbf[_0x296d37(0x217)]??_0x296d37(0x1f6),_0x36098d,contentHash(_0x3d01d8[_0x296d37(0x1ee)]??''),_0x305bbf[_0x296d37(0x1fc)],_0xd4c245);writeJsonAtomic(resolve(_0x442aeb,METADATA_FILE),_0x236fa0);}function a104_0x3204(_0x1774b3,_0x39165c){_0x1774b3=_0x1774b3-0x1d6;const _0xea7c35=a104_0xea7c();let _0x320463=_0xea7c35[_0x1774b3];return _0x320463;}export function deriveSkillCodeFromDirectory(_0x41a39e,_0x4fc838){const _0x306245=a104_0x3204,_0x35df58=basename(resolve(_0x41a39e)),_0x743b4c=_0x4fc838+'--';return _0x35df58[_0x306245(0x1f9)](_0x743b4c)?_0x35df58['slice'](_0x743b4c[_0x306245(0x1f7)]):_0x35df58;}function resolvePushSkillCode(_0x21a5ee,_0x4547fe,_0x5c0c6e,_0x73f501){const _0x4366c8=a104_0x3204,_0x1dada1=deriveSkillCodeFromSkillFile(_0x21a5ee)||deriveSkillCodeFromDirectory(_0x21a5ee,_0x4547fe);if(_0x73f501[_0x4366c8(0x205)])return _0x1dada1;return _0x5c0c6e?.['skillCode']?.[_0x4366c8(0x1ec)]()||_0x1dada1;}function deriveSkillCodeFromSkillFile(_0x4354e3){const _0x146c42=a104_0x3204,_0xc4b382=resolve(_0x4354e3,SKILL_FILE);if(!existsSync(_0xc4b382)||!lstatSync(_0xc4b382)[_0x146c42(0x203)]())return undefined;const _0x10949c=readFileSync(_0xc4b382,_0x146c42(0x1e3)),_0x321d95=_0x10949c['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x321d95)return undefined;const _0x49673b=parseFrontmatterObject(_0x321d95[0x1]??''),_0x31287a=scalarToString(_0x49673b?.[_0x146c42(0x1e2)]);return _0x31287a?slugifySkillName(_0x31287a):undefined;}function readSkillDisplayName(_0x23bf23){const _0x43c3c8=a104_0x3204,_0x4bbfb6=_0x23bf23[_0x43c3c8(0x215)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bbfb6)return undefined;const _0x2ab141=parseFrontmatterObject(_0x4bbfb6[0x1]??'');return scalarToString(_0x2ab141?.[_0x43c3c8(0x1f3)]);}function slugifySkillName(_0x307341){const _0x3a5683=a104_0x3204,_0x1715ec=_0x307341[_0x3a5683(0x1ec)]()[_0x3a5683(0x1ff)]()[_0x3a5683(0x213)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3a5683(0x213)](/^-+/,'')[_0x3a5683(0x213)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x1715ec)throw CliErrors[_0x3a5683(0x1dc)](_0x3a5683(0x1ed)+SKILL_FILE+_0x3a5683(0x20f));return _0x1715ec;}function parseFrontmatterObject(_0x227d27){try{const _0x406d53=a104_0x382d26(_0x227d27);return _0x406d53&&typeof _0x406d53==='object'&&!Array['isArray'](_0x406d53)?_0x406d53:undefined;}catch{return undefined;}}function scalarToString(_0x1795a4){const _0x49611e=a104_0x3204;if(typeof _0x1795a4===_0x49611e(0x200))return _0x1795a4['trim']();if(typeof _0x1795a4===_0x49611e(0x209)||typeof _0x1795a4===_0x49611e(0x1ea))return String(_0x1795a4);return undefined;}function resolvePushDirectoryRoot(_0x46215c){const _0x25f6b5=a104_0x3204,_0x16359d=resolve(_0x46215c);if(!existsSync(_0x16359d))throw CliErrors['validation'](_0x25f6b5(0x20e)+_0x46215c);const _0x56ceb5=lstatSync(_0x16359d);if(_0x56ceb5[_0x25f6b5(0x1db)]())return _0x16359d;if(_0x56ceb5[_0x25f6b5(0x1fe)]()){const _0xff6ad9=realpathSync(_0x16359d);if(lstatSync(_0xff6ad9)[_0x25f6b5(0x1db)]())return _0xff6ad9;}throw CliErrors[_0x25f6b5(0x1dc)](_0x25f6b5(0x20e)+_0x46215c);}function requireRemoteScope(_0x102fad){const _0x353b2b=a104_0x3204;if(_0x102fad['scope']==='personal'||_0x102fad[_0x353b2b(0x217)]===_0x353b2b(0x204)||_0x102fad['scope']===_0x353b2b(0x208))return _0x102fad[_0x353b2b(0x217)];throw CliErrors[_0x353b2b(0x1dc)](_0x353b2b(0x202)+(_0x102fad['skillCode']||'(unknown)')+_0x353b2b(0x1f0)+(_0x102fad[_0x353b2b(0x217)]??_0x353b2b(0x1e0))+'\x22.');}function readLocalSkillContent(_0x3fc6be){const _0x395207=a104_0x3204,_0x71303f=resolve(_0x3fc6be,SKILL_FILE);return existsSync(_0x71303f)&&lstatSync(_0x71303f)[_0x395207(0x203)]()?readFileSync(_0x71303f,_0x395207(0x1e3)):'';}function readPushMetadataIfPresent(_0x3982a4,_0x469317={}){const _0x36bce3=a104_0x3204;try{return readMetadataIfPresent(_0x3982a4);}catch(_0x36d061){if(_0x469317[_0x36bce3(0x1e7)])return undefined;throw _0x36d061;}}
|
|
1
|
+
(function(_0x3243a1,_0x4e5ab9){const _0x21288a=a104_0x4c3f,_0x50ca7b=_0x3243a1();while(!![]){try{const _0x2b6d39=parseInt(_0x21288a(0xac))/0x1+parseInt(_0x21288a(0xa6))/0x2+parseInt(_0x21288a(0x7a))/0x3+-parseInt(_0x21288a(0x88))/0x4+parseInt(_0x21288a(0x89))/0x5*(-parseInt(_0x21288a(0xa7))/0x6)+parseInt(_0x21288a(0x8a))/0x7*(-parseInt(_0x21288a(0xb6))/0x8)+parseInt(_0x21288a(0xba))/0x9;if(_0x2b6d39===_0x4e5ab9)break;else _0x50ca7b['push'](_0x50ca7b['shift']());}catch(_0x3b06c5){_0x50ca7b['push'](_0x50ca7b['shift']());}}}(a104_0xd8fa,0xb85ee));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a104_0x30dbdf}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a104_0xd8fa(){const _0x1a9a7c=['ignoreMetadataSkillCode','string','refreshedAt','startsWith','some','skillName','ignoreMetadataScope','8MOqZcY','Invalid\x20','version','trim','4222386iOJMDj','ignoreInvalidMetadata','595338vLuKvE','find','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','description','replace','sourceSessionId','validation','object','company','slice','toLowerCase','ignoreMetadataAppCodeMismatch','content','\x20has\x20scope=\x22','2473984oRYVAS','1139955NdDRJk','6975255zIHflA','boolean','Skill\x20metadata\x20appCode\x20\x22','filter','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','\x20has\x20unsupported\x20scope\x20\x22','scope','isArray','displayName','skillCode','match','ignoreMetadataForPayload','\x20name\x20for\x20SkillHub\x20slug\x20generation.','isSymbolicLink','path','unknown','metadata','dir','name','allowAppCodeRetarget','Missing\x20','builtin','Remote\x20Skill\x20','appCode','personal','tags','Skill\x20directory\x20not\x20found:\x20','files','2889330PzHmui','12AfDfjM','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','utf8','number',',\x20or\x20directory\x20name.','713860WifGWc','targetScope','isFile'];a104_0xd8fa=function(){return _0x1a9a7c;};return a104_0xd8fa();}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(_0x28b57f,_0x34472a,_0x271008={}){const _0x466d91=a104_0x4c3f,_0x8123aa=resolvePushDirectoryRoot(_0x28b57f),_0x1435dd=readPushMetadataIfPresent(resolve(_0x8123aa,METADATA_FILE),{'ignoreInvalidMetadata':_0x271008[_0x466d91(0xbb)]});if(_0x1435dd?.[_0x466d91(0xa1)]&&_0x1435dd['appCode']!==_0x34472a&&!_0x271008[_0x466d91(0x9d)]&&!_0x271008[_0x466d91(0x85)])throw CliErrors[_0x466d91(0x80)](_0x466d91(0x8c)+_0x1435dd[_0x466d91(0xa1)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x34472a+'\x22.');const _0x29e543=resolvePushSkillCode(_0x8123aa,_0x34472a,_0x1435dd,_0x271008);if(!_0x29e543)throw CliErrors[_0x466d91(0x80)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x466d91(0xab));return{'dir':_0x8123aa,'skillCode':_0x29e543,'metadata':_0x1435dd};}export function readPushDirectory(_0x1e23de,_0x587443,_0x5e2501={}){const _0x485df3=a104_0x4c3f,_0x4b5b7c=resolvePushDirectoryIdentity(_0x1e23de,_0x587443,_0x5e2501),_0x5f0117=_0x4b5b7c[_0x485df3(0x9b)],_0x224759=resolve(_0x5f0117,SKILL_FILE);if(!existsSync(_0x224759)||!lstatSync(_0x224759)[_0x485df3(0xae)]())throw CliErrors[_0x485df3(0x80)](_0x485df3(0x9e)+SKILL_FILE+':\x20'+_0x224759);const _0x50b50d=_0x4b5b7c[_0x485df3(0x9a)],_0x193550=_0x5e2501[_0x485df3(0xad)]??'personal';if(!_0x5e2501[_0x485df3(0xb5)]&&_0x50b50d?.[_0x485df3(0x90)]===_0x485df3(0x9f))throw CliErrors[_0x485df3(0x80)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x485df3(0x87)+_0x50b50d[_0x485df3(0x90)]+'\x22.');if(!_0x5e2501['ignoreMetadataScope']&&_0x193550===_0x485df3(0xa2)&&_0x50b50d?.[_0x485df3(0x90)]&&_0x50b50d['scope']!=='personal')throw CliErrors[_0x485df3(0x80)](_0x485df3(0xa8)+METADATA_FILE+_0x485df3(0x87)+_0x50b50d[_0x485df3(0x90)]+'\x22.',_0x485df3(0x8e)+_0x5f0117+_0x485df3(0x7c));const _0x3d7a1f=scanSkillDirectory(_0x5f0117),_0x5c306d=buildSkillPackage(_0x3d7a1f),_0x511934=readFileSync(_0x224759,_0x485df3(0xa9)),_0x2261e8=_0x4b5b7c[_0x485df3(0x93)],_0x2a7c04=_0x5e2501[_0x485df3(0x95)]?undefined:_0x50b50d,_0x5876c7=readSkillDisplayName(_0x511934);return{'skillCode':_0x2261e8,'metadata':_0x50b50d,'frontmatterDisplayName':_0x5876c7,'input':{'skillCode':_0x2261e8,'skillName':_0x5876c7??_0x2a7c04?.[_0x485df3(0xb4)],'description':_0x2a7c04?.[_0x485df3(0x7d)],'content':_0x511934,'files':_0x5c306d['manifest'],'packageBase64':_0x5c306d['packageBase64'],'tags':_0x2a7c04?.[_0x485df3(0xa3)],'version':_0x2a7c04?.[_0x485df3(0xb8)],'sourceSessionId':_0x2a7c04?.[_0x485df3(0x7f)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x4e9238,_0x27bca5,_0x4254fe,_0x5a1276={}){const _0x2477c8=a104_0x4c3f,_0x358b2c=resolvePushDirectoryRoot(_0x4e9238),_0x455d58=readPushMetadataIfPresent(resolve(_0x358b2c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x35d69a=requireRemoteScope(_0x27bca5),_0x30d480=readLocalSkillContent(_0x358b2c),_0x1d8ac2={..._0x27bca5,'appCode':_0x27bca5[_0x2477c8(0xa1)]??_0x4254fe,'skillName':_0x27bca5[_0x2477c8(0xb4)]??_0x455d58?.[_0x2477c8(0xb4)],'description':_0x27bca5[_0x2477c8(0x7d)]??_0x455d58?.[_0x2477c8(0x7d)],'tags':Array[_0x2477c8(0x91)](_0x27bca5['tags'])?_0x27bca5[_0x2477c8(0xa3)]:_0x455d58?.[_0x2477c8(0xa3)],'sourceSessionId':_0x27bca5[_0x2477c8(0x7f)]??_0x455d58?.[_0x2477c8(0x7f)],'content':_0x27bca5[_0x2477c8(0x86)]??_0x30d480},_0x4253ef=buildMetadata(_0x1d8ac2,_0x35d69a,_0x4254fe,contentHash(_0x30d480),_0x5a1276[_0x2477c8(0xb1)]);writeJsonAtomic(resolve(_0x358b2c,METADATA_FILE),_0x4253ef);}export function recordPushedRuntimeSkill(_0x25bffd,_0x5d9de2,_0x3c3f45,_0xf89bc9={}){const _0x14dea5=a104_0x4c3f,_0x5b9e8c=resolvePushDirectoryRoot(_0x25bffd),_0x1eabb7=scanSkillDirectory(_0x5b9e8c),_0x27e626=_0x1eabb7[_0x14dea5(0x7b)](_0x4cf596=>_0x4cf596[_0x14dea5(0x98)]===SKILL_FILE),_0x6392d7=_0x27e626?fileText(_0x27e626):'',_0x386ac1=tryNormalizePackageManifest(_0x5d9de2[_0x14dea5(0xa5)]),_0x4590c6={..._0x5d9de2,'content':_0x5d9de2[_0x14dea5(0x86)]??_0x6392d7,'files':_0x386ac1},_0x1018c7=_0x386ac1?normalizeLocalFiles(_0x1eabb7)[_0x14dea5(0x8d)](_0xf7e7a6=>_0x386ac1[_0x14dea5(0xa5)][_0x14dea5(0xb3)](_0x4a2ddc=>_0x4a2ddc['path']===_0xf7e7a6[_0x14dea5(0x98)])):undefined,_0x47c4bb=buildMetadata(_0x4590c6,_0xf89bc9['scope']??_0x14dea5(0xa2),_0x3c3f45,contentHash(_0x4590c6['content']??''),_0xf89bc9['pushedAt'],_0x1018c7);writeJsonAtomic(resolve(_0x5b9e8c,METADATA_FILE),_0x47c4bb);}function a104_0x4c3f(_0x2cd1dc,_0x71a22){_0x2cd1dc=_0x2cd1dc-0x7a;const _0xd8faef=a104_0xd8fa();let _0x4c3f36=_0xd8faef[_0x2cd1dc];return _0x4c3f36;}export function deriveSkillCodeFromDirectory(_0xe5f48a,_0x54d469){const _0x12d1ea=a104_0x4c3f,_0x53be8e=basename(resolve(_0xe5f48a)),_0x1edb7a=_0x54d469+'--';return _0x53be8e[_0x12d1ea(0xb2)](_0x1edb7a)?_0x53be8e[_0x12d1ea(0x83)](_0x1edb7a['length']):_0x53be8e;}function resolvePushSkillCode(_0x265916,_0x3a0257,_0x592d4f,_0x5b44d0){const _0x374f19=a104_0x4c3f,_0x125a7a=deriveSkillCodeFromSkillFile(_0x265916)||deriveSkillCodeFromDirectory(_0x265916,_0x3a0257);if(_0x5b44d0[_0x374f19(0xaf)])return _0x125a7a;return _0x592d4f?.[_0x374f19(0x93)]?.[_0x374f19(0xb9)]()||_0x125a7a;}function deriveSkillCodeFromSkillFile(_0x512cf2){const _0x15ef38=a104_0x4c3f,_0x4aafba=resolve(_0x512cf2,SKILL_FILE);if(!existsSync(_0x4aafba)||!lstatSync(_0x4aafba)[_0x15ef38(0xae)]())return undefined;const _0x1572ee=readFileSync(_0x4aafba,_0x15ef38(0xa9)),_0x422297=_0x1572ee[_0x15ef38(0x94)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x422297)return undefined;const _0x4002e2=parseFrontmatterObject(_0x422297[0x1]??''),_0xf12b1=scalarToString(_0x4002e2?.[_0x15ef38(0x9c)]);return _0xf12b1?slugifySkillName(_0xf12b1):undefined;}function readSkillDisplayName(_0x256fc1){const _0x16d0b2=a104_0x4c3f,_0x5ade5d=_0x256fc1[_0x16d0b2(0x94)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5ade5d)return undefined;const _0x5e24bf=parseFrontmatterObject(_0x5ade5d[0x1]??'');return scalarToString(_0x5e24bf?.[_0x16d0b2(0x92)]);}function slugifySkillName(_0x1e92e7){const _0x143707=a104_0x4c3f,_0x34c568=_0x1e92e7[_0x143707(0xb9)]()[_0x143707(0x84)]()[_0x143707(0x7e)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x143707(0x7e)](/-+$/,'')[_0x143707(0x7e)](/-{2,}/g,'-');if(!_0x34c568)throw CliErrors['validation'](_0x143707(0xb7)+SKILL_FILE+_0x143707(0x96));return _0x34c568;}function parseFrontmatterObject(_0x1b9827){const _0x1b49ee=a104_0x4c3f;try{const _0x1128a9=a104_0x30dbdf(_0x1b9827);return _0x1128a9&&typeof _0x1128a9===_0x1b49ee(0x81)&&!Array['isArray'](_0x1128a9)?_0x1128a9:undefined;}catch{return undefined;}}function scalarToString(_0x5cc496){const _0x17c3a2=a104_0x4c3f;if(typeof _0x5cc496===_0x17c3a2(0xb0))return _0x5cc496[_0x17c3a2(0xb9)]();if(typeof _0x5cc496===_0x17c3a2(0xaa)||typeof _0x5cc496===_0x17c3a2(0x8b))return String(_0x5cc496);return undefined;}function resolvePushDirectoryRoot(_0x653b97){const _0x4d31f3=a104_0x4c3f,_0x2155d6=resolve(_0x653b97);if(!existsSync(_0x2155d6))throw CliErrors['validation'](_0x4d31f3(0xa4)+_0x653b97);const _0x438768=lstatSync(_0x2155d6);if(_0x438768['isDirectory']())return _0x2155d6;if(_0x438768[_0x4d31f3(0x97)]()){const _0x14fd04=realpathSync(_0x2155d6);if(lstatSync(_0x14fd04)['isDirectory']())return _0x14fd04;}throw CliErrors[_0x4d31f3(0x80)](_0x4d31f3(0xa4)+_0x653b97);}function requireRemoteScope(_0x306f64){const _0x477ca6=a104_0x4c3f;if(_0x306f64[_0x477ca6(0x90)]==='personal'||_0x306f64[_0x477ca6(0x90)]===_0x477ca6(0x82)||_0x306f64[_0x477ca6(0x90)]===_0x477ca6(0x9f))return _0x306f64[_0x477ca6(0x90)];throw CliErrors[_0x477ca6(0x80)](_0x477ca6(0xa0)+(_0x306f64['skillCode']||'(unknown)')+_0x477ca6(0x8f)+(_0x306f64[_0x477ca6(0x90)]??_0x477ca6(0x99))+'\x22.');}function readLocalSkillContent(_0x876abc){const _0x388d8e=a104_0x4c3f,_0x2f6859=resolve(_0x876abc,SKILL_FILE);return existsSync(_0x2f6859)&&lstatSync(_0x2f6859)[_0x388d8e(0xae)]()?readFileSync(_0x2f6859,_0x388d8e(0xa9)):'';}function readPushMetadataIfPresent(_0x750983,_0x5db845={}){try{return readMetadataIfPresent(_0x750983);}catch(_0x85a681){if(_0x5db845['ignoreInvalidMetadata'])return undefined;throw _0x85a681;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a105_0xaff0(_0x1cc63c,_0x5aed59){_0x1cc63c=_0x1cc63c-0x165;const _0x2c37f4=a105_0x2c37();let _0xaff0a0=_0x2c37f4[_0x1cc63c];return _0xaff0a0;}(function(_0x5f10b0,_0x3d4dd4){const _0x3527d9=a105_0xaff0,_0x108510=_0x5f10b0();while(!![]){try{const _0x292838=parseInt(_0x3527d9(0x16c))/0x1+-parseInt(_0x3527d9(0x16a))/0x2+-parseInt(_0x3527d9(0x168))/0x3+-parseInt(_0x3527d9(0x167))/0x4*(-parseInt(_0x3527d9(0x169))/0x5)+-parseInt(_0x3527d9(0x173))/0x6+-parseInt(_0x3527d9(0x16b))/0x7*(parseInt(_0x3527d9(0x16d))/0x8)+parseInt(_0x3527d9(0x166))/0x9;if(_0x292838===_0x3d4dd4)break;else _0x108510['push'](_0x108510['shift']());}catch(_0x5c02e5){_0x108510['push'](_0x108510['shift']());}}}(a105_0x2c37,0x48e69));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x4b0e60){const _0x5b8d94=a105_0xaff0,_0x57c612=_0x4b0e60&&_0x4b0e60[_0x5b8d94(0x171)]>0x0?_0x4b0e60:[_0x5b8d94(0x170),_0x5b8d94(0x165),_0x5b8d94(0x174)],_0x442a06=[];for(const _0x2ee47b of _0x57c612){if(!isRuntimeSkillScope(_0x2ee47b))throw CliErrors[_0x5b8d94(0x16e)](_0x5b8d94(0x172)+_0x2ee47b);!_0x442a06[_0x5b8d94(0x16f)](_0x2ee47b)&&_0x442a06['push'](_0x2ee47b);}return _0x442a06;}function a105_0x2c37(){const _0x273b85=['16SNlpdI','validation','includes','personal','length','Unsupported\x20runtime\x20Skill\x20scope:\x20','1828074GiEddr','builtin','company','12889071vGyqnx','51412buJqrw','1617870ptoqWA','45DiLZqJ','1030098MAlamc','31143FZFFxR','118721Womdbh'];a105_0x2c37=function(){return _0x273b85;};return a105_0x2c37();}export function isRuntimeSkillScope(_0xeb2d7d){const _0x40f9a4=a105_0xaff0;return _0xeb2d7d===_0x40f9a4(0x170)||_0xeb2d7d===_0x40f9a4(0x165)||_0xeb2d7d===_0x40f9a4(0x174);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a107_0x2783(){const _0x5437d9=['1138818cBDzIj','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','entries','1209656jHWelZ','33DAwuzD','40vCoeqh','sort','207796mHIUNq','endsWith','validation','map','557625TYCdBv','1629162kpzLdg','path','object','2661778wCJQEs','validation_error','133845QXeagv','name','code','from','1980-01-01T00:00:00.000Z','length','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a107_0x2783=function(){return _0x5437d9;};return a107_0x2783();}const a107_0x48c1f8=a107_0x5034;(function(_0x3f938c,_0x48a419){const _0x4896ec=a107_0x5034,_0x58080e=_0x3f938c();while(!![]){try{const _0x49623e=parseInt(_0x4896ec(0xbe))/0x1+parseInt(_0x4896ec(0xb0))/0x2+-parseInt(_0x4896ec(0xb1))/0x3*(-parseInt(_0x4896ec(0xb4))/0x4)+parseInt(_0x4896ec(0xb8))/0x5+parseInt(_0x4896ec(0xad))/0x6+-parseInt(_0x4896ec(0xbc))/0x7+parseInt(_0x4896ec(0xb2))/0x8*(-parseInt(_0x4896ec(0xb9))/0x9);if(_0x49623e===_0x48a419)break;else _0x58080e['push'](_0x58080e['shift']());}catch(_0x3599df){_0x58080e['push'](_0x58080e['shift']());}}}(a107_0x2783,0x4f9d0));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_0x48c1f8(0xc2));function a107_0x5034(_0x2f2738,_0x3bc293){_0x2f2738=_0x2f2738-0xab;const _0x27832d=a107_0x2783();let _0x5034bb=_0x27832d[_0x2f2738];return _0x5034bb;}export function createDeterministicZipPackage(_0x9f38a6){const _0x263ce6=a107_0x48c1f8,_0x2d7dd8={};for(const _0x4e3fa9 of normalizeLocalFiles(_0x9f38a6)){_0x2d7dd8[_0x4e3fa9[_0x263ce6(0xba)]]=fileContent(_0x4e3fa9);}return Buffer[_0x263ce6(0xc1)](zipSync(_0x2d7dd8,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x265250){const _0x9e5d3f=a107_0x48c1f8;if(_0x265250[_0x9e5d3f(0xab)]<0x16)throw CliErrors[_0x9e5d3f(0xb6)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x4d7a41;try{_0x4d7a41=unzipSync(_0x265250,{'filter'(_0x1bfe50){const _0x420c55=_0x9e5d3f,_0x2c4776=normalizeSkillRelativePath(_0x1bfe50[_0x420c55(0xbf)]);if(_0x2c4776[_0x420c55(0xb5)]('/'))throw CliErrors[_0x420c55(0xb6)](_0x420c55(0xac)+_0x2c4776);return!![];}});}catch(_0x51006a){if(isRuntimeSkillValidationError(_0x51006a))throw _0x51006a;throw CliErrors['validation'](_0x9e5d3f(0xae));}return Object[_0x9e5d3f(0xaf)](_0x4d7a41)[_0x9e5d3f(0xb7)](([_0x504b71,_0x3daa2b])=>({'path':normalizeSkillRelativePath(_0x504b71),'bytes':Buffer[_0x9e5d3f(0xc1)](_0x3daa2b)}))[_0x9e5d3f(0xb3)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x49efed){const _0x475776=a107_0x48c1f8;return typeof _0x49efed===_0x475776(0xbb)&&_0x49efed!==null&&_0x475776(0xc0)in _0x49efed&&_0x49efed[_0x475776(0xc0)]===_0x475776(0xbd);}
|