@lovrabet/lovrabet-cli 2.1.11 → 2.1.12
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 -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/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2cf2f8,_0x518bd4){const _0x5b5014=a90_0x51d2,_0x1c576d=_0x2cf2f8();while(!![]){try{const _0x24a160=-parseInt(_0x5b5014(0x147))/0x1*(parseInt(_0x5b5014(0x14e))/0x2)+-parseInt(_0x5b5014(0x14b))/0x3*(-parseInt(_0x5b5014(0x143))/0x4)+-parseInt(_0x5b5014(0x142))/0x5+-parseInt(_0x5b5014(0x140))/0x6+parseInt(_0x5b5014(0x14f))/0x7+-parseInt(_0x5b5014(0x14c))/0x8*(parseInt(_0x5b5014(0x14a))/0x9)+-parseInt(_0x5b5014(0x145))/0xa*(-parseInt(_0x5b5014(0x141))/0xb);if(_0x24a160===_0x518bd4)break;else _0x1c576d['push'](_0x1c576d['shift']());}catch(_0x36629d){_0x1c576d['push'](_0x1c576d['shift']());}}}(a90_0x5146,0x835b7));import{buildSchemaPayload as a90_0x10a228}from'@lovrabet/cli-framework';import{buildAllFlags}from'../framework/build-all-flags.js';import{findDynamicServiceDefinition,listDynamicServiceEntries}from'../commands/service/dynamic.js';import{insertDynamicServicesAfterServiceTree}from'../framework/service-order.js';function a90_0x5146(){const _0x3bd8e4=['13036AoTTuB','filter','10161070CqpPdv','none','362qLfmbI','requiresAuth','commands','1063467LyNRUv','978NdcfnL','32fekpQn','../commands/registry.js','1124WeDNhd','181328aPVMlN','service','map','1766880ByCfXK','11DaqzcG','2979150BSsKDD'];a90_0x5146=function(){return _0x3bd8e4;};return a90_0x5146();}function a90_0x51d2(_0x4c17c8,_0x1dbaaf){_0x4c17c8=_0x4c17c8-0x13f;const _0x51460d=a90_0x5146();let _0x51d2d0=_0x51460d[_0x4c17c8];return _0x51d2d0;}import{CLI_BIN_NAME,CLI_DISPLAY_NAME,GLOBAL_FLAGS}from'../constant/cli.js';import{getCliGitCommit,getCliVersion}from'../utils/version.js';export async function buildSchemaPayload(){const _0x515c50=a90_0x51d2,{serviceRegistry:_0x5d0fee,findDefinition:_0x36ec54}=await import(_0x515c50(0x14d)),_0x5a5da1=new Set(_0x5d0fee['map'](_0x59920b=>_0x59920b[_0x515c50(0x150)])),_0x126903=listDynamicServiceEntries()[_0x515c50(0x144)](_0x1959f6=>!_0x5a5da1['has'](_0x1959f6[_0x515c50(0x150)])),_0x1f1174=a90_0x10a228({'cliBinName':CLI_BIN_NAME,'cliDisplayName':CLI_DISPLAY_NAME,'cliVersion':getCliVersion(),'gitCommit':getCliGitCommit(),'globalFlags':GLOBAL_FLAGS,'serviceRegistry':insertDynamicServicesAfterServiceTree(_0x5d0fee,_0x126903),'buildAllFlags':buildAllFlags,'findDefinition':(_0x7ed9c8,_0x21f3f2)=>_0x36ec54(_0x7ed9c8,_0x21f3f2)??findDynamicServiceDefinition(_0x7ed9c8,_0x21f3f2)});return normalizeSchemaPayload(_0x1f1174);}function normalizeSchemaPayload(_0x18bf37){const _0x4abca1=a90_0x51d2;return{..._0x18bf37,'schemaVersion':0x2,'services':_0x18bf37['services'][_0x4abca1(0x13f)](_0x1015a4=>({..._0x1015a4,'commands':_0x1015a4[_0x4abca1(0x149)][_0x4abca1(0x13f)](normalizeSchemaCommand)}))};}function normalizeSchemaCommand(_0x26a058){const _0x501c4f=a90_0x51d2,_0x5effcd=_0x26a058;return{..._0x26a058,'auth':_0x5effcd['auth']??(_0x26a058[_0x501c4f(0x148)]?'required':_0x501c4f(0x146))};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x5ea3(){const _0x4ee781=['findIndex','99882FSZwHE','10LCTWRv','2505613RFUIDK','50wfBLNW','13264wPrkqc','99026qtsRsV','service','243PqRbjV','2692oFBXZq','length','290880BynjSA','1fYZBJK','39TAuAzs','161RGbAjh','slice','1951956iREWun'];a91_0x5ea3=function(){return _0x4ee781;};return a91_0x5ea3();}function a91_0x4cfe(_0x3a05c0,_0x3669c6){_0x3a05c0=_0x3a05c0-0x1d9;const _0x5ea3cd=a91_0x5ea3();let _0x4cfe94=_0x5ea3cd[_0x3a05c0];return _0x4cfe94;}(function(_0x3d62b9,_0x237cd0){const _0x1701bc=a91_0x4cfe,_0x252683=_0x3d62b9();while(!![]){try{const _0x43fff1=-parseInt(_0x1701bc(0x1dd))/0x1*(-parseInt(_0x1701bc(0x1e8))/0x2)+parseInt(_0x1701bc(0x1d9))/0x3*(-parseInt(_0x1701bc(0x1da))/0x4)+-parseInt(_0x1701bc(0x1e6))/0x5*(-parseInt(_0x1701bc(0x1dc))/0x6)+-parseInt(_0x1701bc(0x1df))/0x7*(-parseInt(_0x1701bc(0x1e7))/0x8)+parseInt(_0x1701bc(0x1e3))/0x9*(parseInt(_0x1701bc(0x1e4))/0xa)+parseInt(_0x1701bc(0x1e5))/0xb+-parseInt(_0x1701bc(0x1e1))/0xc*(parseInt(_0x1701bc(0x1de))/0xd);if(_0x43fff1===_0x237cd0)break;else _0x252683['push'](_0x252683['shift']());}catch(_0x3e4c51){_0x252683['push'](_0x252683['shift']());}}}(a91_0x5ea3,0x41a1a));export function insertDynamicServicesAfterServiceTree(_0x57ae00,_0x1cc212){const _0x30ff3c=a91_0x4cfe;if(_0x1cc212[_0x30ff3c(0x1db)]===0x0)return[..._0x57ae00];const _0x5bea6c=_0x57ae00[_0x30ff3c(0x1e2)](_0x8a72c=>_0x8a72c[_0x30ff3c(0x1e9)]===_0x30ff3c(0x1e9));if(_0x5bea6c<0x0)return[..._0x57ae00,..._0x1cc212];return[..._0x57ae00['slice'](0x0,_0x5bea6c+0x1),..._0x1cc212,..._0x57ae00[_0x30ff3c(0x1e0)](_0x5bea6c+0x1)];}
|
package/lib/framework/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a92_0xfd64(_0x3be190,_0x113385){_0x3be190=_0x3be190-0x138;var _0x5cf98f=a92_0x5cf9();var _0xfd64c5=_0x5cf98f[_0x3be190];return _0xfd64c5;}function a92_0x5cf9(){var _0x3855f3=['316468JUtloz','1096670dvwbzC','443093VQOdpQ','5kiKyoR','4579028nRPxJy','11202795cQluvV','12CODHCQ','517qacCNQ','12jNtLvr','4574480BilyOS','712378bCVpYt'];a92_0x5cf9=function(){return _0x3855f3;};return a92_0x5cf9();}(function(_0x418fce,_0x7f3433){var _0x5b0959=a92_0xfd64,_0x20d59d=_0x418fce();while(!![]){try{var _0x1246ba=-parseInt(_0x5b0959(0x13a))/0x1+-parseInt(_0x5b0959(0x13b))/0x2*(parseInt(_0x5b0959(0x138))/0x3)+-parseInt(_0x5b0959(0x13f))/0x4*(parseInt(_0x5b0959(0x13e))/0x5)+parseInt(_0x5b0959(0x141))/0x6*(-parseInt(_0x5b0959(0x13d))/0x7)+-parseInt(_0x5b0959(0x139))/0x8+-parseInt(_0x5b0959(0x140))/0x9+parseInt(_0x5b0959(0x13c))/0xa*(parseInt(_0x5b0959(0x142))/0xb);if(_0x1246ba===_0x7f3433)break;else _0x20d59d['push'](_0x20d59d['shift']());}catch(_0x93439c){_0x20d59d['push'](_0x20d59d['shift']());}}}(a92_0x5cf9,0xb00db));export{riskLevelOrder,normalizeLegacyOutputFormat,isValidFormat}from'@lovrabet/cli-framework';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x49d26c=a93_0x300e;(function(_0x2a1cbe,_0x64decf){const _0x15d89a=a93_0x300e,_0x3d0a5e=_0x2a1cbe();while(!![]){try{const _0x186907=-parseInt(_0x15d89a(0x11f))/0x1*(parseInt(_0x15d89a(0x120))/0x2)+-parseInt(_0x15d89a(0x119))/0x3*(parseInt(_0x15d89a(0x116))/0x4)+parseInt(_0x15d89a(0x113))/0x5*(-parseInt(_0x15d89a(0x118))/0x6)+-parseInt(_0x15d89a(0x117))/0x7+-parseInt(_0x15d89a(0x11e))/0x8*(parseInt(_0x15d89a(0x11b))/0x9)+parseInt(_0x15d89a(0x11a))/0xa+parseInt(_0x15d89a(0x11c))/0xb*(parseInt(_0x15d89a(0x115))/0xc);if(_0x186907===_0x64decf)break;else _0x3d0a5e['push'](_0x3d0a5e['shift']());}catch(_0x36b32d){_0x3d0a5e['push'](_0x3d0a5e['shift']());}}}(a93_0x3f69,0x94fb9));function a93_0x300e(_0x523a45,_0x10628c){_0x523a45=_0x523a45-0x113;const _0x3f69b9=a93_0x3f69();let _0x300eb8=_0x3f69b9[_0x523a45];return _0x300eb8;}export const VERSION=a93_0x49d26c(0x11d);function a93_0x3f69(){const _0x5d1ced=['9jsDepx','7913660xYOEnj','30150OMzdVP','24735469yqCTfD','2.1.12','1992gOOoIK','41FKmgra','6956VTRLNk','2026-07-14T07:00:38.184Z','10VnOxDB','df44f0e','12GpxesM','278708dYDnhX','1050917nymHud','3281706zXVgBr'];a93_0x3f69=function(){return _0x5d1ced;};return a93_0x3f69();}export const GIT_TAG='v2.1.12-beta.1';export const GIT_COMMIT=a93_0x49d26c(0x114);export const BUILD_TIME=a93_0x49d26c(0x121);
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x57610e,_0x4e2574){const _0x5d5717=a94_0x4eac,_0x140d9c=_0x57610e();while(!![]){try{const _0x1e8f86=parseInt(_0x5d5717(0x1ab))/0x1+-parseInt(_0x5d5717(0x1ad))/0x2*(-parseInt(_0x5d5717(0x1a7))/0x3)+parseInt(_0x5d5717(0x1b5))/0x4*(-parseInt(_0x5d5717(0x1ac))/0x5)+parseInt(_0x5d5717(0x1aa))/0x6*(parseInt(_0x5d5717(0x1af))/0x7)+-parseInt(_0x5d5717(0x1a9))/0x8*(parseInt(_0x5d5717(0x1b0))/0x9)+-parseInt(_0x5d5717(0x1b1))/0xa+parseInt(_0x5d5717(0x1b2))/0xb;if(_0x1e8f86===_0x4e2574)break;else _0x140d9c['push'](_0x140d9c['shift']());}catch(_0x57a7b0){_0x140d9c['push'](_0x140d9c['shift']());}}}(a94_0x1858,0x7d4fc));import{jsx as a94_0x304bd1,jsxs as a94_0x210bad}from'react/jsx-runtime';function a94_0x4eac(_0x1c5506,_0x3f6dfa){_0x1c5506=_0x1c5506-0x1a7;const _0x185890=a94_0x1858();let _0x4eac73=_0x185890[_0x1c5506];return _0x4eac73;}import{useEffect}from'react';import{Box,Text,useApp}from'ink';function a94_0x1858(){const _0x4f5a2a=['13128blyrJI','393419BhOiIg','174770ERPYWI','2qrPCcv','\x20\x20Use\x20','7TamFaZ','2782017ymrOFq','3224400dyepsF','14491422EaAIft','\x20to\x20view\x20available\x20commands.','column','40JAhQwR','green','271419MJCGJg','\x20--help','16KToPEi'];a94_0x1858=function(){return _0x4f5a2a;};return a94_0x1858();}import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'./constant/cli.js';export function Help(){const _0x4590ee=a94_0x4eac,{exit:_0x283327}=useApp();return useEffect(()=>{_0x283327();},[_0x283327]),a94_0x210bad(Box,{'flexDirection':_0x4590ee(0x1b4),'marginTop':0x1,'marginBottom':0x1,'children':[a94_0x304bd1(Box,{'children':a94_0x304bd1(Text,{'bold':!![],'color':_0x4590ee(0x1b6),'children':'\x20\x20'+CLI_DISPLAY_NAME})}),a94_0x210bad(Box,{'marginTop':0x1,'children':[a94_0x304bd1(Text,{'dimColor':!![],'children':_0x4590ee(0x1ae)}),a94_0x304bd1(Text,{'bold':!![],'color':_0x4590ee(0x1b6),'children':CLI_BIN_NAME+_0x4590ee(0x1a8)}),a94_0x304bd1(Text,{'dimColor':!![],'children':_0x4590ee(0x1b3)})]})]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x2e89cd=a95_0x3dfa;function a95_0xa6d4(){const _0x1030fe=['468328cBUXMU','6062JSCcNE','join','32523GfwiXG','status','stderr','unknown','178eRjyOw','trim','132PYXXTv','skipNpxSkillsEnvSuffix','1273788UhjCpW','1285cfydpR','2766320MPuNDP','8vPlxQp','toString','stdout','225300NfUszw','exit\x20','npx','stdio','skills','add','inherit'];a95_0xa6d4=function(){return _0x1030fe;};return a95_0xa6d4();}(function(_0x42bd19,_0x35b737){const _0x637c88=a95_0x3dfa,_0x1e8b0d=_0x42bd19();while(!![]){try{const _0x268593=parseInt(_0x637c88(0x1bb))/0x1*(parseInt(_0x637c88(0x1b6))/0x2)+parseInt(_0x637c88(0x1b2))/0x3*(-parseInt(_0x637c88(0x1bd))/0x4)+-parseInt(_0x637c88(0x1c0))/0x5+-parseInt(_0x637c88(0x1b8))/0x6*(-parseInt(_0x637c88(0x1c8))/0x7)+-parseInt(_0x637c88(0x1c7))/0x8+-parseInt(_0x637c88(0x1ba))/0x9+parseInt(_0x637c88(0x1bc))/0xa;if(_0x268593===_0x35b737)break;else _0x1e8b0d['push'](_0x1e8b0d['shift']());}catch(_0x463eb5){_0x1e8b0d['push'](_0x1e8b0d['shift']());}}}(a95_0xa6d4,0x22f82));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';import{LOVRABET_SKILL_SOURCE as a95_0xf6cbaa}from'../constant/distribution.js';import{PRODUCT_CONFIG,productEnvName}from'../constant/product.js';function a95_0x3dfa(_0x39f73e,_0x5cf744){_0x39f73e=_0x39f73e-0x1b2;const _0xa6d4c3=a95_0xa6d4();let _0x3dfa2a=_0xa6d4c3[_0x39f73e];return _0x3dfa2a;}export const LOVRABET_SKILL_SOURCE=a95_0xf6cbaa;export const LOVRABET_SKIP_NPX_SKILLS_ENV=productEnvName(PRODUCT_CONFIG[a95_0x2e89cd(0x1b9)]);export function shouldSkipNpxSkillsAdd(){return process.env[LOVRABET_SKIP_NPX_SKILLS_ENV]==='1';}export function runNpxSkillsAddGlobal(_0x4f4d68,_0x1d31ad=LOVRABET_SKILL_SOURCE,_0x173d20){const _0x34f2d0=a95_0x2e89cd;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x22555d=_0x173d20?.[_0x34f2d0(0x1c3)]??_0x34f2d0(0x1c6),_0xae483f=resolveNpmBin(_0x34f2d0(0x1c2)),_0x488fbd=[_0x34f2d0(0x1c4),_0x34f2d0(0x1c5),_0x1d31ad,'-g','-y'],_0x37ecae=[_0xae483f,..._0x488fbd][_0x34f2d0(0x1c9)]('\x20');console['log']('*\x20'+_0x37ecae);const _0x244405=spawnSync(_0xae483f,_0x488fbd,{'cwd':_0x4f4d68,'stdio':_0x22555d,'env':process.env,'shell':![]});if(_0x244405[_0x34f2d0(0x1b3)]===0x0)return{'ok':!![],'status':0x0};let _0x246477=_0x34f2d0(0x1c1)+(_0x244405[_0x34f2d0(0x1b3)]??_0x34f2d0(0x1b5));if(_0x22555d==='pipe'){const _0x30a397=_0x244405[_0x34f2d0(0x1b4)]?_0x244405['stderr'][_0x34f2d0(0x1be)]()['trim']():'',_0x4d0fee=_0x244405[_0x34f2d0(0x1bf)]?_0x244405['stdout']['toString']()[_0x34f2d0(0x1b7)]():'';if(_0x30a397)_0x246477=_0x30a397;else{if(_0x4d0fee)_0x246477=_0x4d0fee;}}return{'ok':![],'status':_0x244405[_0x34f2d0(0x1b3)]??null,'error':_0x246477};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x3ab37b=a96_0x4571;function a96_0x25a8(){const _0x51f281=['102gNRnMy','24VkJPbp','.turbo','dist','.cache','627462XjOIQr','.next','13745817DeJWhQ','584455FiSDjF','.git','node_modules','1153047pkzUdF','build','SKILL.md','.hg','311300NCWlac','2546176xNhMBX','3249728MTbjUt'];a96_0x25a8=function(){return _0x51f281;};return a96_0x25a8();}(function(_0x1dd8f8,_0x1d2437){const _0x3877a0=a96_0x4571,_0x4ff915=_0x1dd8f8();while(!![]){try{const _0xadb9d8=-parseInt(_0x3877a0(0x9c))/0x1+parseInt(_0x3877a0(0x92))/0x2+parseInt(_0x3877a0(0x99))/0x3+parseInt(_0x3877a0(0x93))/0x4+-parseInt(_0x3877a0(0x91))/0x5*(-parseInt(_0x3877a0(0x94))/0x6)+-parseInt(_0x3877a0(0x9f))/0x7*(parseInt(_0x3877a0(0x95))/0x8)+-parseInt(_0x3877a0(0x9b))/0x9;if(_0xadb9d8===_0x1d2437)break;else _0x4ff915['push'](_0x4ff915['shift']());}catch(_0x15af12){_0x4ff915['push'](_0x4ff915['shift']());}}}(a96_0x25a8,0xb669b));export const METADATA_FILE='lovrabet.skill.json';function a96_0x4571(_0x5954d1,_0x2f6637){_0x5954d1=_0x5954d1-0x8f;const _0x25a8e8=a96_0x25a8();let _0x4571da=_0x25a8e8[_0x5954d1];return _0x4571da;}export const SKILL_FILE=a96_0x3ab37b(0x8f);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,'.DS_Store']);export const IGNORED_DIR_NAMES=new Set([a96_0x3ab37b(0x9d),a96_0x3ab37b(0x90),'.svn',a96_0x3ab37b(0x9e),a96_0x3ab37b(0x9a),a96_0x3ab37b(0x97),a96_0x3ab37b(0xa0),'coverage',a96_0x3ab37b(0x96),a96_0x3ab37b(0x98)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44bc37,_0x4f9101){const _0x19fa22=a97_0x12af,_0x3d2618=_0x44bc37();while(!![]){try{const _0x4c232d=-parseInt(_0x19fa22(0x203))/0x1*(-parseInt(_0x19fa22(0x1ff))/0x2)+-parseInt(_0x19fa22(0x206))/0x3+parseInt(_0x19fa22(0x207))/0x4*(-parseInt(_0x19fa22(0x1f6))/0x5)+parseInt(_0x19fa22(0x1fc))/0x6+-parseInt(_0x19fa22(0x202))/0x7*(-parseInt(_0x19fa22(0x1f5))/0x8)+-parseInt(_0x19fa22(0x200))/0x9*(parseInt(_0x19fa22(0x1fa))/0xa)+-parseInt(_0x19fa22(0x1f4))/0xb*(parseInt(_0x19fa22(0x205))/0xc);if(_0x4c232d===_0x4f9101)break;else _0x3d2618['push'](_0x3d2618['shift']());}catch(_0x19063e){_0x3d2618['push'](_0x3d2618['shift']());}}}(a97_0x4798,0x61a93));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(_0xce78ec,_0x5c3e7a){const _0x58a4a8=a97_0x12af,_0x3bcee8=normalizeSkillRelativePath(_0x5c3e7a),_0x5a281e=realOrResolved(_0xce78ec),_0x3127c3=resolve(_0x5a281e,..._0x3bcee8[_0x58a4a8(0x1f8)]('/'));if(!isPathInside(_0x3127c3,_0x5a281e))throw CliErrors[_0x58a4a8(0x204)](_0x58a4a8(0x201)+_0x5c3e7a);return ensureNoSymlinkInManagedPath(_0x5a281e,_0x3bcee8),_0x3127c3;}export function ensureNoSymlinkInManagedPath(_0x4912f8,_0x45464d){const _0x2d9fbc=a97_0x12af;let _0x2ef10f=_0x4912f8;for(const _0x3818f8 of _0x45464d[_0x2d9fbc(0x1f8)]('/')){_0x2ef10f=resolve(_0x2ef10f,_0x3818f8);const _0x4a5edd=lstatIfPresent(_0x2ef10f);if(_0x4a5edd?.[_0x2d9fbc(0x208)]())throw CliErrors[_0x2d9fbc(0x204)]('Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20'+_0x45464d);}}export function isDanglingSymlink(_0x1c2b15){try{return lstatSync(_0x1c2b15)['isSymbolicLink']();}catch{return![];}}export function resolveSymlinkTarget(_0x48c690){const _0x53fa7b=readlinkSync(_0x48c690);return isAbsolute(_0x53fa7b)?_0x53fa7b:resolve(dirname(_0x48c690),_0x53fa7b);}function a97_0x12af(_0x15cb23,_0xf264d4){_0x15cb23=_0x15cb23-0x1f4;const _0x47980b=a97_0x4798();let _0x12af36=_0x47980b[_0x15cb23];return _0x12af36;}function a97_0x4798(){const _0x3bead1=['endsWith','1114HNRvEZ','225drYSez','Unsafe\x20Skill\x20file\x20path:\x20','5138329XfCohC','592Nkabxa','validation','12ihoKqk','368775kTCQcd','4QzHFqn','isSymbolicLink','2855809LmnEDZ','8JsFZLK','2834795MHiXZL','.tmp','split','from','15230jMrTRx','stringify','1942836BKLpur','utf8'];a97_0x4798=function(){return _0x3bead1;};return a97_0x4798();}export function isPathInside(_0x453d5e,_0x51b6b6){const _0x22efad=a97_0x12af,_0x479010=_0x453d5e[_0x22efad(0x1fe)](sep)?_0x453d5e:''+_0x453d5e+sep,_0x5228f5=_0x51b6b6[_0x22efad(0x1fe)](sep)?_0x51b6b6:''+_0x51b6b6+sep;return _0x453d5e===_0x51b6b6||_0x479010['startsWith'](_0x5228f5);}export function realOrResolved(_0xdd1e2a){try{return realpathSync(_0xdd1e2a);}catch{return resolve(_0xdd1e2a);}}export function lstatIfPresent(_0xe36c8e){try{return lstatSync(_0xe36c8e);}catch{return undefined;}}export function writeTextAtomic(_0x5e8888,_0x1599ee,_0x57e2f0){const _0x22671f=a97_0x12af;writeBytesAtomic(_0x5e8888,Buffer[_0x22671f(0x1f9)](_0x1599ee,_0x22671f(0x1fd)),_0x57e2f0);}export function writeBytesAtomic(_0x228ce8,_0x16fee6,_0x34296b){const _0x256980=a97_0x12af,_0x33a593=_0x228ce8+_0x256980(0x1f7);try{writeFileSync(_0x33a593,_0x16fee6,{'mode':_0x34296b}),renameSync(_0x33a593,_0x228ce8);}catch(_0x16e7f5){try{rmSync(_0x33a593,{'force':!![]});}catch{}throw _0x16e7f5;}}export function writeJsonAtomic(_0x5cfbb2,_0x38274c){const _0x326a79=a97_0x12af;writeTextAtomic(_0x5cfbb2,JSON[_0x326a79(0x1fb)](_0x38274c,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x2541(){const _0x514378=['digest','hex','153WqFfCS','1905043WyCmjo','322232DBavAi','2275240ccRkkx','8nuUUPi','193758kybPSa','850890RjLeDU','863088XPwMoO','update','size','sha256','1578012vmdIAV','7CvtZiF'];a98_0x2541=function(){return _0x514378;};return a98_0x2541();}(function(_0x29f891,_0x5da1f7){const _0x305256=a98_0x582e,_0x569bfd=_0x29f891();while(!![]){try{const _0x38b919=parseInt(_0x305256(0xf9))/0x1*(parseInt(_0x305256(0xf2))/0x2)+parseInt(_0x305256(0xf4))/0x3+parseInt(_0x305256(0xf1))/0x4*(parseInt(_0x305256(0xf3))/0x5)+-parseInt(_0x305256(0xf8))/0x6+parseInt(_0x305256(0xfd))/0x7+-parseInt(_0x305256(0xfe))/0x8*(parseInt(_0x305256(0xfc))/0x9)+-parseInt(_0x305256(0xff))/0xa;if(_0x38b919===_0x5da1f7)break;else _0x569bfd['push'](_0x569bfd['shift']());}catch(_0x61e209){_0x569bfd['push'](_0x569bfd['shift']());}}}(a98_0x2541,0x6268d));import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';function a98_0x582e(_0xf384b4,_0x4c2170){_0xf384b4=_0xf384b4-0xf1;const _0x2541e1=a98_0x2541();let _0x582e4b=_0x2541e1[_0xf384b4];return _0x582e4b;}export function contentHash(_0x2ca9ef){const _0x18abf3=a98_0x582e;return createHash(_0x18abf3(0xf7))[_0x18abf3(0xf5)](_0x2ca9ef)[_0x18abf3(0xfa)](_0x18abf3(0xfb));}export function fileHash(_0x89ebc2){return bufferSha256(fileContent(_0x89ebc2));}export function bufferSha256(_0x247eae){const _0x47c720=a98_0x582e;return createHash(_0x47c720(0xf7))[_0x47c720(0xf5)](_0x247eae)['digest']('hex');}export function fileTreeHash(_0x195d32){const _0x2e0f24=a98_0x582e,_0x90dac1=createHash(_0x2e0f24(0xf7));for(const _0x370159 of normalizeManifestFiles(_0x195d32)){_0x90dac1['update'](_0x370159['path']),_0x90dac1['update']('\x00'),_0x90dac1[_0x2e0f24(0xf5)](_0x370159['sha256']),_0x90dac1[_0x2e0f24(0xf5)]('\x00'),_0x90dac1[_0x2e0f24(0xf5)](String(_0x370159[_0x2e0f24(0xf6)])),_0x90dac1[_0x2e0f24(0xf5)]('\x00');}return _0x90dac1[_0x2e0f24(0xfa)](_0x2e0f24(0xfb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x457f47,_0xd52e52){const _0x1209eb=a99_0x1462,_0x47b5f6=_0x457f47();while(!![]){try{const _0x44ec8e=-parseInt(_0x1209eb(0x1a3))/0x1+parseInt(_0x1209eb(0x1b1))/0x2*(-parseInt(_0x1209eb(0x196))/0x3)+-parseInt(_0x1209eb(0x1ae))/0x4+-parseInt(_0x1209eb(0x18f))/0x5+-parseInt(_0x1209eb(0x1ab))/0x6+parseInt(_0x1209eb(0x1af))/0x7*(parseInt(_0x1209eb(0x193))/0x8)+parseInt(_0x1209eb(0x192))/0x9*(parseInt(_0x1209eb(0x199))/0xa);if(_0x44ec8e===_0xd52e52)break;else _0x47b5f6['push'](_0x47b5f6['shift']());}catch(_0x14cef6){_0x47b5f6['push'](_0x47b5f6['shift']());}}}(a99_0x440d,0xe13b6));function a99_0x440d(){const _0x178bf5=['values','9808914KyFsck','scope','appCode','288996fzicGf','357hzIItU','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','2328eXNsnm','skill','managedRoot','removed','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','personal','scopes','name','isSymbolicLink','contentHash','validation','2222900qiVnZE','filter','slice','9QxTGJw','169528Mzjott','length','skillCode','177pKKFJF','trim','updated','21764230RpGFqO','metadata-mismatch','created','external-symlink','dir','map','isDirectory','company','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','agentsSkillsDir','114290vBQyWQ','builtin','skipped','has','get','unchanged','push'];a99_0x440d=function(){return _0x178bf5;};return a99_0x440d();}import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a99_0x52dc5f 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_0x52dc5f;export function linkEffectiveRuntimeSkills(_0x17c11c,_0x36fd1f,_0x3529ed={}){const _0x1e33cf=a99_0x1462,_0x2d99d0=new Map();for(const _0x316957 of _0x17c11c){const _0x4778b2=_0x316957['skill']['skillCode'];if(!_0x4778b2)continue;const _0x348d51=_0x2d99d0[_0x1e33cf(0x1a7)](_0x4778b2);(!_0x348d51||_0x316957[_0x1e33cf(0x1ac)]===_0x1e33cf(0x1b6))&&_0x2d99d0['set'](_0x4778b2,_0x316957);}const _0x1a7054=[],_0x1afed9=resolveSkillSyncPaths(_0x3529ed);for(const _0x51d278 of _0x2d99d0[_0x1e33cf(0x1aa)]()){const _0x4d8eff=requireSkillCode(_0x51d278[_0x1e33cf(0x1b2)]),_0x48bb52=_0x36fd1f+'--'+_0x4d8eff;for(const _0x25f91a of runtimeAgentSkillRoots(_0x1afed9)){_0x1a7054[_0x1e33cf(0x1a9)](ensureManagedSymlink(resolve(_0x25f91a,_0x48bb52),_0x51d278[_0x1e33cf(0x19d)],_0x1afed9[_0x1e33cf(0x1b3)]));}}return _0x1a7054;}export function pruneStaleRuntimeSkillLinks(_0x42402c,_0x5c93f4,_0x5cda20={},_0x397170){const _0x39deac=a99_0x1462,_0x3fbc7b=resolveSkillSyncPaths(_0x5cda20),_0x400e27=new Set([..._0x5c93f4][_0x39deac(0x19e)](_0x532e0e=>_0x532e0e[_0x39deac(0x197)]())[_0x39deac(0x190)](Boolean)),_0x1bf00d=_0x397170?new Set([..._0x397170][_0x39deac(0x19e)](_0x2cdf06=>_0x2cdf06[_0x39deac(0x197)]())['filter'](Boolean)):undefined,_0xf36cd=[];for(const _0x2508c9 of runtimeAgentSkillRoots(_0x3fbc7b)){for(const _0x5cc790 of managedAppSkillLinkPaths(_0x2508c9,_0x42402c)){const _0x5f2824=basename(_0x5cc790)[_0x39deac(0x191)]((_0x42402c+'--')[_0x39deac(0x194)]);if(_0x1bf00d&&!_0x1bf00d[_0x39deac(0x1a6)](_0x5f2824))continue;if(_0x400e27['has'](_0x5f2824))continue;_0xf36cd[_0x39deac(0x1a9)](removeManagedSkillLink(_0x5cc790,_0x3fbc7b[_0x39deac(0x1b3)]));}}return _0xf36cd;}export function pruneStaleRuntimeSkillCache(_0xc5a8c7,_0x251608={}){const _0x452581=a99_0x1462,_0x59621d=new Set([..._0xc5a8c7['activeSkillCodes']][_0x452581(0x19e)](_0x5aa6ac=>_0x5aa6ac[_0x452581(0x197)]())[_0x452581(0x190)](Boolean)),_0x4fddb2=_0xc5a8c7['pruneSkillCodes']?new Set([..._0xc5a8c7['pruneSkillCodes']][_0x452581(0x19e)](_0x996419=>_0x996419[_0x452581(0x197)]())[_0x452581(0x190)](Boolean)):undefined,_0x45eb80=_0xc5a8c7[_0x452581(0x1b7)]??['personal',_0x452581(0x1a0)],_0x8776e0=resolve(getRuntimeSkillCacheRoot(_0xc5a8c7['env'],_0xc5a8c7['accessKey'],_0x251608),safePathSegment(_0xc5a8c7[_0x452581(0x1ad)],_0x452581(0x1ad))),_0x4c0aaa=[];for(const _0x1ed791 of _0x45eb80){const _0x2204a1=resolve(_0x8776e0,_0x1ed791);if(!existsSync(_0x2204a1))continue;for(const _0x36ba6e of readdirSync(_0x2204a1,{'withFileTypes':!![]})){if(!_0x36ba6e[_0x452581(0x19f)]())continue;const _0x2e219d=_0x36ba6e[_0x452581(0x1b8)];if(_0x4fddb2&&!_0x4fddb2[_0x452581(0x1a6)](_0x2e219d))continue;if(_0x59621d[_0x452581(0x1a6)](_0x2e219d))continue;const _0x3d0998=resolve(_0x2204a1,_0x2e219d),_0x5088d8=readMetadataIfPresent(resolve(_0x3d0998,METADATA_FILE));if(_0x5088d8?.[_0x452581(0x1ad)]!==_0xc5a8c7['appCode']||_0x5088d8[_0x452581(0x1ac)]!==_0x1ed791||_0x5088d8[_0x452581(0x195)]!==_0x2e219d){_0x4c0aaa['push']({'path':_0x3d0998,'action':_0x452581(0x1a5),'reason':_0x452581(0x19a)});continue;}removeSync(_0x3d0998),_0x4c0aaa[_0x452581(0x1a9)]({'path':_0x3d0998,'action':_0x452581(0x1b4)});}}return _0x4c0aaa;}export function linkGlobalRuntimeSkills(_0xa21b30,_0x29d21c={}){const _0x2a052b=a99_0x1462,_0x32f30b=resolveSkillSyncPaths(_0x29d21c),_0x48174c=[];for(const _0x4396c3 of _0xa21b30){if(_0x4396c3[_0x2a052b(0x1ac)]!==_0x2a052b(0x1a4))throw CliErrors[_0x2a052b(0x18e)]('Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20'+_0x4396c3['scope']);const _0x31f6d8=requireSkillCode(_0x4396c3[_0x2a052b(0x1b2)]),_0xbfcbd8=copyManagedSkillDirectory(_0x4396c3[_0x2a052b(0x19d)],resolve(_0x32f30b[_0x2a052b(0x1a2)],_0x31f6d8));_0x48174c['push']({..._0xbfcbd8,'contentHash':_0x4396c3[_0x2a052b(0x18d)]});}return _0x48174c;}function ensureManagedSymlink(_0x41de2d,_0x5ed4e0,_0x18b877){const _0x3fb1c3=a99_0x1462;mkdirSync(dirname(_0x41de2d),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x41de2d)||isDanglingSymlink(_0x41de2d)){const _0x159cd2=lstatSync(_0x41de2d);if(!_0x159cd2[_0x3fb1c3(0x1b9)]())throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x41de2d);const _0x2f3aa9=resolveSymlinkTarget(_0x41de2d);if(!isPathInside(realOrResolved(_0x2f3aa9),realOrResolved(_0x18b877)))throw CliErrors[_0x3fb1c3(0x18e)]('Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20'+_0x41de2d);if(realOrResolved(_0x2f3aa9)===realOrResolved(_0x5ed4e0))return{'path':_0x41de2d,'target':_0x5ed4e0,'action':_0x3fb1c3(0x1a8)};return unlinkSync(_0x41de2d),symlinkSync(_0x5ed4e0,_0x41de2d,_0x3fb1c3(0x19d)),{'path':_0x41de2d,'target':_0x5ed4e0,'action':_0x3fb1c3(0x198)};}return symlinkSync(_0x5ed4e0,_0x41de2d,_0x3fb1c3(0x19d)),{'path':_0x41de2d,'target':_0x5ed4e0,'action':'created'};}function managedAppSkillLinkPaths(_0x2671ae,_0x5b40de){const _0x5517a4=a99_0x1462;if(!existsSync(_0x2671ae))return[];const _0x34021b=_0x5b40de+'--';return readdirSync(_0x2671ae,{'withFileTypes':!![]})['filter'](_0x3517a1=>_0x3517a1[_0x5517a4(0x1b8)]['startsWith'](_0x34021b))[_0x5517a4(0x19e)](_0x5e8be1=>resolve(_0x2671ae,_0x5e8be1['name']));}function removeManagedSkillLink(_0x4c8812,_0x12140b){const _0x41c3fe=a99_0x1462,_0x5ea09a=lstatIfPresent(_0x4c8812);if(!_0x5ea09a?.['isSymbolicLink']())return{'path':_0x4c8812,'action':_0x41c3fe(0x1a5),'reason':'not-managed-symlink'};const _0x3f8f9d=resolveSymlinkTarget(_0x4c8812);if(!isPathInside(realOrResolved(_0x3f8f9d),realOrResolved(_0x12140b)))return{'path':_0x4c8812,'action':_0x41c3fe(0x1a5),'reason':_0x41c3fe(0x19c)};return unlinkSync(_0x4c8812),{'path':_0x4c8812,'action':_0x41c3fe(0x1b4)};}function a99_0x1462(_0x119b5a,_0x3abc60){_0x119b5a=_0x119b5a-0x18d;const _0x440dee=a99_0x440d();let _0x1462ec=_0x440dee[_0x119b5a];return _0x1462ec;}export function copyManagedSkillDirectory(_0x4e1323,_0x43effe){const _0x44ac90=a99_0x1462,_0x54cd60=resolve(_0x43effe,METADATA_FILE),_0x1c1e6d=existsSync(_0x43effe);if(_0x1c1e6d){const _0x284b93=lstatSync(_0x43effe);if(_0x284b93['isSymbolicLink']())throw CliErrors[_0x44ac90(0x18e)](_0x44ac90(0x1b0)+_0x43effe);if(!_0x284b93[_0x44ac90(0x19f)]())throw CliErrors['validation'](_0x44ac90(0x1b5)+_0x43effe);const _0x21f223=readMetadataIfPresent(_0x54cd60);if(_0x21f223?.[_0x44ac90(0x1ac)]!=='builtin')throw CliErrors[_0x44ac90(0x18e)](_0x44ac90(0x1a1)+_0x43effe);}ensureDirSync(dirname(_0x43effe));const _0x2ad27e=_0x1c1e6d?readMetadataIfPresent(_0x54cd60)?.['contentHash']:undefined,_0x3b6246=readMetadataIfPresent(resolve(_0x4e1323,METADATA_FILE))?.[_0x44ac90(0x18d)];return _0x1c1e6d&&removeSync(_0x43effe),copySkillDirectory(_0x4e1323,_0x43effe),{'path':_0x43effe,'target':_0x4e1323,'action':!_0x1c1e6d?_0x44ac90(0x19b):_0x2ad27e===_0x3b6246?_0x44ac90(0x1a8):_0x44ac90(0x198)};}function copySkillDirectory(_0x1714c1,_0x18f58e){copySync(_0x1714c1,_0x18f58e,{'dereference':![],'overwrite':!![],'filter'(_0x207af4){const _0x33bc34=a99_0x1462;if(lstatSync(_0x207af4)['isSymbolicLink']())throw CliErrors[_0x33bc34(0x18e)]('Refusing\x20to\x20copy\x20Skill\x20symlink:\x20'+_0x207af4);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x52afaf,_0x5a52b0){const _0x3ae3df=a100_0x5ef6,_0x539ba0=_0x52afaf();while(!![]){try{const _0x147f07=parseInt(_0x3ae3df(0xc7))/0x1+-parseInt(_0x3ae3df(0xeb))/0x2*(-parseInt(_0x3ae3df(0xf1))/0x3)+-parseInt(_0x3ae3df(0xda))/0x4*(parseInt(_0x3ae3df(0xd4))/0x5)+-parseInt(_0x3ae3df(0xe9))/0x6*(parseInt(_0x3ae3df(0xe1))/0x7)+-parseInt(_0x3ae3df(0xd5))/0x8*(-parseInt(_0x3ae3df(0xdc))/0x9)+parseInt(_0x3ae3df(0xf3))/0xa*(parseInt(_0x3ae3df(0xca))/0xb)+-parseInt(_0x3ae3df(0xdd))/0xc;if(_0x147f07===_0x5a52b0)break;else _0x539ba0['push'](_0x539ba0['shift']());}catch(_0x471cdc){_0x539ba0['push'](_0x539ba0['shift']());}}}(a100_0x4a73,0x33e1c));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a100_0x4a73(){const _0x61e1fa=['660105JGclKC','1429752zzpDVx','scopes','env','filter','14TJLzZo','values','includes','code','isSymbolicLink','metadataPath','builtin','map','484350oxvjxq','tags','236ubcKqz','trim','scope','skillCode','appCode','linkedPath','3597wTuilU','local','1080GwaKLc','dir','62747ZgcKaV','push','has','26246kuAXll','source','startsWith','cacheDir','sort','skillMdPath','set','isArray','get','localeCompare','577515VwlqbC','16bxvWel','from','name','linkedPaths','link','4iGBhoo','cache'];a100_0x4a73=function(){return _0x61e1fa;};return a100_0x4a73();}import{readMetadataIfPresent}from'./metadata.js';function a100_0x5ef6(_0x7da714,_0xd0b1ac){_0x7da714=_0x7da714-0xc7;const _0x4a73ff=a100_0x4a73();let _0x5ef62a=_0x4a73ff[_0x7da714];return _0x5ef62a;}import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x43a5b5,_0x11fcd6={}){const _0x54a581=a100_0x5ef6,_0x143dcb=safePathSegment(_0x43a5b5[_0x54a581(0xef)],_0x54a581(0xef)),_0x2faf95=normalizeRuntimeSkillScopes(_0x43a5b5[_0x54a581(0xde)]),_0x99e627=new Set(_0x2faf95),_0x3121f3=_0x43a5b5[_0x54a581(0xe4)]?.[_0x54a581(0xec)](),_0x1ada17=new Map(),_0x44121b=resolve(getRuntimeSkillCacheRoot(_0x43a5b5[_0x54a581(0xdf)],_0x43a5b5['accessKey'],_0x11fcd6),_0x143dcb);for(const _0xda1b10 of _0x2faf95){for(const _0x2d782e of localSkillEntryDirs(resolve(_0x44121b,_0xda1b10))){collectLocalRuntimeSkill(_0x1ada17,_0x2d782e,{'appCode':_0x143dcb,'scopes':_0x99e627,'code':_0x3121f3,'source':_0x54a581(0xdb)});}}const _0x1ca311=resolveSkillSyncPaths(_0x11fcd6);for(const _0x1b8177 of runtimeAgentSkillRoots(_0x1ca311)){for(const _0x935237 of localSkillLinkCandidates(_0x1b8177,_0x143dcb,_0x99e627)){collectLocalRuntimeSkill(_0x1ada17,_0x935237,{'appCode':_0x143dcb,'scopes':_0x99e627,'code':_0x3121f3,'source':_0x54a581(0xd9),'linkedPath':_0x935237});}}return Array[_0x54a581(0xd6)](_0x1ada17[_0x54a581(0xe2)]())[_0x54a581(0xce)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x5cef0b){const _0xc57f1d=a100_0x5ef6;if(!existsSync(_0x5cef0b))return[];return readdirSync(_0x5cef0b,{'withFileTypes':!![]})[_0xc57f1d(0xe0)](_0x2ab0d9=>_0x2ab0d9['isDirectory']()||_0x2ab0d9['isSymbolicLink']())['map'](_0x2af068=>resolve(_0x5cef0b,_0x2af068[_0xc57f1d(0xd7)]));}function localSkillLinkCandidates(_0x19d2c7,_0x77a04e,_0x4b714e){const _0x3ff2a5=a100_0x5ef6;if(!existsSync(_0x19d2c7))return[];const _0x33b84d=_0x77a04e+'--';return readdirSync(_0x19d2c7,{'withFileTypes':!![]})[_0x3ff2a5(0xe0)](_0x2ce698=>_0x2ce698['isDirectory']()||_0x2ce698[_0x3ff2a5(0xe5)]())[_0x3ff2a5(0xe0)](_0x3407e7=>_0x3407e7[_0x3ff2a5(0xd7)][_0x3ff2a5(0xcc)](_0x33b84d)||_0x4b714e[_0x3ff2a5(0xc9)](_0x3ff2a5(0xe7)))[_0x3ff2a5(0xe8)](_0x3fa131=>resolve(_0x19d2c7,_0x3fa131[_0x3ff2a5(0xd7)]));}function collectLocalRuntimeSkill(_0x36423c,_0x491ae0,_0x292e4b){const _0x28d48d=a100_0x5ef6,_0x20c88c=resolve(_0x491ae0,METADATA_FILE),_0x34bc61=readMetadataIfPresent(_0x20c88c);if(!_0x34bc61)return;if(_0x34bc61[_0x28d48d(0xef)]!==_0x292e4b[_0x28d48d(0xef)])return;if(!isRuntimeSkillScope(_0x34bc61[_0x28d48d(0xed)])||!_0x292e4b[_0x28d48d(0xde)]['has'](_0x34bc61[_0x28d48d(0xed)]))return;const _0x381ce5=_0x34bc61['skillCode']?.[_0x28d48d(0xec)]();if(!_0x381ce5)return;if(_0x292e4b['code']&&_0x381ce5!==_0x292e4b[_0x28d48d(0xe4)])return;const _0x31dbf2=_0x34bc61[_0x28d48d(0xed)]+':'+_0x381ce5,_0x2e1e20=_0x292e4b[_0x28d48d(0xf0)]?[_0x292e4b['linkedPath']]:[],_0x563185=_0x36423c[_0x28d48d(0xd2)](_0x31dbf2);if(_0x563185){_0x292e4b[_0x28d48d(0xcb)]===_0x28d48d(0xdb)&&(_0x563185['dir']=_0x491ae0,_0x563185[_0x28d48d(0xcd)]=_0x491ae0,_0x563185[_0x28d48d(0xcf)]=resolve(_0x491ae0,SKILL_FILE),_0x563185[_0x28d48d(0xe6)]=_0x20c88c);for(const _0x35b29d of _0x2e1e20){!_0x563185[_0x28d48d(0xd8)][_0x28d48d(0xe3)](_0x35b29d)&&_0x563185['linkedPaths'][_0x28d48d(0xc8)](_0x35b29d);}_0x563185[_0x28d48d(0xd8)]['sort']();return;}_0x36423c[_0x28d48d(0xd0)](_0x31dbf2,{..._0x34bc61,'tags':Array[_0x28d48d(0xd1)](_0x34bc61[_0x28d48d(0xea)])?_0x34bc61[_0x28d48d(0xea)]:[],'scope':_0x34bc61['scope'],'source':_0x28d48d(0xf2),'dir':_0x491ae0,'cacheDir':_0x292e4b[_0x28d48d(0xcb)]==='cache'?_0x491ae0:undefined,'skillMdPath':resolve(_0x491ae0,SKILL_FILE),'metadataPath':_0x20c88c,'linkedPaths':_0x2e1e20});}function compareLocalRuntimeSkills(_0x4c98ac,_0x3b518e){const _0x160640=a100_0x5ef6,_0x158315={'personal':0x0,'company':0x1,'builtin':0x2};return _0x158315[_0x4c98ac[_0x160640(0xed)]]-_0x158315[_0x3b518e[_0x160640(0xed)]]||_0x4c98ac['skillCode'][_0x160640(0xd3)](_0x3b518e[_0x160640(0xee)])||_0x4c98ac[_0x160640(0xf4)][_0x160640(0xd3)](_0x3b518e[_0x160640(0xf4)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23a3d9,_0x2f69d4){const _0x127172=a101_0x3fe9,_0x35eb03=_0x23a3d9();while(!![]){try{const _0x1a5a1d=-parseInt(_0x127172(0x131))/0x1+-parseInt(_0x127172(0x12f))/0x2*(-parseInt(_0x127172(0x152))/0x3)+-parseInt(_0x127172(0x155))/0x4+-parseInt(_0x127172(0x151))/0x5*(-parseInt(_0x127172(0x158))/0x6)+parseInt(_0x127172(0x15a))/0x7+parseInt(_0x127172(0x145))/0x8+-parseInt(_0x127172(0x159))/0x9;if(_0x1a5a1d===_0x2f69d4)break;else _0x35eb03['push'](_0x35eb03['shift']());}catch(_0xcecf83){_0x35eb03['push'](_0x35eb03['shift']());}}}(a101_0x5335,0xbec7b));import{readFileSync,readdirSync,realpathSync}from'node:fs';function a101_0x5335(){const _0x2563ac=['content','startsWith','test','Skill\x20file\x20sha256\x20is\x20invalid:\x20','from','split','Skill\x20file\x20path\x20must\x20be\x20text.','Duplicate\x20Skill\x20file\x20path:\x20','localeCompare','has','isDirectory','282430JNeiUo','848139PjjWZg','sha256','toLowerCase','4831032jhFllS','utf8','compare','84YUDuCj','5389929bTWshu','7937377wyWhFe','2RgnaTi','isArray','2169bZMIsA','Unsafe\x20Skill\x20file\x20path:\x20','string','set','bytes','object','name','length','path','size','sort','Skill\x20file\x20size\x20is\x20invalid:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','values','isSafeInteger','push','toString','isFile','replace','validation','3062520PbQVMK'];a101_0x5335=function(){return _0x2563ac;};return a101_0x5335();}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(_0x5b00b7){const _0x229db6=a101_0x3fe9;return _0x5b00b7[_0x229db6(0x135)]??Buffer[_0x229db6(0x14a)](_0x5b00b7[_0x229db6(0x146)]??'',_0x229db6(0x156));}function a101_0x3fe9(_0x1d9ed6,_0x4b4fd9){_0x1d9ed6=_0x1d9ed6-0x12f;const _0x5335b4=a101_0x5335();let _0x3fe969=_0x5335b4[_0x1d9ed6];return _0x3fe969;}export function fileText(_0x29acdc){const _0x3cfac2=a101_0x3fe9;return fileContent(_0x29acdc)[_0x3cfac2(0x141)]('utf8');}export function normalizeLocalFiles(_0x37ebd0){const _0x4735fa=a101_0x3fe9;if(!Array['isArray'](_0x37ebd0)||_0x37ebd0[_0x4735fa(0x138)]===0x0)return[];const _0x1812b0=new Map();for(const _0x22693e of _0x37ebd0){if(!_0x22693e||typeof _0x22693e!==_0x4735fa(0x136)||typeof _0x22693e[_0x4735fa(0x139)]!==_0x4735fa(0x133))throw CliErrors['validation']('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x9b1b32=normalizeSkillRelativePath(_0x22693e[_0x4735fa(0x139)]);if(_0x1812b0[_0x4735fa(0x14f)](_0x9b1b32))throw CliErrors['validation'](_0x4735fa(0x14d)+_0x9b1b32);if(_0x22693e['bytes']!==undefined&&!Buffer['isBuffer'](_0x22693e['bytes']))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x9b1b32);if(_0x22693e['bytes']===undefined&&typeof _0x22693e[_0x4735fa(0x146)]!=='string')throw CliErrors[_0x4735fa(0x144)](_0x4735fa(0x13d)+_0x9b1b32);const _0x62d758=fileContent(_0x22693e);_0x1812b0[_0x4735fa(0x134)](_0x9b1b32,{'path':_0x9b1b32,'bytes':_0x62d758});}return Array[_0x4735fa(0x14a)](_0x1812b0[_0x4735fa(0x13e)]())[_0x4735fa(0x13b)](compareSkillFiles);}export function normalizeManifestFiles(_0x205ada){const _0x30fa1f=a101_0x3fe9;if(!Array[_0x30fa1f(0x130)](_0x205ada)||_0x205ada[_0x30fa1f(0x138)]===0x0)return[];const _0x443863=new Map();for(const _0x5af19 of _0x205ada){if(!_0x5af19||typeof _0x5af19!=='object'||typeof _0x5af19[_0x30fa1f(0x139)]!==_0x30fa1f(0x133))throw CliErrors[_0x30fa1f(0x144)](_0x30fa1f(0x14c));const _0x4aaea1=normalizeSkillRelativePath(_0x5af19[_0x30fa1f(0x139)]);if(_0x443863[_0x30fa1f(0x14f)](_0x4aaea1))throw CliErrors['validation'](_0x30fa1f(0x14d)+_0x4aaea1);if(!isSha256Hex(_0x5af19[_0x30fa1f(0x153)]))throw CliErrors['validation'](_0x30fa1f(0x149)+_0x4aaea1);if(!Number[_0x30fa1f(0x13f)](_0x5af19['size'])||_0x5af19[_0x30fa1f(0x13a)]<0x0)throw CliErrors[_0x30fa1f(0x144)](_0x30fa1f(0x13c)+_0x4aaea1);_0x443863[_0x30fa1f(0x134)](_0x4aaea1,{'path':_0x4aaea1,'sha256':_0x5af19['sha256'][_0x30fa1f(0x154)](),'size':_0x5af19[_0x30fa1f(0x13a)]});}return Array[_0x30fa1f(0x14a)](_0x443863['values']())[_0x30fa1f(0x13b)](compareSkillFiles);}export function scanSkillDirectory(_0xb7a1ad){const _0x2b637e=realpathSync(_0xb7a1ad),_0x254e56=[];function _0x3432(_0x4744d5){const _0x2fa61b=a101_0x3fe9,_0x2ddfaa=readdirSync(_0x4744d5,{'withFileTypes':!![]})['sort']((_0xa8ef8d,_0x5bb30a)=>_0xa8ef8d[_0x2fa61b(0x137)][_0x2fa61b(0x14e)](_0x5bb30a[_0x2fa61b(0x137)]));for(const _0x194a88 of _0x2ddfaa){if(_0x194a88[_0x2fa61b(0x150)]()&&IGNORED_DIR_NAMES['has'](_0x194a88[_0x2fa61b(0x137)]))continue;if(IGNORED_FILE_NAMES[_0x2fa61b(0x14f)](_0x194a88[_0x2fa61b(0x137)]))continue;const _0xce4162=resolve(_0x4744d5,_0x194a88['name']);if(_0x194a88['isSymbolicLink']())throw CliErrors[_0x2fa61b(0x144)]('Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20'+_0xce4162);const _0xc45950=toPosixPath(relative(_0x2b637e,_0xce4162));if(_0x194a88[_0x2fa61b(0x150)]()){_0x3432(_0xce4162);continue;}if(!_0x194a88[_0x2fa61b(0x142)]())continue;validateSkillRelativePath(_0xc45950);const _0xb374ca=readFileSync(_0xce4162);_0x254e56[_0x2fa61b(0x140)]({'path':_0xc45950,'bytes':_0xb374ca});}}return _0x3432(_0x2b637e),normalizeLocalFiles(_0x254e56);}export function compareSkillFiles(_0x3e2e11,_0x4b20e1){const _0x7338b6=a101_0x3fe9;if(_0x3e2e11[_0x7338b6(0x139)]===SKILL_FILE)return _0x4b20e1[_0x7338b6(0x139)]===SKILL_FILE?0x0:-0x1;if(_0x4b20e1[_0x7338b6(0x139)]===SKILL_FILE)return 0x1;return Buffer[_0x7338b6(0x157)](Buffer[_0x7338b6(0x14a)](_0x3e2e11[_0x7338b6(0x139)],_0x7338b6(0x156)),Buffer['from'](_0x4b20e1['path'],_0x7338b6(0x156)));}export function normalizeSkillRelativePath(_0x52d519){const _0x5146fa=toPosixPath(_0x52d519['trim']());return validateSkillRelativePath(_0x5146fa),_0x5146fa;}export function validateSkillRelativePath(_0x503a3a){const _0x6b8435=a101_0x3fe9;if(!_0x503a3a||_0x503a3a[_0x6b8435(0x147)]('/')||_0x503a3a['includes']('//'))throw CliErrors['validation']('Unsafe\x20Skill\x20file\x20path:\x20'+_0x503a3a);for(const _0x3930a4 of _0x503a3a[_0x6b8435(0x14b)]('/')){if(!_0x3930a4||_0x3930a4==='.'||_0x3930a4==='..')throw CliErrors[_0x6b8435(0x144)](_0x6b8435(0x132)+_0x503a3a);}}export function toPosixPath(_0x32b6f6){const _0x3bb1c1=a101_0x3fe9;return _0x32b6f6[_0x3bb1c1(0x143)](/\\/g,'/');}export function isSha256Hex(_0x3705f7){const _0x4938fc=a101_0x3fe9;return typeof _0x3705f7===_0x4938fc(0x133)&&/^[a-fA-F0-9]{64}$/[_0x4938fc(0x148)](_0x3705f7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3471f0,_0x5c8f21){const _0xd4b7a4=a102_0x18bb,_0x2cdbfe=_0x3471f0();while(!![]){try{const _0x48c905=-parseInt(_0xd4b7a4(0x117))/0x1*(parseInt(_0xd4b7a4(0x120))/0x2)+parseInt(_0xd4b7a4(0xf2))/0x3*(-parseInt(_0xd4b7a4(0x10d))/0x4)+parseInt(_0xd4b7a4(0x11d))/0x5*(-parseInt(_0xd4b7a4(0xf4))/0x6)+parseInt(_0xd4b7a4(0x11b))/0x7+parseInt(_0xd4b7a4(0xf9))/0x8+-parseInt(_0xd4b7a4(0xfc))/0x9*(-parseInt(_0xd4b7a4(0xeb))/0xa)+parseInt(_0xd4b7a4(0x115))/0xb*(-parseInt(_0xd4b7a4(0x118))/0xc);if(_0x48c905===_0x5c8f21)break;else _0x2cdbfe['push'](_0x2cdbfe['shift']());}catch(_0x3af63c){_0x2cdbfe['push'](_0x2cdbfe['shift']());}}}(a102_0x1026,0x9cf6d));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';function a102_0x18bb(_0x3112a8,_0xa0df52){_0x3112a8=_0x3112a8-0xeb;const _0x102635=a102_0x1026();let _0x18bb23=_0x102635[_0x3112a8];return _0x18bb23;}import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x4ccaf2,_0x5d982a,_0x15ba2c){const _0x1842c0=a102_0x18bb,_0xb25b7d=requireSkillCode(_0x4ccaf2),_0x5fcf72=requirePackageBytes(_0xb25b7d,_0x15ba2c['packageBytes']),_0x25781f=extractDownloadedPackage(_0x5fcf72),_0x1310b2=_0x25781f[_0x1842c0(0xee)](_0x17798d=>_0x17798d['path']===SKILL_FILE);if(!_0x1310b2)throw CliErrors['validation'](_0x1842c0(0xef)+SKILL_FILE+':\x20'+_0xb25b7d);const _0x3c2c9f=withMaterializedSkillFrontmatter(_0x25781f,_0x4ccaf2,_0xb25b7d),_0x1a5020=_0x3c2c9f[_0x1842c0(0xee)](_0x35b5f9=>_0x35b5f9[_0x1842c0(0x101)]===SKILL_FILE),_0x182e3a=fileText(_0x1a5020),_0x221ba7=getRuntimeSkillDir(_0x15ba2c[_0x1842c0(0x104)],_0x15ba2c[_0x1842c0(0xf3)],_0x15ba2c['appCode'],_0x5d982a,_0xb25b7d,_0x15ba2c[_0x1842c0(0x10b)]),_0x8ada5a=resolve(_0x221ba7,SKILL_FILE),_0x8df687=resolve(_0x221ba7,METADATA_FILE),_0x5f452b=contentHash(_0x182e3a),_0x18501c=readMetadataIfPresent(_0x8df687)?.[_0x1842c0(0x106)];ensurePulledFilesCanBeOverwritten(_0x221ba7,_0x8df687,_0x3c2c9f,_0x15ba2c[_0x1842c0(0x11c)]===!![]),mkdirSync(_0x221ba7,{'recursive':!![],'mode':0x1c0});const _0x5607a3=existsSync(_0x8ada5a)?readFileSync(_0x8ada5a,_0x1842c0(0xfd)):undefined;return materializeFiles(_0x221ba7,_0x3c2c9f),removeStaleManagedFiles(_0x221ba7,_0x18501c,_0x3c2c9f),writeJsonAtomic(_0x8df687,buildMetadata(_0x4ccaf2,_0x5d982a,_0x15ba2c[_0x1842c0(0x10f)],_0x5f452b,_0x15ba2c[_0x1842c0(0xfb)],_0x3c2c9f,_0x5fcf72)),{'skill':_0x4ccaf2,'scope':_0x5d982a,'dir':_0x221ba7,'skillMdPath':_0x8ada5a,'metadataPath':_0x8df687,'contentHash':_0x5f452b,'changed':_0x5607a3!==_0x182e3a};}function withMaterializedSkillFrontmatter(_0x24285e,_0x533728,_0x4a26e6){const _0xe18400=a102_0x18bb,_0x1c3cc6=skillDisplayName(_0x533728,_0x4a26e6),_0x2c4880=_0x533728[_0xe18400(0x107)]?.[_0xe18400(0xff)]()||_0x1c3cc6||_0x4a26e6;return normalizeLocalFiles(_0x24285e)[_0xe18400(0xfa)](_0x4a90d6=>{const _0x56b35a=_0xe18400,_0x4ee6a8=fileText(_0x4a90d6);if(_0x4a90d6[_0x56b35a(0x101)]!==SKILL_FILE)return _0x4a90d6;if(hasYamlFrontmatter(_0x4ee6a8))return{'path':_0x4a90d6[_0x56b35a(0x101)],'content':withSyncedDisplayName(_0x4ee6a8,_0x1c3cc6)};return{'path':_0x4a90d6['path'],'content':prependSkillFrontmatter(_0x4ee6a8,{'name':_0x4a26e6,'displayName':_0x1c3cc6,'description':_0x2c4880})};});}function hasYamlFrontmatter(_0x595bf1){const _0x54cb2d=a102_0x18bb;return/^\uFEFF?---\s*\r?\n/[_0x54cb2d(0x110)](_0x595bf1);}function a102_0x1026(){const _0x415032=['60SOViul','---\x0a','slice','2373980EddTfV','force','62455XIWCDE','name','\x0a---\x0a\x0a','2DBjQPb','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','4270dtiqkY','replace','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','find','Runtime\x20Skill\x20package\x20is\x20missing\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','match','12QnsNVi','accessKey','90mUJrda','.\x20Changed\x20file:\x20','length','contents','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','4813520UUGQdq','map','pulledAt','15732nAHWsK','utf8','validation','trim','flow','path','description:\x20','displayName','env','entries','fileHashes','description','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','isFile','set','paths','delete','311724GOvXCg','---','appCode','test','keys','has','skillName','stringify','447667DXqtCy','contentHash','341727xACdtG'];a102_0x1026=function(){return _0x415032;};return a102_0x1026();}function prependSkillFrontmatter(_0x3f7c76,_0x12889a){const _0x4ee060=a102_0x18bb,_0x1284a4=_0x3f7c76[_0x4ee060(0xec)](/^\uFEFF/,'');return[_0x4ee060(0x10e),'name:\x20'+yamlString(_0x12889a[_0x4ee060(0x11e)]),_0x12889a[_0x4ee060(0x103)]?'displayName:\x20'+yamlString(_0x12889a[_0x4ee060(0x103)]):undefined,_0x4ee060(0x102)+yamlString(_0x12889a[_0x4ee060(0x107)]),'---','',_0x1284a4]['filter'](_0xa2349c=>_0xa2349c!==undefined)['join']('\x0a');}function yamlString(_0x5666b3){const _0x2e67ad=a102_0x18bb;return JSON[_0x2e67ad(0x114)](_0x5666b3[_0x2e67ad(0xec)](/\r/g,'')['trim']());}function skillDisplayName(_0x473ea5,_0x5b9a88){const _0xdccede=a102_0x18bb,_0x4bd0e7=_0x473ea5[_0xdccede(0x113)]?.['trim']();return _0x4bd0e7||_0x5b9a88;}function withSyncedDisplayName(_0x35546e,_0x580473){const _0x1f13cd=a102_0x18bb,_0x178ced=_0x35546e[_0x1f13cd(0xf1)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x178ced)return _0x35546e;const _0x127ebb=_0x178ced[0x1]??'',_0x47a026=_0x178ced[0x2]??'',_0x50fc89=parseDocument(_0x47a026);if(_0x50fc89['errors'][_0x1f13cd(0xf6)]>0x0||!isMap(_0x50fc89[_0x1f13cd(0xf7)]))return _0x35546e;if(_0x580473)_0x50fc89[_0x1f13cd(0x10a)]('displayName',_0x580473);else{if(_0x50fc89['has'](_0x1f13cd(0x103)))_0x50fc89[_0x1f13cd(0x10c)]('displayName');else return _0x35546e;}forceBlockCollections(_0x50fc89[_0x1f13cd(0xf7)]);const _0x1273d4=_0x50fc89['toString']({'lineWidth':0x0})['trimEnd'](),_0x5460a4=_0x35546e[_0x1f13cd(0x11a)](_0x178ced[0x0][_0x1f13cd(0xf6)])['replace'](/^\r?\n/,'');return _0x127ebb+_0x1f13cd(0x119)+_0x1273d4+_0x1f13cd(0x11f)+_0x5460a4;}function forceBlockCollections(_0x21e170){if(!isNode(_0x21e170))return;visit(_0x21e170,(_0x12b6aa,_0x4cdbb5)=>{const _0x18ef15=a102_0x18bb;isCollection(_0x4cdbb5)&&(_0x4cdbb5[_0x18ef15(0x100)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x328248,_0xf62ece,_0x5c3d6b,_0x3e5f71){const _0x5c0809=a102_0x18bb;if(_0x3e5f71||!existsSync(_0xf62ece))return;const _0x2e2545=readMetadataIfPresent(_0xf62ece);if(!_0x2e2545)return;const _0x52466b=_0x2e2545[_0x5c0809(0x106)]&&Object[_0x5c0809(0x111)](_0x2e2545['fileHashes'])[_0x5c0809(0xf6)]>0x0?_0x2e2545[_0x5c0809(0x106)]:undefined;if(_0x52466b)for(const [_0x45755e,_0x4035a9]of Object[_0x5c0809(0x105)](_0x52466b)){const _0x578782=resolveManagedFilePath(_0x328248,_0x45755e);if(!existsSync(_0x578782))throw CliErrors['validation'](_0x5c0809(0xf8)+_0x328248,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x45755e);const _0x58c57b=lstatSync(_0x578782);if(!_0x58c57b[_0x5c0809(0x109)]())throw CliErrors[_0x5c0809(0xfe)](_0x5c0809(0xf8)+_0x328248,_0x5c0809(0xed)+_0x45755e);const _0x2658ff=bufferSha256(readFileSync(_0x578782));if(_0x2658ff!==_0x4035a9)throw CliErrors[_0x5c0809(0xfe)](_0x5c0809(0xf8)+_0x328248+_0x5c0809(0xf5)+_0x45755e,_0x5c0809(0x121)+_0x45755e);}else{const _0x14d698=resolve(_0x328248,SKILL_FILE);if(existsSync(_0x14d698)&&_0x2e2545[_0x5c0809(0x116)]){const _0x1017f0=contentHash(readFileSync(_0x14d698,_0x5c0809(0xfd)));if(_0x1017f0!==_0x2e2545['contentHash'])throw CliErrors[_0x5c0809(0xfe)]('Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20'+_0x14d698,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0xd3542f of normalizeLocalFiles(_0x5c3d6b)){if(_0x52466b?.[_0xd3542f['path']])continue;if(!_0x52466b&&_0xd3542f[_0x5c0809(0x101)]===SKILL_FILE)continue;const _0x269a05=resolveManagedFilePath(_0x328248,_0xd3542f['path']);if(!existsSync(_0x269a05))continue;const _0x478a09=lstatSync(_0x269a05);if(!_0x478a09['isFile']())throw CliErrors[_0x5c0809(0xfe)](_0x5c0809(0xf8)+_0x328248,_0x5c0809(0x108)+_0xd3542f['path']);const _0x1bec2c=bufferSha256(readFileSync(_0x269a05));if(_0x1bec2c!==fileHash(_0xd3542f))throw CliErrors[_0x5c0809(0xfe)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x328248,_0x5c0809(0xf0)+_0xd3542f[_0x5c0809(0x101)]);}}function materializeFiles(_0x2c1960,_0x253a99){const _0x3df62d=a102_0x18bb;for(const _0x52e09b of normalizeLocalFiles(_0x253a99)){const _0x2cf2e8=resolveManagedFilePath(_0x2c1960,_0x52e09b[_0x3df62d(0x101)]);mkdirSync(dirname(_0x2cf2e8),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2cf2e8,fileContent(_0x52e09b),0x180);}}function removeStaleManagedFiles(_0x346e3b,_0x17379d,_0x31219e){const _0x972e61=a102_0x18bb;if(!_0x17379d)return;const _0x29ba70=new Set(normalizeLocalFiles(_0x31219e)[_0x972e61(0xfa)](_0x195909=>_0x195909[_0x972e61(0x101)]));for(const _0x4adb45 of Object['keys'](_0x17379d)){if(_0x29ba70[_0x972e61(0x112)](_0x4adb45))continue;const _0x37be33=resolveManagedFilePath(_0x346e3b,_0x4adb45);existsSync(_0x37be33)&&lstatSync(_0x37be33)[_0x972e61(0x109)]()&&rmSync(_0x37be33,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x68426b,_0x4fc24f){const _0x200757=a103_0xd238,_0x5206e4=_0x68426b();while(!![]){try{const _0x59a825=-parseInt(_0x200757(0x163))/0x1*(parseInt(_0x200757(0x17d))/0x2)+parseInt(_0x200757(0x178))/0x3*(parseInt(_0x200757(0x174))/0x4)+parseInt(_0x200757(0x175))/0x5*(parseInt(_0x200757(0x167))/0x6)+-parseInt(_0x200757(0x176))/0x7+parseInt(_0x200757(0x15f))/0x8*(-parseInt(_0x200757(0x16b))/0x9)+parseInt(_0x200757(0x169))/0xa+parseInt(_0x200757(0x181))/0xb*(-parseInt(_0x200757(0x171))/0xc);if(_0x59a825===_0x4fc24f)break;else _0x5206e4['push'](_0x5206e4['shift']());}catch(_0x386b81){_0x5206e4['push'](_0x5206e4['shift']());}}}(a103_0x586a,0x7b8d1));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';function a103_0xd238(_0x2c4e62,_0x51cfeb){_0x2c4e62=_0x2c4e62-0x15c;const _0x586a12=a103_0x586a();let _0xd2387f=_0x586a12[_0x2c4e62];return _0xd2387f;}import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a103_0x586a(){const _0xd5709=['8367108MbiCUB','path','length','20XPEXXW','792035RlXMfe','2397647qEZeui','skillName','498369pBOaQj','utf8','fromEntries','files','tags','633322nBaXSj','readonly','ossPath','object','11IcQlbw','isArray','version','manifest','string','description','forkedFromSkillId','251288doKsTf','hasUpstreamUpdate','tenantCode','zipSha256','3EqLmEW','trim','Runtime\x20Skill\x20is\x20missing\x20skillCode.','personal','36bFTZtj','validation','8718260NNGKMJ','sourceSessionId','45iBaOWl','forkedFromVersion','toISOString','Invalid\x20','zipSize','map'];a103_0x586a=function(){return _0xd5709;};return a103_0x586a();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x4cd4b9,_0x5ea078,_0x22bfca,_0x4ef16f,_0xdfbe8,_0x1b4abc,_0x2891f6){const _0x31116b=a103_0xd238,_0x5130b9=_0x1b4abc?normalizeLocalFiles(_0x1b4abc):[],_0x2cab05=!_0x2891f6&&_0x5130b9[_0x31116b(0x173)]>0x0?buildSkillPackage(_0x5130b9):undefined,_0x5ae80f=_0x2891f6?bufferSha256(_0x2891f6):_0x2cab05?.[_0x31116b(0x184)][_0x31116b(0x162)],_0x3b9380=_0x2891f6?.[_0x31116b(0x173)]??_0x2cab05?.[_0x31116b(0x184)][_0x31116b(0x16f)],_0x568561=_0x5130b9[_0x31116b(0x173)]>0x0?Object[_0x31116b(0x17a)](_0x5130b9[_0x31116b(0x170)](_0x9764ec=>[_0x9764ec[_0x31116b(0x172)],fileHash(_0x9764ec)])):undefined;return{'schemaVersion':_0x5130b9['length']>0x0?0x2:0x1,'id':_0x4cd4b9['id'],'appCode':_0x22bfca,'skillCode':requireSkillCode(_0x4cd4b9),'skillName':_0x4cd4b9[_0x31116b(0x177)],'description':_0x4cd4b9[_0x31116b(0x15d)],'scope':_0x5ea078,'readonly':_0x5ea078!==_0x31116b(0x166)||_0x4cd4b9[_0x31116b(0x17e)]===!![],'tenantCode':_0x4cd4b9[_0x31116b(0x161)],'userId':_0x4cd4b9['userId'],'version':_0x4cd4b9[_0x31116b(0x183)],'status':_0x4cd4b9['status'],'tags':Array[_0x31116b(0x182)](_0x4cd4b9[_0x31116b(0x17c)])?_0x4cd4b9[_0x31116b(0x17c)]:[],'hasUpstreamUpdate':_0x4cd4b9[_0x31116b(0x160)],'forkedFromSkillId':_0x4cd4b9[_0x31116b(0x15e)],'forkedFromVersion':_0x4cd4b9[_0x31116b(0x16c)],'sourceSessionId':_0x4cd4b9[_0x31116b(0x16a)],'contentHash':_0x4ef16f,'fileHashes':_0x568561,'treeHash':_0x5130b9['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x5130b9)):undefined,'ossPath':remoteManifestOssPath(_0x4cd4b9[_0x31116b(0x17b)]),'zipSha256':_0x5ae80f,'zipSize':_0x3b9380,'files':_0x5130b9['length']>0x0?_0x5130b9[_0x31116b(0x170)](_0x1b05bc=>({'path':_0x1b05bc[_0x31116b(0x172)],'hash':fileHash(_0x1b05bc),'size':fileContent(_0x1b05bc)[_0x31116b(0x173)]})):undefined,'pulledAt':_0xdfbe8??new Date()[_0x31116b(0x16d)]()};}export function requireSkillCode(_0x52c6f2){const _0x52bc7a=a103_0xd238,_0x303225=_0x52c6f2['skillCode']?.[_0x52bc7a(0x164)]();if(!_0x303225)throw CliErrors[_0x52bc7a(0x168)](_0x52bc7a(0x165));return _0x303225;}export function readMetadataIfPresent(_0x379db0){const _0x3f7b56=a103_0xd238;if(!existsSync(_0x379db0))return undefined;try{const _0x918990=JSON['parse'](readFileSync(_0x379db0,_0x3f7b56(0x179)));return _0x918990;}catch{throw CliErrors[_0x3f7b56(0x168)](_0x3f7b56(0x16e)+METADATA_FILE+':\x20'+_0x379db0);}}function remoteManifestOssPath(_0x3d9810){const _0x3ccf7c=a103_0xd238;if(!_0x3d9810||typeof _0x3d9810!==_0x3ccf7c(0x180)||Array[_0x3ccf7c(0x182)](_0x3d9810))return undefined;const _0x563f9c=_0x3d9810[_0x3ccf7c(0x17f)];return typeof _0x563f9c===_0x3ccf7c(0x15c)&&_0x563f9c[_0x3ccf7c(0x164)]()?_0x563f9c[_0x3ccf7c(0x164)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a104_0x4c27a5=a104_0x26cd;(function(_0x4c9d76,_0x1e7b21){const _0x536c36=a104_0x26cd,_0x4e527e=_0x4c9d76();while(!![]){try{const _0x373537=parseInt(_0x536c36(0x19e))/0x1*(-parseInt(_0x536c36(0x197))/0x2)+-parseInt(_0x536c36(0x19b))/0x3*(-parseInt(_0x536c36(0x18a))/0x4)+parseInt(_0x536c36(0x1a6))/0x5*(parseInt(_0x536c36(0x195))/0x6)+parseInt(_0x536c36(0x19f))/0x7+-parseInt(_0x536c36(0x1a2))/0x8*(-parseInt(_0x536c36(0x19d))/0x9)+-parseInt(_0x536c36(0x19a))/0xa+parseInt(_0x536c36(0x192))/0xb*(-parseInt(_0x536c36(0x1a4))/0xc);if(_0x373537===_0x1e7b21)break;else _0x4e527e['push'](_0x4e527e['shift']());}catch(_0x310880){_0x4e527e['push'](_0x4e527e['shift']());}}}(a104_0x3243,0x4962f));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';function a104_0x3243(){const _0x25b220=['SKILL_ROOT','7990iuHYOr','4fXQtpq','homeDir','cache','skillCode','path\x20segment','homeDirName','claudeSkillsDir','filter','55781wdriot','validation','cacheRoot','12oWIRFf','includes','202teqSFE','workbuddySkillsDir','skills','4372320KVJBqr','1358841viiYYq','trim','2832723MUYgOf','1501hQypfa','1007223kXmAyL','Unsafe\x20','.claude','8cAglVP','CLAUDE_SKILL_ROOT','60PclkYL'];a104_0x3243=function(){return _0x25b220;};return a104_0x3243();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x6e9c4f={}){const _0xb697b=a104_0x26cd,_0x5a3709=_0x6e9c4f[_0xb697b(0x18b)]??homedir(),_0x2671ff=resolve(_0x5a3709,PRODUCT_CONFIG[_0xb697b(0x18f)],_0xb697b(0x18c)),_0x668790=trimmedEnv(_0xb697b(0x1a5)),_0x306704=trimmedEnv(_0xb697b(0x1a3)),_0xcc55b=resolve(_0x5a3709,'.workbuddy'),_0x37d617=_0x6e9c4f['workbuddySkillsDir']??(existsSync(_0xcc55b)?resolve(_0xcc55b,_0xb697b(0x199)):undefined);return{'homeDir':_0x5a3709,'cacheRoot':_0x2671ff,'managedRoot':resolve(_0x5a3709,PRODUCT_CONFIG[_0xb697b(0x18f)]),'agentsSkillsDir':_0x6e9c4f['agentsSkillsDir']??_0x668790??resolve(_0x5a3709,'.agents',_0xb697b(0x199)),'claudeSkillsDir':_0x6e9c4f[_0xb697b(0x190)]??_0x306704??resolve(_0x5a3709,_0xb697b(0x1a1),_0xb697b(0x199)),'workbuddySkillsDir':_0x37d617};}export function runtimeAgentSkillRoots(_0x4601ab){const _0x47a516=a104_0x26cd;return[_0x4601ab['agentsSkillsDir'],_0x4601ab['claudeSkillsDir'],_0x4601ab[_0x47a516(0x198)]][_0x47a516(0x191)](_0x3ade30=>Boolean(_0x3ade30));}export function getRuntimeSkillCacheRoot(_0xf5520,_0x41370b,_0xa69f96={}){const _0x52292f=a104_0x26cd,_0x16e629=resolveSkillSyncPaths(_0xa69f96);return resolve(_0x16e629[_0x52292f(0x194)],_0xf5520,fingerprintAccessKey(_0x41370b),_0x52292f(0x199));}export function getRuntimeSkillDir(_0x3e3048,_0x250b61,_0x432c17,_0x35f349,_0x781a29,_0x3db100={}){const _0x4066f4=a104_0x26cd;return resolve(getRuntimeSkillCacheRoot(_0x3e3048,_0x250b61,_0x3db100),safePathSegment(_0x432c17,'appCode'),_0x35f349,safePathSegment(_0x781a29,_0x4066f4(0x18d)));}export function safePathSegment(_0x136350,_0x2e3ed3=a104_0x4c27a5(0x18e)){const _0x5fd713=a104_0x4c27a5;if(!_0x136350||_0x136350['includes']('/')||_0x136350[_0x5fd713(0x196)]('\x5c')||_0x136350[_0x5fd713(0x196)]('..'))throw CliErrors[_0x5fd713(0x193)](_0x5fd713(0x1a0)+_0x2e3ed3+'\x20for\x20local\x20path:\x20'+_0x136350);return _0x136350;}function a104_0x26cd(_0x344b0c,_0x4175cf){_0x344b0c=_0x344b0c-0x18a;const _0x32430b=a104_0x3243();let _0x26cd84=_0x32430b[_0x344b0c];return _0x26cd84;}function trimmedEnv(_0x59dc10){const _0x2cfac9=a104_0x4c27a5,_0x12c4b3=productEnv(_0x59dc10)?.[_0x2cfac9(0x19c)]();return _0x12c4b3?_0x12c4b3:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x3dcf71,_0x430001){const _0x55639b=a105_0x54ce,_0x315b12=_0x3dcf71();while(!![]){try{const _0x18fced=parseInt(_0x55639b(0x1ff))/0x1*(parseInt(_0x55639b(0x1df))/0x2)+-parseInt(_0x55639b(0x1e5))/0x3*(parseInt(_0x55639b(0x1d7))/0x4)+parseInt(_0x55639b(0x20b))/0x5*(-parseInt(_0x55639b(0x212))/0x6)+-parseInt(_0x55639b(0x217))/0x7*(parseInt(_0x55639b(0x1f3))/0x8)+-parseInt(_0x55639b(0x20c))/0x9*(parseInt(_0x55639b(0x1e9))/0xa)+-parseInt(_0x55639b(0x203))/0xb*(parseInt(_0x55639b(0x1d6))/0xc)+parseInt(_0x55639b(0x207))/0xd;if(_0x18fced===_0x430001)break;else _0x315b12['push'](_0x315b12['shift']());}catch(_0xb7d90f){_0x315b12['push'](_0x315b12['shift']());}}}(a105_0x537a,0xc7fb3));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x3ce407}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a105_0x54ce(_0xc3a10a,_0x1965b3){_0xc3a10a=_0xc3a10a-0x1d5;const _0x537a29=a105_0x537a();let _0x54ce54=_0x537a29[_0xc3a10a];return _0x54ce54;}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';function a105_0x537a(){const _0x1ba536=['isArray','Skill\x20metadata\x20appCode\x20\x22','95boSeap','3279339oLTjpb','builtin','version','match','ignoreMetadataAppCodeMismatch','dir','251292aHZxCM','replace','allowAppCodeRetarget','ignoreMetadataSkillCode','trim','235970oOtlGy','tags','path','number','24zEWrIh','48WTNXcr','unknown','Invalid\x20','personal','validation','files','ignoreMetadataForPayload','ignoreMetadataScope','4wsflJx','boolean','\x20name\x20for\x20SkillHub\x20slug\x20generation.','Skill\x20directory\x20not\x20found:\x20','content','description','185787pQracS','isSymbolicLink','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','refreshedAt','20waPYXz','manifest','displayName','Missing\x20','skillName','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','company',',\x20or\x20directory\x20name.','appCode','Unable\x20to\x20resolve\x20skillCode\x20from\x20','184RtGoJB','(unknown)','isDirectory','targetScope','ignoreInvalidMetadata','pushedAt','sourceSessionId','packageBase64','isFile','skillCode','Remote\x20Skill\x20','\x20has\x20scope=\x22','421478GqMBsL','utf8','find','some','6849964LrhWVj','name','slice','length','55439709ZOKsfj','scope'];a105_0x537a=function(){return _0x1ba536;};return a105_0x537a();}import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x27ef66,_0x103ada,_0x50930c={}){const _0x5a456e=a105_0x54ce,_0x169d82=resolvePushDirectoryRoot(_0x27ef66),_0x3442df=readPushMetadataIfPresent(resolve(_0x169d82,METADATA_FILE),{'ignoreInvalidMetadata':_0x50930c['ignoreInvalidMetadata']});if(_0x3442df?.[_0x5a456e(0x1f1)]&&_0x3442df['appCode']!==_0x103ada&&!_0x50930c[_0x5a456e(0x214)]&&!_0x50930c[_0x5a456e(0x210)])throw CliErrors['validation'](_0x5a456e(0x20a)+_0x3442df[_0x5a456e(0x1f1)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x103ada+'\x22.');const _0x30eb63=resolvePushSkillCode(_0x169d82,_0x103ada,_0x3442df,_0x50930c);if(!_0x30eb63)throw CliErrors['validation'](_0x5a456e(0x1f2)+SKILL_FILE+',\x20'+METADATA_FILE+_0x5a456e(0x1f0));return{'dir':_0x169d82,'skillCode':_0x30eb63,'metadata':_0x3442df};}export function readPushDirectory(_0x9358b1,_0x5779c3,_0x43b0b5={}){const _0x4384b9=a105_0x54ce,_0x65f757=resolvePushDirectoryIdentity(_0x9358b1,_0x5779c3,_0x43b0b5),_0x301591=_0x65f757[_0x4384b9(0x211)],_0x1fa0e8=resolve(_0x301591,SKILL_FILE);if(!existsSync(_0x1fa0e8)||!lstatSync(_0x1fa0e8)['isFile']())throw CliErrors[_0x4384b9(0x1db)](_0x4384b9(0x1ec)+SKILL_FILE+':\x20'+_0x1fa0e8);const _0x4a1a27=_0x65f757['metadata'],_0x23475f=_0x43b0b5[_0x4384b9(0x1f6)]??_0x4384b9(0x1da);if(!_0x43b0b5[_0x4384b9(0x1de)]&&_0x4a1a27?.['scope']===_0x4384b9(0x20d))throw CliErrors['validation'](_0x4384b9(0x1ee)+METADATA_FILE+_0x4384b9(0x1fe)+_0x4a1a27[_0x4384b9(0x208)]+'\x22.');if(!_0x43b0b5[_0x4384b9(0x1de)]&&_0x23475f===_0x4384b9(0x1da)&&_0x4a1a27?.[_0x4384b9(0x208)]&&_0x4a1a27[_0x4384b9(0x208)]!==_0x4384b9(0x1da))throw CliErrors['validation'](_0x4384b9(0x1e7)+METADATA_FILE+_0x4384b9(0x1fe)+_0x4a1a27[_0x4384b9(0x208)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x301591+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0xb78437=scanSkillDirectory(_0x301591),_0x24c121=buildSkillPackage(_0xb78437),_0x43aafd=readFileSync(_0x1fa0e8,'utf8'),_0x309e3b=_0x65f757[_0x4384b9(0x1fc)],_0x7356da=_0x43b0b5[_0x4384b9(0x1dd)]?undefined:_0x4a1a27,_0x1c8ec4=readSkillDisplayName(_0x43aafd);return{'skillCode':_0x309e3b,'metadata':_0x4a1a27,'frontmatterDisplayName':_0x1c8ec4,'input':{'skillCode':_0x309e3b,'skillName':_0x1c8ec4??_0x7356da?.[_0x4384b9(0x1ed)],'description':_0x7356da?.['description'],'content':_0x43aafd,'files':_0x24c121[_0x4384b9(0x1ea)],'packageBase64':_0x24c121[_0x4384b9(0x1fa)],'tags':_0x7356da?.['tags'],'version':_0x7356da?.[_0x4384b9(0x20e)],'sourceSessionId':_0x7356da?.[_0x4384b9(0x1f9)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x23f203,_0x1b0d47,_0x5ce362,_0x43711e={}){const _0x3aa576=a105_0x54ce,_0x16b9bd=resolvePushDirectoryRoot(_0x23f203),_0x57f0fc=readPushMetadataIfPresent(resolve(_0x16b9bd,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x35f8aa=requireRemoteScope(_0x1b0d47),_0x220a69=readLocalSkillContent(_0x16b9bd),_0x138c2b={..._0x1b0d47,'appCode':_0x1b0d47[_0x3aa576(0x1f1)]??_0x5ce362,'skillName':_0x1b0d47[_0x3aa576(0x1ed)]??_0x57f0fc?.['skillName'],'description':_0x1b0d47[_0x3aa576(0x1e4)]??_0x57f0fc?.[_0x3aa576(0x1e4)],'tags':Array['isArray'](_0x1b0d47[_0x3aa576(0x218)])?_0x1b0d47[_0x3aa576(0x218)]:_0x57f0fc?.['tags'],'sourceSessionId':_0x1b0d47['sourceSessionId']??_0x57f0fc?.[_0x3aa576(0x1f9)],'content':_0x1b0d47[_0x3aa576(0x1e3)]??_0x220a69},_0x55cc09=buildMetadata(_0x138c2b,_0x35f8aa,_0x5ce362,contentHash(_0x220a69),_0x43711e[_0x3aa576(0x1e8)]);writeJsonAtomic(resolve(_0x16b9bd,METADATA_FILE),_0x55cc09);}export function recordPushedRuntimeSkill(_0x388cd1,_0x33b9a3,_0x2d9680,_0x432721={}){const _0x51fb2d=a105_0x54ce,_0x58c3aa=resolvePushDirectoryRoot(_0x388cd1),_0x5534c8=scanSkillDirectory(_0x58c3aa),_0x30bbbc=_0x5534c8[_0x51fb2d(0x201)](_0xad195e=>_0xad195e['path']===SKILL_FILE),_0x439aa5=_0x30bbbc?fileText(_0x30bbbc):'',_0x14a67a=tryNormalizePackageManifest(_0x33b9a3[_0x51fb2d(0x1dc)]),_0x56759c={..._0x33b9a3,'content':_0x33b9a3['content']??_0x439aa5,'files':_0x14a67a},_0x2594b4=_0x14a67a?normalizeLocalFiles(_0x5534c8)['filter'](_0x96e241=>_0x14a67a[_0x51fb2d(0x1dc)][_0x51fb2d(0x202)](_0x361079=>_0x361079[_0x51fb2d(0x219)]===_0x96e241[_0x51fb2d(0x219)])):undefined,_0x2bd1bd=buildMetadata(_0x56759c,_0x432721[_0x51fb2d(0x208)]??_0x51fb2d(0x1da),_0x2d9680,contentHash(_0x56759c['content']??''),_0x432721[_0x51fb2d(0x1f8)],_0x2594b4);writeJsonAtomic(resolve(_0x58c3aa,METADATA_FILE),_0x2bd1bd);}export function deriveSkillCodeFromDirectory(_0x4415dd,_0x131acf){const _0x5dca8b=a105_0x54ce,_0x2f5061=basename(resolve(_0x4415dd)),_0x385008=_0x131acf+'--';return _0x2f5061['startsWith'](_0x385008)?_0x2f5061[_0x5dca8b(0x205)](_0x385008[_0x5dca8b(0x206)]):_0x2f5061;}function resolvePushSkillCode(_0x5a1e23,_0x54b21d,_0x58f0f3,_0x348042){const _0x3f1271=a105_0x54ce,_0x2a2b5b=deriveSkillCodeFromSkillFile(_0x5a1e23)||deriveSkillCodeFromDirectory(_0x5a1e23,_0x54b21d);if(_0x348042[_0x3f1271(0x215)])return _0x2a2b5b;return _0x58f0f3?.['skillCode']?.[_0x3f1271(0x216)]()||_0x2a2b5b;}function deriveSkillCodeFromSkillFile(_0x457178){const _0x2a1fd0=a105_0x54ce,_0x44aecb=resolve(_0x457178,SKILL_FILE);if(!existsSync(_0x44aecb)||!lstatSync(_0x44aecb)['isFile']())return undefined;const _0x3f8e67=readFileSync(_0x44aecb,_0x2a1fd0(0x200)),_0x54aa43=_0x3f8e67[_0x2a1fd0(0x20f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x54aa43)return undefined;const _0x47a8da=parseFrontmatterObject(_0x54aa43[0x1]??''),_0x153b50=scalarToString(_0x47a8da?.[_0x2a1fd0(0x204)]);return _0x153b50?slugifySkillName(_0x153b50):undefined;}function readSkillDisplayName(_0x43f173){const _0x557856=a105_0x54ce,_0x4bc817=_0x43f173[_0x557856(0x20f)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x4bc817)return undefined;const _0x1f07f0=parseFrontmatterObject(_0x4bc817[0x1]??'');return scalarToString(_0x1f07f0?.[_0x557856(0x1eb)]);}function slugifySkillName(_0x2ff9df){const _0x1e33c8=a105_0x54ce,_0x528622=_0x2ff9df[_0x1e33c8(0x216)]()['toLowerCase']()[_0x1e33c8(0x213)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x1e33c8(0x213)](/^-+/,'')[_0x1e33c8(0x213)](/-+$/,'')[_0x1e33c8(0x213)](/-{2,}/g,'-');if(!_0x528622)throw CliErrors['validation'](_0x1e33c8(0x1d9)+SKILL_FILE+_0x1e33c8(0x1e1));return _0x528622;}function parseFrontmatterObject(_0x772b5a){const _0x41d7d7=a105_0x54ce;try{const _0x4a8767=a105_0x3ce407(_0x772b5a);return _0x4a8767&&typeof _0x4a8767==='object'&&!Array[_0x41d7d7(0x209)](_0x4a8767)?_0x4a8767:undefined;}catch{return undefined;}}function scalarToString(_0x1cb648){const _0x576413=a105_0x54ce;if(typeof _0x1cb648==='string')return _0x1cb648[_0x576413(0x216)]();if(typeof _0x1cb648===_0x576413(0x1d5)||typeof _0x1cb648===_0x576413(0x1e0))return String(_0x1cb648);return undefined;}function resolvePushDirectoryRoot(_0x9bc099){const _0x49cf98=a105_0x54ce,_0x33f7c9=resolve(_0x9bc099);if(!existsSync(_0x33f7c9))throw CliErrors[_0x49cf98(0x1db)](_0x49cf98(0x1e2)+_0x9bc099);const _0x163feb=lstatSync(_0x33f7c9);if(_0x163feb[_0x49cf98(0x1f5)]())return _0x33f7c9;if(_0x163feb[_0x49cf98(0x1e6)]()){const _0x1638d9=realpathSync(_0x33f7c9);if(lstatSync(_0x1638d9)[_0x49cf98(0x1f5)]())return _0x1638d9;}throw CliErrors['validation'](_0x49cf98(0x1e2)+_0x9bc099);}function requireRemoteScope(_0xb75270){const _0x294541=a105_0x54ce;if(_0xb75270['scope']==='personal'||_0xb75270['scope']===_0x294541(0x1ef)||_0xb75270['scope']==='builtin')return _0xb75270[_0x294541(0x208)];throw CliErrors[_0x294541(0x1db)](_0x294541(0x1fd)+(_0xb75270['skillCode']||_0x294541(0x1f4))+'\x20has\x20unsupported\x20scope\x20\x22'+(_0xb75270[_0x294541(0x208)]??_0x294541(0x1d8))+'\x22.');}function readLocalSkillContent(_0x26f04e){const _0xa2e736=a105_0x54ce,_0x3ff6c0=resolve(_0x26f04e,SKILL_FILE);return existsSync(_0x3ff6c0)&&lstatSync(_0x3ff6c0)[_0xa2e736(0x1fb)]()?readFileSync(_0x3ff6c0,'utf8'):'';}function readPushMetadataIfPresent(_0x418e22,_0x4a719e={}){const _0xd49383=a105_0x54ce;try{return readMetadataIfPresent(_0x418e22);}catch(_0x5f37dc){if(_0x4a719e[_0xd49383(0x1f7)])return undefined;throw _0x5f37dc;}}
|
|
1
|
+
(function(_0x339557,_0xdda376){const _0x44dbcf=a105_0x59d7,_0x2b17be=_0x339557();while(!![]){try{const _0x407a49=parseInt(_0x44dbcf(0x1fc))/0x1+parseInt(_0x44dbcf(0x1f2))/0x2+parseInt(_0x44dbcf(0x1eb))/0x3+-parseInt(_0x44dbcf(0x1cd))/0x4+-parseInt(_0x44dbcf(0x1e5))/0x5+-parseInt(_0x44dbcf(0x1d8))/0x6+parseInt(_0x44dbcf(0x1cf))/0x7;if(_0x407a49===_0xdda376)break;else _0x2b17be['push'](_0x2b17be['shift']());}catch(_0x1b4a07){_0x2b17be['push'](_0x2b17be['shift']());}}}(a105_0x1dd7,0x8793c));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a105_0x1e4456}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(_0x95562d,_0x46aba8,_0x43b4ce={}){const _0x88627a=a105_0x59d7,_0x4e09ff=resolvePushDirectoryRoot(_0x95562d),_0x1e1ae8=readPushMetadataIfPresent(resolve(_0x4e09ff,METADATA_FILE),{'ignoreInvalidMetadata':_0x43b4ce[_0x88627a(0x1dd)]});if(_0x1e1ae8?.[_0x88627a(0x1e8)]&&_0x1e1ae8['appCode']!==_0x46aba8&&!_0x43b4ce['allowAppCodeRetarget']&&!_0x43b4ce[_0x88627a(0x1e4)])throw CliErrors[_0x88627a(0x1d7)]('Skill\x20metadata\x20appCode\x20\x22'+_0x1e1ae8[_0x88627a(0x1e8)]+_0x88627a(0x1de)+_0x46aba8+'\x22.');const _0x27def8=resolvePushSkillCode(_0x4e09ff,_0x46aba8,_0x1e1ae8,_0x43b4ce);if(!_0x27def8)throw CliErrors['validation']('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x88627a(0x1d0));return{'dir':_0x4e09ff,'skillCode':_0x27def8,'metadata':_0x1e1ae8};}export function readPushDirectory(_0x521049,_0x37b2d0,_0x417df9={}){const _0x3822e7=a105_0x59d7,_0x58b3ee=resolvePushDirectoryIdentity(_0x521049,_0x37b2d0,_0x417df9),_0x2b90e6=_0x58b3ee['dir'],_0x5b344b=resolve(_0x2b90e6,SKILL_FILE);if(!existsSync(_0x5b344b)||!lstatSync(_0x5b344b)[_0x3822e7(0x1cc)]())throw CliErrors['validation'](_0x3822e7(0x1da)+SKILL_FILE+':\x20'+_0x5b344b);const _0x4d7641=_0x58b3ee[_0x3822e7(0x1f0)],_0x5b577d=_0x417df9['targetScope']??'personal';if(!_0x417df9[_0x3822e7(0x1ce)]&&_0x4d7641?.[_0x3822e7(0x1df)]===_0x3822e7(0x1f9))throw CliErrors[_0x3822e7(0x1d7)](_0x3822e7(0x1fe)+METADATA_FILE+_0x3822e7(0x1f1)+_0x4d7641[_0x3822e7(0x1df)]+'\x22.');if(!_0x417df9[_0x3822e7(0x1ce)]&&_0x5b577d===_0x3822e7(0x1ca)&&_0x4d7641?.[_0x3822e7(0x1df)]&&_0x4d7641[_0x3822e7(0x1df)]!==_0x3822e7(0x1ca))throw CliErrors[_0x3822e7(0x1d7)](_0x3822e7(0x1d2)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x4d7641['scope']+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x2b90e6+_0x3822e7(0x1c6));const _0x2f778b=scanSkillDirectory(_0x2b90e6),_0x2e4e70=buildSkillPackage(_0x2f778b),_0x3ad133=readFileSync(_0x5b344b,_0x3822e7(0x1f5)),_0x5b159d=_0x58b3ee[_0x3822e7(0x1ff)],_0xaf1d7a=_0x417df9['ignoreMetadataForPayload']?undefined:_0x4d7641,_0x1798e8=readSkillDisplayName(_0x3ad133);return{'skillCode':_0x5b159d,'metadata':_0x4d7641,'frontmatterDisplayName':_0x1798e8,'input':{'skillCode':_0x5b159d,'skillName':_0x1798e8??_0xaf1d7a?.[_0x3822e7(0x200)],'description':_0xaf1d7a?.['description'],'content':_0x3ad133,'files':_0x2e4e70[_0x3822e7(0x1d9)],'packageBase64':_0x2e4e70[_0x3822e7(0x1f6)],'tags':_0xaf1d7a?.[_0x3822e7(0x1e0)],'version':_0xaf1d7a?.['version'],'sourceSessionId':_0xaf1d7a?.[_0x3822e7(0x1f4)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x10b7da,_0x2faea3,_0x62b3f3,_0x5c40a5={}){const _0x5bb87c=a105_0x59d7,_0x335672=resolvePushDirectoryRoot(_0x10b7da),_0x39dbc4=readPushMetadataIfPresent(resolve(_0x335672,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x351235=requireRemoteScope(_0x2faea3),_0x5130d4=readLocalSkillContent(_0x335672),_0x45776c={..._0x2faea3,'appCode':_0x2faea3[_0x5bb87c(0x1e8)]??_0x62b3f3,'skillName':_0x2faea3['skillName']??_0x39dbc4?.[_0x5bb87c(0x200)],'description':_0x2faea3[_0x5bb87c(0x1fd)]??_0x39dbc4?.[_0x5bb87c(0x1fd)],'tags':Array[_0x5bb87c(0x1d1)](_0x2faea3[_0x5bb87c(0x1e0)])?_0x2faea3['tags']:_0x39dbc4?.[_0x5bb87c(0x1e0)],'sourceSessionId':_0x2faea3[_0x5bb87c(0x1f4)]??_0x39dbc4?.[_0x5bb87c(0x1f4)],'content':_0x2faea3[_0x5bb87c(0x1e3)]??_0x5130d4},_0x1ed64b=buildMetadata(_0x45776c,_0x351235,_0x62b3f3,contentHash(_0x5130d4),_0x5c40a5[_0x5bb87c(0x1d4)]);writeJsonAtomic(resolve(_0x335672,METADATA_FILE),_0x1ed64b);}export function recordPushedRuntimeSkill(_0x439817,_0xcaa929,_0x47dbfe,_0x25591d={}){const _0x2b76e8=a105_0x59d7,_0x30e1a2=resolvePushDirectoryRoot(_0x439817),_0x25a2e0=scanSkillDirectory(_0x30e1a2),_0x5cfac6=_0x25a2e0['find'](_0x2287fe=>_0x2287fe[_0x2b76e8(0x1ef)]===SKILL_FILE),_0x1c62c6=_0x5cfac6?fileText(_0x5cfac6):'',_0x493745=tryNormalizePackageManifest(_0xcaa929['files']),_0x4426d9={..._0xcaa929,'content':_0xcaa929[_0x2b76e8(0x1e3)]??_0x1c62c6,'files':_0x493745},_0x384723=_0x493745?normalizeLocalFiles(_0x25a2e0)[_0x2b76e8(0x1f3)](_0x5428b5=>_0x493745[_0x2b76e8(0x1c8)][_0x2b76e8(0x1fb)](_0x1d60ba=>_0x1d60ba[_0x2b76e8(0x1ef)]===_0x5428b5[_0x2b76e8(0x1ef)])):undefined,_0x34996b=buildMetadata(_0x4426d9,_0x25591d[_0x2b76e8(0x1df)]??_0x2b76e8(0x1ca),_0x47dbfe,contentHash(_0x4426d9[_0x2b76e8(0x1e3)]??''),_0x25591d[_0x2b76e8(0x1e1)],_0x384723);writeJsonAtomic(resolve(_0x30e1a2,METADATA_FILE),_0x34996b);}function a105_0x1dd7(){const _0x3f9e95=['scope','tags','pushedAt','object','content','ignoreMetadataAppCodeMismatch','3188570tcjHDW','slice','boolean','appCode','\x20has\x20unsupported\x20scope\x20\x22','(unknown)','2563851yydNAT','\x20name\x20for\x20SkillHub\x20slug\x20generation.','number','unknown','path','metadata','\x20has\x20scope=\x22','933294JdLqtl','filter','sourceSessionId','utf8','packageBase64','isDirectory','name','builtin','Remote\x20Skill\x20','some','195922JVCdUS','description','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','skillCode','skillName','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','replace','files','ignoreMetadataSkillCode','personal','Skill\x20directory\x20not\x20found:\x20','isFile','3502568JunAam','ignoreMetadataScope','5164327LQqesM',',\x20or\x20directory\x20name.','isArray','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','displayName','refreshedAt','Invalid\x20','trim','validation','1117602Wiuvmb','manifest','Missing\x20','match','startsWith','ignoreInvalidMetadata','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'];a105_0x1dd7=function(){return _0x3f9e95;};return a105_0x1dd7();}export function deriveSkillCodeFromDirectory(_0x4fa6c5,_0x31b00f){const _0x52658f=a105_0x59d7,_0x13ce43=basename(resolve(_0x4fa6c5)),_0x5c083c=_0x31b00f+'--';return _0x13ce43[_0x52658f(0x1dc)](_0x5c083c)?_0x13ce43[_0x52658f(0x1e6)](_0x5c083c['length']):_0x13ce43;}function resolvePushSkillCode(_0x3e07e3,_0x3ccf33,_0x3733fd,_0x17e672){const _0x49dc9c=a105_0x59d7,_0x16012e=deriveSkillCodeFromSkillFile(_0x3e07e3)||deriveSkillCodeFromDirectory(_0x3e07e3,_0x3ccf33);if(_0x17e672[_0x49dc9c(0x1c9)])return _0x16012e;return _0x3733fd?.[_0x49dc9c(0x1ff)]?.[_0x49dc9c(0x1d6)]()||_0x16012e;}function deriveSkillCodeFromSkillFile(_0x3c677f){const _0x5ef19a=a105_0x59d7,_0x421d10=resolve(_0x3c677f,SKILL_FILE);if(!existsSync(_0x421d10)||!lstatSync(_0x421d10)[_0x5ef19a(0x1cc)]())return undefined;const _0x3ffccc=readFileSync(_0x421d10,_0x5ef19a(0x1f5)),_0x5292cf=_0x3ffccc[_0x5ef19a(0x1db)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5292cf)return undefined;const _0x370dd9=parseFrontmatterObject(_0x5292cf[0x1]??''),_0x447dd8=scalarToString(_0x370dd9?.[_0x5ef19a(0x1f8)]);return _0x447dd8?slugifySkillName(_0x447dd8):undefined;}function readSkillDisplayName(_0xc25405){const _0x82ce18=a105_0x59d7,_0x34e102=_0xc25405[_0x82ce18(0x1db)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x34e102)return undefined;const _0x1ba8aa=parseFrontmatterObject(_0x34e102[0x1]??'');return scalarToString(_0x1ba8aa?.[_0x82ce18(0x1d3)]);}function slugifySkillName(_0x19b0ab){const _0x201582=a105_0x59d7,_0x59f2e7=_0x19b0ab[_0x201582(0x1d6)]()['toLowerCase']()[_0x201582(0x1c7)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x201582(0x1c7)](/^-+/,'')['replace'](/-+$/,'')[_0x201582(0x1c7)](/-{2,}/g,'-');if(!_0x59f2e7)throw CliErrors[_0x201582(0x1d7)](_0x201582(0x1d5)+SKILL_FILE+_0x201582(0x1ec));return _0x59f2e7;}function parseFrontmatterObject(_0x1ad55c){const _0x2c9900=a105_0x59d7;try{const _0x4b46bc=a105_0x1e4456(_0x1ad55c);return _0x4b46bc&&typeof _0x4b46bc===_0x2c9900(0x1e2)&&!Array[_0x2c9900(0x1d1)](_0x4b46bc)?_0x4b46bc:undefined;}catch{return undefined;}}function scalarToString(_0x2c3006){const _0x1376eb=a105_0x59d7;if(typeof _0x2c3006==='string')return _0x2c3006[_0x1376eb(0x1d6)]();if(typeof _0x2c3006===_0x1376eb(0x1ed)||typeof _0x2c3006===_0x1376eb(0x1e7))return String(_0x2c3006);return undefined;}function resolvePushDirectoryRoot(_0x2328f8){const _0x514126=a105_0x59d7,_0x3356b4=resolve(_0x2328f8);if(!existsSync(_0x3356b4))throw CliErrors[_0x514126(0x1d7)](_0x514126(0x1cb)+_0x2328f8);const _0x1657ab=lstatSync(_0x3356b4);if(_0x1657ab[_0x514126(0x1f7)]())return _0x3356b4;if(_0x1657ab['isSymbolicLink']()){const _0x27a306=realpathSync(_0x3356b4);if(lstatSync(_0x27a306)[_0x514126(0x1f7)]())return _0x27a306;}throw CliErrors['validation']('Skill\x20directory\x20not\x20found:\x20'+_0x2328f8);}function a105_0x59d7(_0x3348e0,_0x3c0322){_0x3348e0=_0x3348e0-0x1c6;const _0x1dd7f0=a105_0x1dd7();let _0x59d7de=_0x1dd7f0[_0x3348e0];return _0x59d7de;}function requireRemoteScope(_0x4fb158){const _0xcd2948=a105_0x59d7;if(_0x4fb158[_0xcd2948(0x1df)]===_0xcd2948(0x1ca)||_0x4fb158[_0xcd2948(0x1df)]==='company'||_0x4fb158[_0xcd2948(0x1df)]===_0xcd2948(0x1f9))return _0x4fb158['scope'];throw CliErrors['validation'](_0xcd2948(0x1fa)+(_0x4fb158[_0xcd2948(0x1ff)]||_0xcd2948(0x1ea))+_0xcd2948(0x1e9)+(_0x4fb158['scope']??_0xcd2948(0x1ee))+'\x22.');}function readLocalSkillContent(_0x1300e7){const _0x2fddd5=a105_0x59d7,_0x180377=resolve(_0x1300e7,SKILL_FILE);return existsSync(_0x180377)&&lstatSync(_0x180377)['isFile']()?readFileSync(_0x180377,_0x2fddd5(0x1f5)):'';}function readPushMetadataIfPresent(_0x3710fa,_0x46c19c={}){const _0xfacf3f=a105_0x59d7;try{return readMetadataIfPresent(_0x3710fa);}catch(_0x21de44){if(_0x46c19c[_0xfacf3f(0x1dd)])return undefined;throw _0x21de44;}}
|