@lovrabet/lovrabet-cli 2.3.0-beta.2 → 2.3.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +1 -1
- package/lib/commands/api-doc/index.js +1 -1
- package/lib/commands/app/cache.js +1 -1
- package/lib/commands/app/definitions.js +1 -1
- package/lib/commands/app/eligibility.js +1 -1
- package/lib/commands/app/mock-loader.js +1 -1
- package/lib/commands/app/remote-source.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/artifact/index.js +1 -1
- package/lib/commands/auth/device.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/auth/prompt.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/exec.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/common/config-policy.js +1 -1
- package/lib/commands/common/constraints.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/config/definitions.js +1 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/sdk-doc.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/permit/dataset-get.js +1 -1
- package/lib/commands/permit/dataset-set.js +1 -1
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/personal-bff/index.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/schedule/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/service/dynamic.js +1 -1
- package/lib/commands/service/function-name-adapter.js +1 -1
- package/lib/commands/service/index.js +1 -1
- package/lib/commands/service/registry.js +1 -1
- package/lib/commands/skill/commands/create.js +1 -1
- package/lib/commands/skill/commands/diagram.js +1 -1
- package/lib/commands/skill/commands/install.js +1 -1
- package/lib/commands/skill/commands/list.js +1 -1
- package/lib/commands/skill/commands/push.js +1 -1
- package/lib/commands/skill/commands/validate.js +1 -1
- package/lib/commands/skill/diagram.js +1 -1
- package/lib/commands/skill/flags.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/skill/manifest-helpers.js +1 -1
- package/lib/commands/skill/push-execute.js +1 -1
- package/lib/commands/skill/push-flow-helpers.js +1 -1
- package/lib/commands/skill/push-retarget.js +1 -1
- package/lib/commands/skill/scopes.js +1 -1
- package/lib/commands/skill/summary.js +1 -1
- package/lib/commands/skill/templates.js +1 -1
- package/lib/commands/skill/validate.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/update.js +1 -1
- package/lib/commands/user-account/bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/app.js +1 -1
- package/lib/constant/auth-mode.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/distribution.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/product.js +1 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/url.js +1 -1
- package/lib/context.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/raw-flags.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-confirmation.js +1 -1
- package/lib/framework/runner-error.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/service-order.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/runtime-skill-sync/constants.js +1 -1
- package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
- package/lib/skills/runtime-skill-sync/hashing.js +1 -1
- package/lib/skills/runtime-skill-sync/install-target.js +1 -1
- package/lib/skills/runtime-skill-sync/links.js +1 -1
- package/lib/skills/runtime-skill-sync/list-local.js +1 -1
- package/lib/skills/runtime-skill-sync/local-files.js +1 -1
- package/lib/skills/runtime-skill-sync/materialize.js +1 -1
- package/lib/skills/runtime-skill-sync/metadata.js +1 -1
- package/lib/skills/runtime-skill-sync/paths.js +1 -1
- package/lib/skills/runtime-skill-sync/push.js +1 -1
- package/lib/skills/runtime-skill-sync/scopes.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
- package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
- package/lib/skills/runtime-skill-sync.js +1 -1
- package/lib/skills/skill-presence.js +1 -1
- package/lib/utils/access-key-redaction.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/lossless-json.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/skills/lovrabet/SKILL.md +1 -1
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36fbbf,_0x568271){const _0x1054d2=a135_0x100f,_0xfd5a69=_0x36fbbf();while(!![]){try{const _0x249e4b=-parseInt(_0x1054d2(0x1d8))/0x1+-parseInt(_0x1054d2(0x1d6))/0x2*(-parseInt(_0x1054d2(0x1dc))/0x3)+-parseInt(_0x1054d2(0x1cf))/0x4+-parseInt(_0x1054d2(0x1d1))/0x5*(parseInt(_0x1054d2(0x1cc))/0x6)+-parseInt(_0x1054d2(0x1ca))/0x7+-parseInt(_0x1054d2(0x1c9))/0x8+parseInt(_0x1054d2(0x1d9))/0x9*(parseInt(_0x1054d2(0x1cb))/0xa);if(_0x249e4b===_0x568271)break;else _0xfd5a69['push'](_0xfd5a69['shift']());}catch(_0x330deb){_0xfd5a69['push'](_0xfd5a69['shift']());}}}(a135_0x3976,0xb9457));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(_0x13e8fe,_0x50ea1e){const _0x249f41=a135_0x100f,_0x28fd28=normalizeSkillRelativePath(_0x50ea1e),_0x54bf75=realOrResolved(_0x13e8fe),_0x18c537=resolve(_0x54bf75,..._0x28fd28[_0x249f41(0x1ce)]('/'));if(!isPathInside(_0x18c537,_0x54bf75))throw CliErrors['validation'](_0x249f41(0x1d5)+_0x50ea1e);return ensureNoSymlinkInManagedPath(_0x54bf75,_0x28fd28),_0x18c537;}export function ensureNoSymlinkInManagedPath(_0xe7e57b,_0x4255a9){const _0x332f11=a135_0x100f;let _0x530a28=_0xe7e57b;for(const _0x43ea54 of _0x4255a9[_0x332f11(0x1ce)]('/')){_0x530a28=resolve(_0x530a28,_0x43ea54);const _0x4854fc=lstatIfPresent(_0x530a28);if(_0x4854fc?.[_0x332f11(0x1d0)]())throw CliErrors[_0x332f11(0x1d2)](_0x332f11(0x1da)+_0x4255a9);}}function a135_0x100f(_0x24fcc1,_0x1a22f6){_0x24fcc1=_0x24fcc1-0x1c9;const _0x39760e=a135_0x3976();let _0x100fc2=_0x39760e[_0x24fcc1];return _0x100fc2;}export function isDanglingSymlink(_0x46d164){const _0x5dbf11=a135_0x100f;try{return lstatSync(_0x46d164)[_0x5dbf11(0x1d0)]();}catch{return![];}}export function resolveSymlinkTarget(_0x248ffc){const _0x371a4f=readlinkSync(_0x248ffc);return isAbsolute(_0x371a4f)?_0x371a4f:resolve(dirname(_0x248ffc),_0x371a4f);}export function isPathInside(_0x4fcd8f,_0x567246){const _0x14ad35=a135_0x100f,_0x4372d0=_0x4fcd8f[_0x14ad35(0x1d7)](sep)?_0x4fcd8f:''+_0x4fcd8f+sep,_0x634526=_0x567246[_0x14ad35(0x1d7)](sep)?_0x567246:''+_0x567246+sep;return _0x4fcd8f===_0x567246||_0x4372d0[_0x14ad35(0x1d4)](_0x634526);}export function realOrResolved(_0x2a3131){try{return realpathSync(_0x2a3131);}catch{return resolve(_0x2a3131);}}export function lstatIfPresent(_0x5e6187){try{return lstatSync(_0x5e6187);}catch{return undefined;}}export function writeTextAtomic(_0x2dffc0,_0x4d0fe1,_0x4894d4){const _0x2d6541=a135_0x100f;writeBytesAtomic(_0x2dffc0,Buffer[_0x2d6541(0x1d3)](_0x4d0fe1,'utf8'),_0x4894d4);}function a135_0x3976(){const _0x464564=['970hxxWmF','validation','from','startsWith','Unsafe\x20Skill\x20file\x20path:\x20','1045284rwVGuE','endsWith','574771PICzbC','6964038rjSUjb','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','stringify','3FGnoZy','5726920rGtxiQ','9026402KMuLPa','50WyZeMp','8046qBFXxM','.tmp','split','3169620CREClh','isSymbolicLink'];a135_0x3976=function(){return _0x464564;};return a135_0x3976();}export function writeBytesAtomic(_0x342c54,_0x32dd1d,_0x5488dc){const _0x1fa295=a135_0x100f,_0x13e6aa=_0x342c54+_0x1fa295(0x1cd);try{writeFileSync(_0x13e6aa,_0x32dd1d,{'mode':_0x5488dc}),renameSync(_0x13e6aa,_0x342c54);}catch(_0x3399f7){try{rmSync(_0x13e6aa,{'force':!![]});}catch{}throw _0x3399f7;}}export function writeJsonAtomic(_0x413dac,_0x4e696e){const _0x3679e3=a135_0x100f;writeTextAtomic(_0x413dac,JSON[_0x3679e3(0x1db)](_0x4e696e,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x18aed9,_0x44b179){const _0x4b2dd2=a136_0x2712,_0x41278b=_0x18aed9();while(!![]){try{const _0x1c65ac=-parseInt(_0x4b2dd2(0x9b))/0x1+parseInt(_0x4b2dd2(0x93))/0x2+-parseInt(_0x4b2dd2(0x96))/0x3+-parseInt(_0x4b2dd2(0x92))/0x4+-parseInt(_0x4b2dd2(0x9d))/0x5+-parseInt(_0x4b2dd2(0x9e))/0x6*(parseInt(_0x4b2dd2(0x95))/0x7)+parseInt(_0x4b2dd2(0x97))/0x8;if(_0x1c65ac===_0x44b179)break;else _0x41278b['push'](_0x41278b['shift']());}catch(_0x443eab){_0x41278b['push'](_0x41278b['shift']());}}}(a136_0x58c5,0xcc84f));import{createHash}from'node:crypto';function a136_0x2712(_0x36af4c,_0x1256c3){_0x36af4c=_0x36af4c-0x92;const _0x58c50c=a136_0x58c5();let _0x271209=_0x58c50c[_0x36af4c];return _0x271209;}import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x2f3f5d){const _0x4f6592=a136_0x2712;return createHash(_0x4f6592(0x94))[_0x4f6592(0x98)](_0x2f3f5d)[_0x4f6592(0x9a)](_0x4f6592(0x99));}function a136_0x58c5(){const _0x4601be=['29043216VBmtJB','update','hex','digest','1621051PcKKue','size','1416530pkdWwf','5401902VlHlnw','620860bxTYXO','1462110hFdvyZ','sha256','7tKvRUs','1691571owIqZs'];a136_0x58c5=function(){return _0x4601be;};return a136_0x58c5();}export function fileHash(_0x5bedae){return bufferSha256(fileContent(_0x5bedae));}export function bufferSha256(_0x37c750){const _0x946504=a136_0x2712;return createHash(_0x946504(0x94))[_0x946504(0x98)](_0x37c750)[_0x946504(0x9a)]('hex');}export function fileTreeHash(_0x4080af){const _0xd1a703=a136_0x2712,_0x109b82=createHash(_0xd1a703(0x94));for(const _0x50f0d7 of normalizeManifestFiles(_0x4080af)){_0x109b82[_0xd1a703(0x98)](_0x50f0d7['path']),_0x109b82[_0xd1a703(0x98)]('\x00'),_0x109b82[_0xd1a703(0x98)](_0x50f0d7[_0xd1a703(0x94)]),_0x109b82['update']('\x00'),_0x109b82[_0xd1a703(0x98)](String(_0x50f0d7[_0xd1a703(0x9c)])),_0x109b82[_0xd1a703(0x98)]('\x00');}return _0x109b82['digest'](_0xd1a703(0x99));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a137_0xf74f(_0x3829a9,_0x3caad0){_0x3829a9=_0x3829a9-0x66;const _0x25b069=a137_0x25b0();let _0xf74fe1=_0x25b069[_0x3829a9];return _0xf74fe1;}const a137_0x2ec9c9=a137_0xf74f;(function(_0x52614e,_0x438888){const _0x2894e8=a137_0xf74f,_0x189aea=_0x52614e();while(!![]){try{const _0x288067=-parseInt(_0x2894e8(0x70))/0x1+-parseInt(_0x2894e8(0x68))/0x2*(parseInt(_0x2894e8(0x69))/0x3)+parseInt(_0x2894e8(0x67))/0x4*(parseInt(_0x2894e8(0x76))/0x5)+parseInt(_0x2894e8(0x66))/0x6+-parseInt(_0x2894e8(0x72))/0x7+parseInt(_0x2894e8(0x6a))/0x8+parseInt(_0x2894e8(0x6f))/0x9;if(_0x288067===_0x438888)break;else _0x189aea['push'](_0x189aea['shift']());}catch(_0x57d192){_0x189aea['push'](_0x189aea['shift']());}}}(a137_0x25b0,0x1a049));function a137_0x25b0(){const _0x486d39=['freeze','35LgLsNn','671346kUomYk','13376Txzrbw','2sZMQlq','569982VRKfMp','18168LXzYMQ','cwd','appCode','project','.agents','3382902EjvVpR','193957oKSzQe','skills','160496ycCYGS','managedRoot','global'];a137_0x25b0=function(){return _0x486d39;};return a137_0x25b0();}import{resolve}from'node:path';import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x1ee4e5,_0x4bdbd8=a137_0x2ec9c9(0x74),_0x3ef172={}){const _0x1154a4=a137_0x2ec9c9,_0x409aa2=resolveSkillSyncPaths(_0x3ef172),_0x11b5ff=safePathSegment(_0x1ee4e5,_0x1154a4(0x6c)),_0x5afb8e=_0x4bdbd8===_0x1154a4(0x6d)?[resolve(_0x3ef172['cwd']??process[_0x1154a4(0x6b)](),_0x1154a4(0x6e),_0x1154a4(0x71))]:runtimeAgentSkillRoots(_0x409aa2);return Object[_0x1154a4(0x75)]({'scope':_0x4bdbd8,'appCode':_0x11b5ff,'skillRoots':Object[_0x1154a4(0x75)](_0x5afb8e),'managedRoot':_0x409aa2[_0x1154a4(0x73)]});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a138_0x50ac1a=a138_0x294d;(function(_0x534d63,_0x379e4b){const _0x555187=a138_0x294d,_0x3324c5=_0x534d63();while(!![]){try{const _0x39eed3=-parseInt(_0x555187(0xc1))/0x1+-parseInt(_0x555187(0xa4))/0x2*(parseInt(_0x555187(0xaa))/0x3)+-parseInt(_0x555187(0xb0))/0x4+-parseInt(_0x555187(0xcd))/0x5*(parseInt(_0x555187(0xad))/0x6)+parseInt(_0x555187(0xcc))/0x7*(-parseInt(_0x555187(0xd2))/0x8)+-parseInt(_0x555187(0xd3))/0x9+parseInt(_0x555187(0xb9))/0xa;if(_0x39eed3===_0x379e4b)break;else _0x3324c5['push'](_0x3324c5['shift']());}catch(_0x5c037f){_0x3324c5['push'](_0x3324c5['shift']());}}}(a138_0x5644,0x1c6f6));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a138_0x4600b6 from'fs-extra';import{CliErrors}from'../../errors.js';function a138_0x5644(){const _0x5896bf=['company','set','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','trim','name','filter','startsWith','7QvQkuy','5FdyyGC','linked-from-protected-root','get','pruneSkillCodes','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','433208ehaVUW','1963062Okomfs','removed','metadata-mismatch','accessKey','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','validation','metadataPath','length','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','env','skill','skillRoots','unchanged','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','8kACmpY','appCode','push','isSymbolicLink','has','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','43863pyjglu','not-managed-symlink','agentsSkillsDir','586128QqMWeu','created','lovrabet','143936uuXbCP','scope','values','builtin','skipped','contentHash','personal','protectedLinkRoots','isDirectory','6863920TgsnJe','skillCode','dir','project','scopes','map','updated','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','105497fTcyhe','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','managedRoot','activeSkillCodes'];a138_0x5644=function(){return _0x5896bf;};return a138_0x5644();}import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a138_0x4600b6,RESERVED_PROJECT_SKILL_CODES=new Set([a138_0x50ac1a(0xaf),'runtime-observe','secret-retriever']);export function linkEffectiveRuntimeSkills(_0x1d9e29,_0x3619c3){const _0x7722b3=a138_0x50ac1a,_0x3e5488=new Map();for(const _0x1fd6b7 of _0x1d9e29){const _0x6a844d=_0x1fd6b7[_0x7722b3(0xa0)][_0x7722b3(0xba)];if(!_0x6a844d)continue;const _0x558530=_0x3e5488[_0x7722b3(0xcf)](_0x6a844d);(!_0x558530||_0x1fd6b7['scope']===_0x7722b3(0xb6))&&_0x3e5488[_0x7722b3(0xc6)](_0x6a844d,_0x1fd6b7);}const _0x1ac133=[];for(const _0x3e3e96 of _0x3e5488[_0x7722b3(0xb2)]()){const _0x1cefaa=requireSkillCode(_0x3e3e96['skill']),_0x4105cf=readMetadataIfPresent(_0x3e3e96[_0x7722b3(0x9c)]);if(_0x4105cf?.[_0x7722b3(0xa5)]!==_0x3619c3[_0x7722b3(0xa5)]||_0x4105cf['skillCode']!==_0x1cefaa)throw CliErrors[_0x7722b3(0x9b)](_0x7722b3(0xc7)+_0x3619c3[_0x7722b3(0xa5)]+':\x20'+_0x3e3e96[_0x7722b3(0x9c)]);const _0x3422c5=runtimeSkillLinkName(_0x3619c3,_0x1cefaa);for(const _0x3f6c6f of _0x3619c3[_0x7722b3(0xa1)]){_0x1ac133[_0x7722b3(0xa6)](ensureManagedSymlink(resolve(_0x3f6c6f,_0x3422c5),_0x3e3e96[_0x7722b3(0xbb)],_0x3619c3,_0x1cefaa));}}return _0x1ac133;}export function pruneStaleRuntimeSkillLinks(_0x2fcac8,_0x54b047,_0x4a0164){const _0xa697e2=a138_0x50ac1a,_0x3092ec=new Set([..._0x54b047][_0xa697e2(0xbe)](_0x28b291=>_0x28b291[_0xa697e2(0xc8)]())['filter'](Boolean)),_0x34d1bf=_0x4a0164?new Set([..._0x4a0164][_0xa697e2(0xbe)](_0x3750f7=>_0x3750f7[_0xa697e2(0xc8)]())[_0xa697e2(0xca)](Boolean)):undefined,_0x556aeb=[];for(const _0x6deb0b of _0x2fcac8[_0xa697e2(0xa1)]){for(const _0x21f87a of managedTargetSkillLinkPaths(_0x6deb0b,_0x2fcac8)){const _0x18f28a=runtimeSkillCodeFromLink(_0x2fcac8,_0x21f87a);if(_0x34d1bf&&!_0x34d1bf[_0xa697e2(0xa8)](_0x18f28a))continue;if(_0x3092ec[_0xa697e2(0xa8)](_0x18f28a))continue;_0x556aeb[_0xa697e2(0xa6)](removeManagedSkillLink(_0x21f87a,_0x2fcac8,_0x18f28a));}}return _0x556aeb;}export function pruneStaleRuntimeSkillCache(_0x4cd209,_0x38e1cb={}){const _0x30871e=a138_0x50ac1a,_0x1624b9=new Set([..._0x4cd209[_0x30871e(0xc4)]]['map'](_0x16a5e4=>_0x16a5e4[_0x30871e(0xc8)]())[_0x30871e(0xca)](Boolean)),_0x546a75=_0x4cd209[_0x30871e(0xd0)]?new Set([..._0x4cd209['pruneSkillCodes']][_0x30871e(0xbe)](_0x277300=>_0x277300[_0x30871e(0xc8)]())['filter'](Boolean)):undefined,_0x2bceed=_0x4cd209[_0x30871e(0xbd)]??[_0x30871e(0xb6),_0x30871e(0xc5)],_0x408887=resolve(getRuntimeSkillCacheRoot(_0x4cd209[_0x30871e(0x9f)],_0x4cd209[_0x30871e(0xd6)],_0x38e1cb),safePathSegment(_0x4cd209[_0x30871e(0xa5)],_0x30871e(0xa5))),_0x30ba90=[];for(const _0x2d3fb3 of _0x2bceed){const _0x43f99d=resolve(_0x408887,_0x2d3fb3);if(!existsSync(_0x43f99d))continue;for(const _0x5b5380 of readdirSync(_0x43f99d,{'withFileTypes':!![]})){if(!_0x5b5380[_0x30871e(0xb8)]())continue;const _0x20251a=_0x5b5380[_0x30871e(0xc9)];if(_0x546a75&&!_0x546a75[_0x30871e(0xa8)](_0x20251a))continue;if(_0x1624b9[_0x30871e(0xa8)](_0x20251a))continue;const _0x3a0ae4=resolve(_0x43f99d,_0x20251a),_0x384b7f=readMetadataIfPresent(resolve(_0x3a0ae4,METADATA_FILE));if(_0x384b7f?.[_0x30871e(0xa5)]!==_0x4cd209['appCode']||_0x384b7f[_0x30871e(0xb1)]!==_0x2d3fb3||_0x384b7f[_0x30871e(0xba)]!==_0x20251a){_0x30ba90[_0x30871e(0xa6)]({'path':_0x3a0ae4,'action':'skipped','reason':_0x30871e(0xd5)});continue;}if(isLinkedFromAnyRoot(_0x3a0ae4,_0x4cd209[_0x30871e(0xb7)]??[])){_0x30ba90['push']({'path':_0x3a0ae4,'action':_0x30871e(0xb4),'reason':_0x30871e(0xce)});continue;}removeSync(_0x3a0ae4),_0x30ba90[_0x30871e(0xa6)]({'path':_0x3a0ae4,'action':'removed'});}}return _0x30ba90;}function a138_0x294d(_0xefca70,_0x1dd19c){_0xefca70=_0xefca70-0x9a;const _0x5644f0=a138_0x5644();let _0x294db7=_0x5644f0[_0xefca70];return _0x294db7;}export function linkGlobalRuntimeSkills(_0x4780b5,_0x32b8d8={}){const _0x905436=a138_0x50ac1a,_0x2eebaf=resolveSkillSyncPaths(_0x32b8d8),_0x4311d6=[];for(const _0x271799 of _0x4780b5){if(_0x271799[_0x905436(0xb1)]!==_0x905436(0xb3))throw CliErrors[_0x905436(0x9b)](_0x905436(0x9a)+_0x271799[_0x905436(0xb1)]);const _0x3b6a2b=requireSkillCode(_0x271799[_0x905436(0xa0)]),_0x40b49d=copyManagedSkillDirectory(_0x271799['dir'],resolve(_0x2eebaf[_0x905436(0xac)],_0x3b6a2b));_0x4311d6[_0x905436(0xa6)]({..._0x40b49d,'contentHash':_0x271799['contentHash']});}return _0x4311d6;}function ensureManagedSymlink(_0x1c1951,_0x5c88a4,_0x4777a7,_0x428dd9){const _0x28f89f=a138_0x50ac1a;mkdirSync(dirname(_0x1c1951),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x1c1951)||isDanglingSymlink(_0x1c1951)){const _0x187eb7=lstatSync(_0x1c1951);if(!_0x187eb7['isSymbolicLink']())throw CliErrors[_0x28f89f(0x9b)](_0x28f89f(0xd1)+_0x1c1951);const _0x231565=resolveSymlinkTarget(_0x1c1951);if(!isPathInside(realOrResolved(_0x231565),realOrResolved(_0x4777a7[_0x28f89f(0xc3)])))throw CliErrors[_0x28f89f(0x9b)](_0x28f89f(0xc2)+_0x1c1951);if(realOrResolved(_0x231565)===realOrResolved(_0x5c88a4))return{'path':_0x1c1951,'target':_0x5c88a4,'action':_0x28f89f(0xa2)};const _0x172b68=readMetadataIfPresent(resolve(_0x231565,METADATA_FILE));if(_0x4777a7['scope']===_0x28f89f(0xbc)&&(_0x172b68?.[_0x28f89f(0xa5)]!==_0x4777a7[_0x28f89f(0xa5)]||_0x172b68[_0x28f89f(0xba)]!==_0x428dd9))throw CliErrors[_0x28f89f(0x9b)](_0x28f89f(0xa3)+_0x1c1951);return unlinkSync(_0x1c1951),symlinkSync(_0x5c88a4,_0x1c1951,_0x28f89f(0xbb)),{'path':_0x1c1951,'target':_0x5c88a4,'action':_0x28f89f(0xbf)};}return symlinkSync(_0x5c88a4,_0x1c1951,'dir'),{'path':_0x1c1951,'target':_0x5c88a4,'action':_0x28f89f(0xae)};}function managedTargetSkillLinkPaths(_0x128acd,_0x114f8c){const _0x18e85e=a138_0x50ac1a;if(!existsSync(_0x128acd))return[];const _0x2f12a9=_0x114f8c[_0x18e85e(0xa5)]+'--';return readdirSync(_0x128acd,{'withFileTypes':!![]})[_0x18e85e(0xca)](_0x159c71=>_0x114f8c['scope']==='project'||_0x159c71[_0x18e85e(0xc9)][_0x18e85e(0xcb)](_0x2f12a9))[_0x18e85e(0xbe)](_0x2ef18b=>resolve(_0x128acd,_0x2ef18b[_0x18e85e(0xc9)]));}function removeManagedSkillLink(_0x2bfd4f,_0x2a4d0d,_0x282582){const _0x548b83=a138_0x50ac1a,_0x18f665=lstatIfPresent(_0x2bfd4f);if(!_0x18f665?.[_0x548b83(0xa7)]())return{'path':_0x2bfd4f,'action':_0x548b83(0xb4),'reason':_0x548b83(0xab)};const _0x350218=resolveSymlinkTarget(_0x2bfd4f);if(!isPathInside(realOrResolved(_0x350218),realOrResolved(_0x2a4d0d['managedRoot'])))return{'path':_0x2bfd4f,'action':_0x548b83(0xb4),'reason':'external-symlink'};const _0x1e6d56=readMetadataIfPresent(resolve(_0x350218,METADATA_FILE));if(_0x2a4d0d[_0x548b83(0xb1)]===_0x548b83(0xbc)&&(_0x1e6d56?.[_0x548b83(0xa5)]!==_0x2a4d0d[_0x548b83(0xa5)]||_0x1e6d56[_0x548b83(0xba)]!==_0x282582))return{'path':_0x2bfd4f,'action':'skipped','reason':_0x548b83(0xd5)};return unlinkSync(_0x2bfd4f),{'path':_0x2bfd4f,'action':_0x548b83(0xd4)};}function isLinkedFromAnyRoot(_0x32f68f,_0x60c0e4){const _0x222262=realOrResolved(_0x32f68f);for(const _0x1aa0b9 of _0x60c0e4){if(!existsSync(_0x1aa0b9))continue;for(const _0x189b6f of readdirSync(_0x1aa0b9,{'withFileTypes':!![]})){if(!_0x189b6f['isSymbolicLink']())continue;const _0x488124=resolve(_0x1aa0b9,_0x189b6f['name']);if(realOrResolved(resolveSymlinkTarget(_0x488124))===_0x222262)return!![];}}return![];}function runtimeSkillLinkName(_0xada033,_0x10b831){const _0x4bd7c5=a138_0x50ac1a,_0x5760b8=safePathSegment(_0x10b831,'skillCode');if(_0xada033['scope']===_0x4bd7c5(0xbc)&&RESERVED_PROJECT_SKILL_CODES[_0x4bd7c5(0xa8)](_0x5760b8))throw CliErrors['validation'](_0x4bd7c5(0x9e)+_0x5760b8);return _0xada033[_0x4bd7c5(0xb1)]===_0x4bd7c5(0xbc)?_0x5760b8:_0xada033['appCode']+'--'+_0x5760b8;}function runtimeSkillCodeFromLink(_0x1072a0,_0x56301e){const _0x160bc5=a138_0x50ac1a,_0x330a5c=basename(_0x56301e);return _0x1072a0[_0x160bc5(0xb1)]==='project'?_0x330a5c:_0x330a5c['slice']((_0x1072a0['appCode']+'--')[_0x160bc5(0x9d)]);}export function copyManagedSkillDirectory(_0x40d284,_0x2f4159){const _0x22520b=a138_0x50ac1a,_0x29b758=resolve(_0x2f4159,METADATA_FILE),_0xf99c7e=existsSync(_0x2f4159);if(_0xf99c7e){const _0x236a91=lstatSync(_0x2f4159);if(_0x236a91['isSymbolicLink']())throw CliErrors['validation'](_0x22520b(0xc0)+_0x2f4159);if(!_0x236a91[_0x22520b(0xb8)]())throw CliErrors[_0x22520b(0x9b)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x2f4159);const _0xb29f8=readMetadataIfPresent(_0x29b758);if(_0xb29f8?.[_0x22520b(0xb1)]!=='builtin')throw CliErrors['validation']('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0x2f4159);}ensureDirSync(dirname(_0x2f4159));const _0x5f5b0a=_0xf99c7e?readMetadataIfPresent(_0x29b758)?.[_0x22520b(0xb5)]:undefined,_0x558169=readMetadataIfPresent(resolve(_0x40d284,METADATA_FILE))?.[_0x22520b(0xb5)];return _0xf99c7e&&removeSync(_0x2f4159),copySkillDirectory(_0x40d284,_0x2f4159),{'path':_0x2f4159,'target':_0x40d284,'action':!_0xf99c7e?'created':_0x5f5b0a===_0x558169?'unchanged':'updated'};}function copySkillDirectory(_0x1e8218,_0x123ff9){copySync(_0x1e8218,_0x123ff9,{'dereference':![],'overwrite':!![],'filter'(_0x5a24f2){const _0x45e83f=a138_0x294d;if(lstatSync(_0x5a24f2)['isSymbolicLink']())throw CliErrors[_0x45e83f(0x9b)](_0x45e83f(0xa9)+_0x5a24f2);return!![];}});}
|
|
1
|
+
const a138_0x2c9d85=a138_0x41db;(function(_0x10dc5b,_0x28589a){const _0x4a4d81=a138_0x41db,_0x5a7c7c=_0x10dc5b();while(!![]){try{const _0x15345e=parseInt(_0x4a4d81(0xc5))/0x1*(-parseInt(_0x4a4d81(0xe2))/0x2)+parseInt(_0x4a4d81(0xdb))/0x3*(parseInt(_0x4a4d81(0xc6))/0x4)+parseInt(_0x4a4d81(0xb2))/0x5+parseInt(_0x4a4d81(0xb1))/0x6+parseInt(_0x4a4d81(0xb0))/0x7+-parseInt(_0x4a4d81(0xd8))/0x8+-parseInt(_0x4a4d81(0xbf))/0x9;if(_0x15345e===_0x28589a)break;else _0x5a7c7c['push'](_0x5a7c7c['shift']());}catch(_0x5edea7){_0x5a7c7c['push'](_0x5a7c7c['shift']());}}}(a138_0x37df,0x247bb));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a138_0x41db(_0x3fd8eb,_0x26ff95){_0x3fd8eb=_0x3fd8eb-0xae;const _0x37df63=a138_0x37df();let _0x41db56=_0x37df63[_0x3fd8eb];return _0x41db56;}import{basename,dirname,resolve}from'node:path';import a138_0x4340d7 from'fs-extra';function a138_0x37df(){const _0xd99389=['map','agentsSkillsDir','set','project','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','name','removed','skipped','102543iitLTI','1343778Nhghtz','1241015eIRKvK','managedRoot','updated','protectedLinkRoots','contentHash','company','secret-retriever','lovrabet','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','length','skillCode','unchanged','filter','1944450xlhORk','validation','metadata-mismatch','pruneSkillCodes','skill','activeSkillCodes','28229DLQvqa','48548ThibSu','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','dir','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','startsWith','get','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','env','push','trim','created','scopes','appCode','has','accessKey','metadataPath','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','1137544QSUdTs','builtin','linked-from-protected-root','54LUoDwz','scope','skillRoots','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','not-managed-symlink','runtime-observe','isDirectory','14zOjvMQ','isSymbolicLink'];a138_0x37df=function(){return _0xd99389;};return a138_0x37df();}import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a138_0x4340d7,RESERVED_PROJECT_SKILL_CODES=new Set([a138_0x2c9d85(0xb9),a138_0x2c9d85(0xe0),a138_0x2c9d85(0xb8)]);export function linkEffectiveRuntimeSkills(_0x4b4d3d,_0x5309bd){const _0x26913d=a138_0x2c9d85,_0x5bec09=new Map();for(const _0x57ab13 of _0x4b4d3d){const _0x4cb143=_0x57ab13[_0x26913d(0xc3)][_0x26913d(0xbc)];if(!_0x4cb143)continue;const _0x15c107=_0x5bec09[_0x26913d(0xcc)](_0x4cb143);(!_0x15c107||_0x57ab13[_0x26913d(0xdc)]==='personal')&&_0x5bec09[_0x26913d(0xe6)](_0x4cb143,_0x57ab13);}const _0x3c099e=[];for(const _0x5d90f4 of _0x5bec09['values']()){const _0x5502d4=requireSkillCode(_0x5d90f4[_0x26913d(0xc3)]),_0x29a638=readMetadataIfPresent(_0x5d90f4[_0x26913d(0xd6)]);if(_0x29a638?.[_0x26913d(0xd3)]!==_0x5309bd[_0x26913d(0xd3)]||_0x29a638[_0x26913d(0xbc)]!==_0x5502d4)throw CliErrors[_0x26913d(0xc0)](_0x26913d(0xba)+_0x5309bd[_0x26913d(0xd3)]+':\x20'+_0x5d90f4[_0x26913d(0xd6)]);const _0x5cb583=runtimeSkillLinkName(_0x5309bd,_0x5502d4);for(const _0x5daa6c of _0x5309bd[_0x26913d(0xdd)]){_0x3c099e[_0x26913d(0xcf)](ensureManagedSymlink(resolve(_0x5daa6c,_0x5cb583),_0x5d90f4['dir'],_0x5309bd,_0x5502d4));}}return _0x3c099e;}export function pruneStaleRuntimeSkillLinks(_0x5e8e3b,_0x501560,_0x204f64){const _0x192118=a138_0x2c9d85,_0x12b56a=new Set([..._0x501560]['map'](_0x1b7582=>_0x1b7582[_0x192118(0xd0)]())[_0x192118(0xbe)](Boolean)),_0x4efac6=_0x204f64?new Set([..._0x204f64]['map'](_0x14242e=>_0x14242e['trim']())['filter'](Boolean)):undefined,_0x5e4f75=[];for(const _0x288cf8 of _0x5e8e3b[_0x192118(0xdd)]){for(const _0x2b826f of managedTargetSkillLinkPaths(_0x288cf8,_0x5e8e3b)){const _0x3ea09b=runtimeSkillCodeFromLink(_0x5e8e3b,_0x2b826f);if(_0x4efac6&&!_0x4efac6[_0x192118(0xd4)](_0x3ea09b))continue;if(_0x12b56a[_0x192118(0xd4)](_0x3ea09b))continue;_0x5e4f75[_0x192118(0xcf)](removeManagedSkillLink(_0x2b826f,_0x5e8e3b,_0x3ea09b));}}return _0x5e4f75;}export function pruneStaleRuntimeSkillCache(_0x650e53,_0x203720={}){const _0x57db13=a138_0x2c9d85,_0x492b46=new Set([..._0x650e53[_0x57db13(0xc4)]][_0x57db13(0xe4)](_0x554bd5=>_0x554bd5['trim']())['filter'](Boolean)),_0x209c4b=_0x650e53[_0x57db13(0xc2)]?new Set([..._0x650e53[_0x57db13(0xc2)]][_0x57db13(0xe4)](_0x4254a3=>_0x4254a3[_0x57db13(0xd0)]())[_0x57db13(0xbe)](Boolean)):undefined,_0x571a25=_0x650e53[_0x57db13(0xd2)]??['personal',_0x57db13(0xb7)],_0x15b721=resolve(getRuntimeSkillCacheRoot(_0x650e53[_0x57db13(0xce)],_0x650e53[_0x57db13(0xd5)],_0x203720),safePathSegment(_0x650e53[_0x57db13(0xd3)],_0x57db13(0xd3))),_0x6434ba=[];for(const _0xda2162 of _0x571a25){const _0x45c8ab=resolve(_0x15b721,_0xda2162);if(!existsSync(_0x45c8ab))continue;for(const _0x135848 of readdirSync(_0x45c8ab,{'withFileTypes':!![]})){if(!_0x135848['isDirectory']())continue;const _0x23c706=_0x135848[_0x57db13(0xea)];if(_0x209c4b&&!_0x209c4b[_0x57db13(0xd4)](_0x23c706))continue;if(_0x492b46[_0x57db13(0xd4)](_0x23c706))continue;const _0x5e6be2=resolve(_0x45c8ab,_0x23c706),_0xae8d63=readMetadataIfPresent(resolve(_0x5e6be2,METADATA_FILE));if(_0xae8d63?.[_0x57db13(0xd3)]!==_0x650e53[_0x57db13(0xd3)]||_0xae8d63[_0x57db13(0xdc)]!==_0xda2162||_0xae8d63['skillCode']!==_0x23c706){_0x6434ba[_0x57db13(0xcf)]({'path':_0x5e6be2,'action':_0x57db13(0xaf),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x5e6be2,_0x650e53[_0x57db13(0xb5)]??[])){_0x6434ba['push']({'path':_0x5e6be2,'action':'skipped','reason':_0x57db13(0xda)});continue;}removeSync(_0x5e6be2),_0x6434ba[_0x57db13(0xcf)]({'path':_0x5e6be2,'action':_0x57db13(0xae)});}}return _0x6434ba;}export function linkGlobalRuntimeSkills(_0x1618fb,_0x43b98d={}){const _0xbd3c98=a138_0x2c9d85,_0x4adb0c=resolveSkillSyncPaths(_0x43b98d),_0x4b24c2=[];for(const _0x278df2 of _0x1618fb){if(_0x278df2['scope']!==_0xbd3c98(0xd9))throw CliErrors[_0xbd3c98(0xc0)](_0xbd3c98(0xe8)+_0x278df2[_0xbd3c98(0xdc)]);const _0x2d99a8=requireSkillCode(_0x278df2[_0xbd3c98(0xc3)]),_0x2f2fd1=copyManagedSkillDirectory(_0x278df2['dir'],resolve(_0x4adb0c[_0xbd3c98(0xe5)],_0x2d99a8));_0x4b24c2[_0xbd3c98(0xcf)]({..._0x2f2fd1,'contentHash':_0x278df2[_0xbd3c98(0xb6)]});}return _0x4b24c2;}function ensureManagedSymlink(_0x28f051,_0x48971d,_0x2cdcc0,_0x4f84e2){const _0x1754b4=a138_0x2c9d85;mkdirSync(dirname(_0x28f051),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x28f051)||isDanglingSymlink(_0x28f051)){const _0x3fe0a7=lstatSync(_0x28f051);if(!_0x3fe0a7[_0x1754b4(0xe3)]())throw CliErrors[_0x1754b4(0xc0)](_0x1754b4(0xd7)+_0x28f051);const _0x3d1e45=resolveSymlinkTarget(_0x28f051);if(!isPathInside(realOrResolved(_0x3d1e45),realOrResolved(_0x2cdcc0[_0x1754b4(0xb3)])))throw CliErrors[_0x1754b4(0xc0)](_0x1754b4(0xc9)+_0x28f051);if(realOrResolved(_0x3d1e45)===realOrResolved(_0x48971d))return{'path':_0x28f051,'target':_0x48971d,'action':'unchanged'};const _0x11bbdb=readMetadataIfPresent(resolve(_0x3d1e45,METADATA_FILE));if(_0x2cdcc0[_0x1754b4(0xdc)]===_0x1754b4(0xe7)&&(_0x11bbdb?.['appCode']!==_0x2cdcc0[_0x1754b4(0xd3)]||_0x11bbdb['skillCode']!==_0x4f84e2))throw CliErrors[_0x1754b4(0xc0)](_0x1754b4(0xc7)+_0x28f051);return unlinkSync(_0x28f051),symlinkSync(_0x48971d,_0x28f051,_0x1754b4(0xc8)),{'path':_0x28f051,'target':_0x48971d,'action':_0x1754b4(0xb4)};}return symlinkSync(_0x48971d,_0x28f051,_0x1754b4(0xc8)),{'path':_0x28f051,'target':_0x48971d,'action':_0x1754b4(0xd1)};}function managedTargetSkillLinkPaths(_0x4bdaf4,_0x4227eb){const _0x3bf48b=a138_0x2c9d85;if(!existsSync(_0x4bdaf4))return[];const _0x367d4d=_0x4227eb[_0x3bf48b(0xd3)]+'--';return readdirSync(_0x4bdaf4,{'withFileTypes':!![]})[_0x3bf48b(0xbe)](_0x1331e4=>_0x4227eb[_0x3bf48b(0xdc)]===_0x3bf48b(0xe7)||_0x1331e4[_0x3bf48b(0xea)][_0x3bf48b(0xcb)](_0x367d4d))['map'](_0x1f5d3c=>resolve(_0x4bdaf4,_0x1f5d3c[_0x3bf48b(0xea)]));}function removeManagedSkillLink(_0x11f6f6,_0x521651,_0x47d0d4){const _0x544335=a138_0x2c9d85,_0x105681=lstatIfPresent(_0x11f6f6);if(!_0x105681?.[_0x544335(0xe3)]())return{'path':_0x11f6f6,'action':'skipped','reason':_0x544335(0xdf)};const _0x539eee=resolveSymlinkTarget(_0x11f6f6);if(!isPathInside(realOrResolved(_0x539eee),realOrResolved(_0x521651[_0x544335(0xb3)])))return{'path':_0x11f6f6,'action':_0x544335(0xaf),'reason':'external-symlink'};const _0xf03d90=readMetadataIfPresent(resolve(_0x539eee,METADATA_FILE));if(_0x521651[_0x544335(0xdc)]===_0x544335(0xe7)&&(_0xf03d90?.[_0x544335(0xd3)]!==_0x521651[_0x544335(0xd3)]||_0xf03d90['skillCode']!==_0x47d0d4))return{'path':_0x11f6f6,'action':_0x544335(0xaf),'reason':_0x544335(0xc1)};return unlinkSync(_0x11f6f6),{'path':_0x11f6f6,'action':'removed'};}function isLinkedFromAnyRoot(_0x48f916,_0x371fe6){const _0x56deaf=a138_0x2c9d85,_0x1cf923=realOrResolved(_0x48f916);for(const _0x297c8d of _0x371fe6){if(!existsSync(_0x297c8d))continue;for(const _0x1d523c of readdirSync(_0x297c8d,{'withFileTypes':!![]})){if(!_0x1d523c[_0x56deaf(0xe3)]())continue;const _0x3f0049=resolve(_0x297c8d,_0x1d523c[_0x56deaf(0xea)]);if(realOrResolved(resolveSymlinkTarget(_0x3f0049))===_0x1cf923)return!![];}}return![];}function runtimeSkillLinkName(_0x44433d,_0x287763){const _0x2c7032=a138_0x2c9d85,_0x4249f7=safePathSegment(_0x287763,'skillCode');if(_0x44433d[_0x2c7032(0xdc)]==='project'&&RESERVED_PROJECT_SKILL_CODES[_0x2c7032(0xd4)](_0x4249f7))throw CliErrors[_0x2c7032(0xc0)](_0x2c7032(0xe9)+_0x4249f7);return _0x44433d['scope']==='project'?_0x4249f7:_0x44433d['appCode']+'--'+_0x4249f7;}function runtimeSkillCodeFromLink(_0x5f2ee9,_0x193b33){const _0x4cffd4=a138_0x2c9d85,_0xd13829=basename(_0x193b33);return _0x5f2ee9[_0x4cffd4(0xdc)]===_0x4cffd4(0xe7)?_0xd13829:_0xd13829['slice']((_0x5f2ee9[_0x4cffd4(0xd3)]+'--')[_0x4cffd4(0xbb)]);}export function copyManagedSkillDirectory(_0x3fb176,_0x470e6e){const _0x5a8a09=a138_0x2c9d85,_0xe6ed8=resolve(_0x470e6e,METADATA_FILE),_0x3a25bb=existsSync(_0x470e6e);if(_0x3a25bb){const _0x3fe681=lstatSync(_0x470e6e);if(_0x3fe681[_0x5a8a09(0xe3)]())throw CliErrors[_0x5a8a09(0xc0)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20'+_0x470e6e);if(!_0x3fe681[_0x5a8a09(0xe1)]())throw CliErrors[_0x5a8a09(0xc0)](_0x5a8a09(0xca)+_0x470e6e);const _0xc8a8a=readMetadataIfPresent(_0xe6ed8);if(_0xc8a8a?.[_0x5a8a09(0xdc)]!=='builtin')throw CliErrors[_0x5a8a09(0xc0)](_0x5a8a09(0xde)+_0x470e6e);}ensureDirSync(dirname(_0x470e6e));const _0x3ac991=_0x3a25bb?readMetadataIfPresent(_0xe6ed8)?.[_0x5a8a09(0xb6)]:undefined,_0x27acd3=readMetadataIfPresent(resolve(_0x3fb176,METADATA_FILE))?.[_0x5a8a09(0xb6)];return _0x3a25bb&&removeSync(_0x470e6e),copySkillDirectory(_0x3fb176,_0x470e6e),{'path':_0x470e6e,'target':_0x3fb176,'action':!_0x3a25bb?_0x5a8a09(0xd1):_0x3ac991===_0x27acd3?_0x5a8a09(0xbd):_0x5a8a09(0xb4)};}function copySkillDirectory(_0x45709f,_0x55c376){copySync(_0x45709f,_0x55c376,{'dereference':![],'overwrite':!![],'filter'(_0x164390){const _0x5f492e=a138_0x41db;if(lstatSync(_0x164390)[_0x5f492e(0xe3)]())throw CliErrors[_0x5f492e(0xc0)](_0x5f492e(0xcd)+_0x164390);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x545e3,_0x2baa85){const _0x46927=a139_0x2e06,_0x1f179d=_0x545e3();while(!![]){try{const _0x2adb68=parseInt(_0x46927(0x1b9))/0x1+-parseInt(_0x46927(0x1bf))/0x2*(parseInt(_0x46927(0x1bd))/0x3)+parseInt(_0x46927(0x1a1))/0x4+parseInt(_0x46927(0x1b8))/0x5+-parseInt(_0x46927(0x1a0))/0x6+-parseInt(_0x46927(0x198))/0x7*(-parseInt(_0x46927(0x1b4))/0x8)+parseInt(_0x46927(0x1ad))/0x9*(-parseInt(_0x46927(0x1a3))/0xa);if(_0x2adb68===_0x2baa85)break;else _0x1f179d['push'](_0x1f179d['shift']());}catch(_0x4afe59){_0x1f179d['push'](_0x1f179d['shift']());}}}(a139_0x2af6,0x59a49));import{existsSync,readdirSync}from'node:fs';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a139_0x2e06(_0xd64196,_0x497214){_0xd64196=_0xd64196-0x198;const _0x2af61a=a139_0x2af6();let _0x2e06e0=_0x2af61a[_0xd64196];return _0x2e06e0;}import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x1f045e,_0x1ec466,_0x35cd5c={}){const _0x4246bd=a139_0x2e06,_0x838aa8=safePathSegment(_0x1f045e['appCode'],_0x4246bd(0x1a5));if(_0x1ec466[_0x4246bd(0x1a5)]!==_0x838aa8)throw CliErrors['validation'](_0x4246bd(0x19c)+_0x1ec466[_0x4246bd(0x1a5)]+_0x4246bd(0x19b)+_0x838aa8);const _0x59cd1c=normalizeRuntimeSkillScopes(_0x1f045e[_0x4246bd(0x1c2)]),_0x5a3581=new Set(_0x59cd1c),_0x1c097f=_0x1f045e[_0x4246bd(0x19a)]?.[_0x4246bd(0x1ae)](),_0x2950e5=new Map(),_0x1ef15b=resolve(getRuntimeSkillCacheRoot(_0x1f045e[_0x4246bd(0x1a2)],_0x1f045e['accessKey'],_0x35cd5c),_0x838aa8);for(const _0x2fcac9 of _0x59cd1c){for(const _0x8fe04a of localSkillEntryDirs(resolve(_0x1ef15b,_0x2fcac9))){collectLocalRuntimeSkill(_0x2950e5,_0x8fe04a,{'appCode':_0x838aa8,'scopes':_0x5a3581,'code':_0x1c097f,'source':_0x4246bd(0x1b0)});}}for(const _0x4eb4f7 of _0x1ec466[_0x4246bd(0x1af)]){for(const _0x4960ac of localSkillLinkCandidates(_0x4eb4f7,_0x1ec466,_0x5a3581)){collectLocalRuntimeSkill(_0x2950e5,_0x4960ac,{'appCode':_0x838aa8,'scopes':_0x5a3581,'code':_0x1c097f,'source':'link','linkedPath':_0x4960ac});}}return Array[_0x4246bd(0x1a7)](_0x2950e5[_0x4246bd(0x199)]())[_0x4246bd(0x1a4)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x26f9e5){const _0x4b60ff=a139_0x2e06;if(!existsSync(_0x26f9e5))return[];return readdirSync(_0x26f9e5,{'withFileTypes':!![]})[_0x4b60ff(0x1ac)](_0x1128d7=>_0x1128d7[_0x4b60ff(0x1ba)]()||_0x1128d7['isSymbolicLink']())[_0x4b60ff(0x1c3)](_0x3c79bf=>resolve(_0x26f9e5,_0x3c79bf['name']));}function localSkillLinkCandidates(_0x270205,_0x78ad99,_0x85cabe){const _0x15e51d=a139_0x2e06;if(!existsSync(_0x270205))return[];const _0x2742c5=_0x78ad99['appCode']+'--';return readdirSync(_0x270205,{'withFileTypes':!![]})[_0x15e51d(0x1ac)](_0x49bd3e=>_0x49bd3e[_0x15e51d(0x1ba)]()||_0x49bd3e[_0x15e51d(0x1a6)]())[_0x15e51d(0x1ac)](_0x158ad6=>_0x78ad99['scope']===_0x15e51d(0x19f)||_0x158ad6[_0x15e51d(0x1a8)][_0x15e51d(0x1a9)](_0x2742c5)||_0x85cabe[_0x15e51d(0x1aa)](_0x15e51d(0x1b3)))['map'](_0x460553=>resolve(_0x270205,_0x460553[_0x15e51d(0x1a8)]));}function collectLocalRuntimeSkill(_0x10c3ac,_0xb743a3,_0x53906c){const _0x456c20=a139_0x2e06,_0x31e54c=resolve(_0xb743a3,METADATA_FILE),_0x5bc80d=readMetadataIfPresent(_0x31e54c);if(!_0x5bc80d)return;if(_0x5bc80d[_0x456c20(0x1a5)]!==_0x53906c[_0x456c20(0x1a5)])return;if(!isRuntimeSkillScope(_0x5bc80d['scope'])||!_0x53906c[_0x456c20(0x1c2)]['has'](_0x5bc80d['scope']))return;const _0x22f027=_0x5bc80d['skillCode']?.[_0x456c20(0x1ae)]();if(!_0x22f027)return;if(_0x53906c[_0x456c20(0x19a)]&&_0x22f027!==_0x53906c[_0x456c20(0x19a)])return;const _0x22d9cb=_0x5bc80d[_0x456c20(0x1bb)]+':'+_0x22f027,_0x5a23ff=_0x53906c[_0x456c20(0x1b5)]?[_0x53906c[_0x456c20(0x1b5)]]:[],_0x5f2021=_0x10c3ac['get'](_0x22d9cb);if(_0x5f2021){_0x53906c[_0x456c20(0x1b7)]==='cache'&&(_0x5f2021[_0x456c20(0x1ab)]=_0xb743a3,_0x5f2021['cacheDir']=_0xb743a3,_0x5f2021[_0x456c20(0x1be)]=resolve(_0xb743a3,SKILL_FILE),_0x5f2021[_0x456c20(0x1b6)]=_0x31e54c);for(const _0x297793 of _0x5a23ff){!_0x5f2021[_0x456c20(0x1b1)][_0x456c20(0x1c0)](_0x297793)&&_0x5f2021[_0x456c20(0x1b1)]['push'](_0x297793);}_0x5f2021[_0x456c20(0x1b1)]['sort']();return;}_0x10c3ac[_0x456c20(0x1c1)](_0x22d9cb,{..._0x5bc80d,'tags':Array[_0x456c20(0x19d)](_0x5bc80d[_0x456c20(0x1b2)])?_0x5bc80d[_0x456c20(0x1b2)]:[],'scope':_0x5bc80d[_0x456c20(0x1bb)],'source':'local','dir':_0xb743a3,'cacheDir':_0x53906c[_0x456c20(0x1b7)]==='cache'?_0xb743a3:undefined,'skillMdPath':resolve(_0xb743a3,SKILL_FILE),'metadataPath':_0x31e54c,'linkedPaths':_0x5a23ff});}function compareLocalRuntimeSkills(_0x10bd7d,_0x12d7f1){const _0x4ce6c3=a139_0x2e06,_0x398d95={'personal':0x0,'company':0x1,'builtin':0x2};return _0x398d95[_0x10bd7d[_0x4ce6c3(0x1bb)]]-_0x398d95[_0x12d7f1[_0x4ce6c3(0x1bb)]]||_0x10bd7d[_0x4ce6c3(0x19e)][_0x4ce6c3(0x1bc)](_0x12d7f1[_0x4ce6c3(0x19e)])||_0x10bd7d['dir'][_0x4ce6c3(0x1bc)](_0x12d7f1[_0x4ce6c3(0x1ab)]);}function a139_0x2af6(){const _0x3d450a=['isDirectory','scope','localeCompare','3MksHUJ','skillMdPath','49804IcScZg','includes','set','scopes','map','2871659RFOiJt','values','code','\x20!=\x20','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','isArray','skillCode','project','3280632mBhmvW','941164cMYNde','env','150zYgLSS','sort','appCode','isSymbolicLink','from','name','startsWith','has','dir','filter','41427mQTuOe','trim','skillRoots','cache','linkedPaths','tags','builtin','8zOUrlq','linkedPath','metadataPath','source','450430wNZVQL','272282GyQsIp'];a139_0x2af6=function(){return _0x3d450a;};return a139_0x2af6();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e8572,_0x1455b9){const _0x3a0bbe=a140_0x8bd0,_0x3b2ee7=_0x5e8572();while(!![]){try{const _0x519292=-parseInt(_0x3a0bbe(0x1e4))/0x1*(-parseInt(_0x3a0bbe(0x1d8))/0x2)+-parseInt(_0x3a0bbe(0x1eb))/0x3+parseInt(_0x3a0bbe(0x1c2))/0x4+-parseInt(_0x3a0bbe(0x1e7))/0x5+parseInt(_0x3a0bbe(0x1d4))/0x6+parseInt(_0x3a0bbe(0x1cd))/0x7+parseInt(_0x3a0bbe(0x1ed))/0x8;if(_0x519292===_0x1455b9)break;else _0x3b2ee7['push'](_0x3b2ee7['shift']());}catch(_0xabb155){_0x3b2ee7['push'](_0x3b2ee7['shift']());}}}(a140_0x547e,0x8e471));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(_0x49e45f){const _0x1ca3f5=a140_0x8bd0;return _0x49e45f[_0x1ca3f5(0x1d1)]??Buffer[_0x1ca3f5(0x1ea)](_0x49e45f['content']??'',_0x1ca3f5(0x1e0));}export function fileText(_0x5ba5df){const _0x11399c=a140_0x8bd0;return fileContent(_0x5ba5df)[_0x11399c(0x1dc)](_0x11399c(0x1e0));}export function normalizeLocalFiles(_0x4d1205){const _0x41e5a8=a140_0x8bd0;if(!Array[_0x41e5a8(0x1db)](_0x4d1205)||_0x4d1205['length']===0x0)return[];const _0x582241=new Map();for(const _0x5022c2 of _0x4d1205){if(!_0x5022c2||typeof _0x5022c2!==_0x41e5a8(0x1c1)||typeof _0x5022c2[_0x41e5a8(0x1df)]!==_0x41e5a8(0x1da))throw CliErrors['validation'](_0x41e5a8(0x1c5));const _0x1f6c62=normalizeSkillRelativePath(_0x5022c2['path']);if(_0x582241['has'](_0x1f6c62))throw CliErrors['validation']('Duplicate\x20Skill\x20file\x20path:\x20'+_0x1f6c62);if(_0x5022c2[_0x41e5a8(0x1d1)]!==undefined&&!Buffer['isBuffer'](_0x5022c2['bytes']))throw CliErrors['validation'](_0x41e5a8(0x1d5)+_0x1f6c62);if(_0x5022c2[_0x41e5a8(0x1d1)]===undefined&&typeof _0x5022c2['content']!==_0x41e5a8(0x1da))throw CliErrors['validation'](_0x41e5a8(0x1d0)+_0x1f6c62);const _0x785399=fileContent(_0x5022c2);_0x582241[_0x41e5a8(0x1ca)](_0x1f6c62,{'path':_0x1f6c62,'bytes':_0x785399});}return Array[_0x41e5a8(0x1ea)](_0x582241[_0x41e5a8(0x1c0)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x185a39){const _0x32bbdc=a140_0x8bd0;if(!Array[_0x32bbdc(0x1db)](_0x185a39)||_0x185a39[_0x32bbdc(0x1de)]===0x0)return[];const _0x116c52=new Map();for(const _0x1afd77 of _0x185a39){if(!_0x1afd77||typeof _0x1afd77!==_0x32bbdc(0x1c1)||typeof _0x1afd77[_0x32bbdc(0x1df)]!==_0x32bbdc(0x1da))throw CliErrors[_0x32bbdc(0x1c4)](_0x32bbdc(0x1c5));const _0x14cfc8=normalizeSkillRelativePath(_0x1afd77[_0x32bbdc(0x1df)]);if(_0x116c52[_0x32bbdc(0x1ce)](_0x14cfc8))throw CliErrors[_0x32bbdc(0x1c4)](_0x32bbdc(0x1e6)+_0x14cfc8);if(!isSha256Hex(_0x1afd77[_0x32bbdc(0x1e5)]))throw CliErrors[_0x32bbdc(0x1c4)](_0x32bbdc(0x1d9)+_0x14cfc8);if(!Number[_0x32bbdc(0x1ec)](_0x1afd77['size'])||_0x1afd77['size']<0x0)throw CliErrors[_0x32bbdc(0x1c4)](_0x32bbdc(0x1c6)+_0x14cfc8);_0x116c52[_0x32bbdc(0x1ca)](_0x14cfc8,{'path':_0x14cfc8,'sha256':_0x1afd77[_0x32bbdc(0x1e5)]['toLowerCase'](),'size':_0x1afd77[_0x32bbdc(0x1c9)]});}return Array[_0x32bbdc(0x1ea)](_0x116c52[_0x32bbdc(0x1c0)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0x372a0f,_0x26db3f={}){const _0x492144=a140_0x8bd0,_0x4261ba=realpathSync(_0x372a0f),_0x39db59=canonicalExcludedFilePaths(_0x26db3f[_0x492144(0x1e9)]),_0x12daf9=[];function _0x2bc786(_0x4233de){const _0x135804=_0x492144,_0x21162e=readdirSync(_0x4233de,{'withFileTypes':!![]})[_0x135804(0x1c7)]((_0x578461,_0x190da3)=>_0x578461[_0x135804(0x1e8)]['localeCompare'](_0x190da3['name']));for(const _0x2c7c25 of _0x21162e){if(_0x2c7c25['isDirectory']()&&IGNORED_DIR_NAMES[_0x135804(0x1ce)](_0x2c7c25[_0x135804(0x1e8)]))continue;if(IGNORED_FILE_NAMES[_0x135804(0x1ce)](_0x2c7c25['name']))continue;const _0x3695eb=resolve(_0x4233de,_0x2c7c25['name']);if(isExcludedFilePath(_0x3695eb,_0x39db59))continue;if(_0x2c7c25['isSymbolicLink']())throw CliErrors[_0x135804(0x1c4)](_0x135804(0x1d6)+_0x3695eb);const _0x5a6b95=toPosixPath(relative(_0x4261ba,_0x3695eb));if(_0x2c7c25[_0x135804(0x1dd)]()){_0x2bc786(_0x3695eb);continue;}if(!_0x2c7c25[_0x135804(0x1d2)]())continue;validateSkillRelativePath(_0x5a6b95);const _0x3d59e5=readFileSync(_0x3695eb);_0x12daf9[_0x135804(0x1d7)]({'path':_0x5a6b95,'bytes':_0x3d59e5});}}return _0x2bc786(_0x4261ba),normalizeLocalFiles(_0x12daf9);}function a140_0x547e(){const _0x4672ec=['test','validation','Skill\x20file\x20path\x20must\x20be\x20text.','Skill\x20file\x20size\x20is\x20invalid:\x20','sort','compare','size','set','replace','split','595378bgNWBq','has','add','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','bytes','isFile','includes','296994VADdgq','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','push','561926GnymkH','Skill\x20file\x20sha256\x20is\x20invalid:\x20','string','isArray','toString','isDirectory','length','path','utf8','Unsafe\x20Skill\x20file\x20path:\x20','startsWith','trim','1FZRJtq','sha256','Duplicate\x20Skill\x20file\x20path:\x20','4872235oCTdNs','name','excludedFilePaths','from','1445613VXUYYF','isSafeInteger','6486360SDDevt','values','object','3251104bXTdtz'];a140_0x547e=function(){return _0x4672ec;};return a140_0x547e();}function canonicalExcludedFilePaths(_0x37fcad){const _0x4ad1eb=a140_0x8bd0,_0x1d611e=new Set();for(const _0x46d939 of _0x37fcad??[]){const _0x454212=resolve(_0x46d939);_0x1d611e[_0x4ad1eb(0x1cf)](_0x454212);try{_0x1d611e[_0x4ad1eb(0x1cf)](realpathSync(_0x454212));}catch{}}return _0x1d611e;}function isExcludedFilePath(_0xa9dd0b,_0x410655){const _0x3100f1=a140_0x8bd0;if(_0x410655['has'](_0xa9dd0b))return!![];if(_0x410655[_0x3100f1(0x1c9)]===0x0)return![];try{return _0x410655[_0x3100f1(0x1ce)](realpathSync(_0xa9dd0b));}catch{return![];}}export function compareSkillFiles(_0x62f558,_0x5dac2f){const _0x1dc808=a140_0x8bd0;if(_0x62f558[_0x1dc808(0x1df)]===SKILL_FILE)return _0x5dac2f[_0x1dc808(0x1df)]===SKILL_FILE?0x0:-0x1;if(_0x5dac2f['path']===SKILL_FILE)return 0x1;return Buffer[_0x1dc808(0x1c8)](Buffer[_0x1dc808(0x1ea)](_0x62f558[_0x1dc808(0x1df)],_0x1dc808(0x1e0)),Buffer['from'](_0x5dac2f[_0x1dc808(0x1df)],_0x1dc808(0x1e0)));}export function normalizeSkillRelativePath(_0x5e2648){const _0x25512a=a140_0x8bd0,_0x4d3b14=toPosixPath(_0x5e2648[_0x25512a(0x1e3)]());return validateSkillRelativePath(_0x4d3b14),_0x4d3b14;}function a140_0x8bd0(_0x587ec6,_0x173ab0){_0x587ec6=_0x587ec6-0x1c0;const _0x547e9a=a140_0x547e();let _0x8bd0bc=_0x547e9a[_0x587ec6];return _0x8bd0bc;}export function validateSkillRelativePath(_0x1558a6){const _0x205da5=a140_0x8bd0;if(!_0x1558a6||_0x1558a6[_0x205da5(0x1e2)]('/')||_0x1558a6[_0x205da5(0x1d3)]('//'))throw CliErrors[_0x205da5(0x1c4)](_0x205da5(0x1e1)+_0x1558a6);for(const _0x13b428 of _0x1558a6[_0x205da5(0x1cc)]('/')){if(!_0x13b428||_0x13b428==='.'||_0x13b428==='..')throw CliErrors[_0x205da5(0x1c4)](_0x205da5(0x1e1)+_0x1558a6);}}export function toPosixPath(_0x87b045){const _0x21752a=a140_0x8bd0;return _0x87b045[_0x21752a(0x1cb)](/\\/g,'/');}export function isSha256Hex(_0x598425){const _0xae5056=a140_0x8bd0;return typeof _0x598425===_0xae5056(0x1da)&&/^[a-fA-F0-9]{64}$/[_0xae5056(0x1c3)](_0x598425);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x23c458,_0x1d0bfa){const _0x17d2c8=a141_0x570a,_0x29c9db=_0x23c458();while(!![]){try{const _0x557b0f=parseInt(_0x17d2c8(0x147))/0x1*(parseInt(_0x17d2c8(0x178))/0x2)+parseInt(_0x17d2c8(0x174))/0x3+parseInt(_0x17d2c8(0x156))/0x4+-parseInt(_0x17d2c8(0x158))/0x5*(parseInt(_0x17d2c8(0x176))/0x6)+-parseInt(_0x17d2c8(0x15e))/0x7*(-parseInt(_0x17d2c8(0x14d))/0x8)+parseInt(_0x17d2c8(0x164))/0x9+-parseInt(_0x17d2c8(0x15b))/0xa;if(_0x557b0f===_0x1d0bfa)break;else _0x29c9db['push'](_0x29c9db['shift']());}catch(_0x4594cf){_0x29c9db['push'](_0x29c9db['shift']());}}}(a141_0x5acd,0x54aac));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';function a141_0x570a(_0x1b8ebe,_0x51ff2a){_0x1b8ebe=_0x1b8ebe-0x141;const _0x5acd9d=a141_0x5acd();let _0x570a65=_0x5acd9d[_0x1b8ebe];return _0x570a65;}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a141_0x5acd(){const _0x1817b9=['---\x0a','force','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','has','1WyKaJB','pulledAt','find','contents','set','name:\x20','2640eIKpXi','skillName','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','match','version','status','map','filter','path','67892uOZBxi','keys','5sKkCHY','isFile','entries','15587630XmEMgl','join','displayName:\x20','12635gWwSdw','validation','packageBytes','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','trim','Managed\x20file\x20was\x20removed\x20locally:\x20','4239396kQqIPs','---','\x0a---\x0a\x0a','test','scope','displayName','length','description','slice','fileHashes','skillCode','Runtime\x20Skill\x20package\x20is\x20missing\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','delete','errors','stringify','1894557DCNboh','accessKey','2265204GjyjgV','env','1135814asfepg','toString','contentHash','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','appCode','replace','example','paths','description:\x20','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'];a141_0x5acd=function(){return _0x1817b9;};return a141_0x5acd();}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x2297bf,_0x59df55,_0x3df78e){const _0x3e92fc=a141_0x570a,_0x56c08e=requireSkillCode(_0x2297bf),_0x3d32a6=requirePackageBytes(_0x56c08e,_0x3df78e[_0x3e92fc(0x160)]),_0x39f8bb=extractDownloadedPackage(_0x3d32a6),_0x49fba9=_0x39f8bb['find'](_0x10800c=>_0x10800c[_0x3e92fc(0x155)]===SKILL_FILE);if(!_0x49fba9)throw CliErrors[_0x3e92fc(0x15f)](_0x3e92fc(0x16f)+SKILL_FILE+':\x20'+_0x56c08e);const _0x1700ea=withMaterializedSkillFrontmatter(_0x39f8bb,_0x2297bf,_0x56c08e),_0x404205=_0x1700ea[_0x3e92fc(0x149)](_0x4d47ff=>_0x4d47ff[_0x3e92fc(0x155)]===SKILL_FILE),_0x50199f=fileText(_0x404205),_0x39668b=getRuntimeSkillDir(_0x3df78e[_0x3e92fc(0x177)],_0x3df78e[_0x3e92fc(0x175)],_0x3df78e[_0x3e92fc(0x17c)],_0x59df55,_0x56c08e,_0x3df78e[_0x3e92fc(0x17f)]),_0x1cbab7=resolve(_0x39668b,SKILL_FILE),_0x32404b=resolve(_0x39668b,METADATA_FILE),_0x195d69=contentHash(_0x50199f),_0x5182c2=readMetadataIfPresent(_0x32404b)?.[_0x3e92fc(0x16d)];ensurePulledFilesCanBeOverwritten(_0x39668b,_0x32404b,_0x1700ea,_0x3df78e[_0x3e92fc(0x144)]===!![]),mkdirSync(_0x39668b,{'recursive':!![],'mode':0x1c0});const _0x5588a8=existsSync(_0x1cbab7)?readFileSync(_0x1cbab7,'utf8'):undefined;return materializeFiles(_0x39668b,_0x1700ea),removeStaleManagedFiles(_0x39668b,_0x5182c2,_0x1700ea),writeJsonAtomic(_0x32404b,buildMetadata(_0x2297bf,_0x59df55,_0x3df78e[_0x3e92fc(0x17c)],_0x195d69,_0x3df78e[_0x3e92fc(0x148)],_0x1700ea,_0x3d32a6)),{'skill':_0x2297bf,'scope':_0x59df55,'dir':_0x39668b,'skillMdPath':_0x1cbab7,'metadataPath':_0x32404b,'contentHash':_0x195d69,'changed':_0x5588a8!==_0x50199f};}export function reuseMaterializedRuntimeSkill(_0x56c9fd,_0x30def2,_0x98c87){const _0x86a0cd=a141_0x570a,_0x475a17=_0x56c9fd[_0x86a0cd(0x151)]?.[_0x86a0cd(0x162)]();if(!_0x475a17)return undefined;const _0x532e48=requireSkillCode(_0x56c9fd),_0x513af4=getRuntimeSkillDir(_0x98c87[_0x86a0cd(0x177)],_0x98c87[_0x86a0cd(0x175)],_0x98c87['appCode'],_0x30def2,_0x532e48,_0x98c87[_0x86a0cd(0x17f)]),_0x4bc365=resolve(_0x513af4,SKILL_FILE),_0x318c6f=resolve(_0x513af4,METADATA_FILE),_0x4efabf=readMetadataIfPresent(_0x318c6f);if(!_0x4efabf||_0x4efabf['schemaVersion']!==0x2||_0x4efabf[_0x86a0cd(0x17c)]!==_0x98c87[_0x86a0cd(0x17c)]||_0x4efabf[_0x86a0cd(0x168)]!==_0x30def2||_0x4efabf[_0x86a0cd(0x16e)]!==_0x532e48||_0x4efabf[_0x86a0cd(0x151)]!==_0x475a17||_0x4efabf['id']!==_0x56c9fd['id']||_0x4efabf[_0x86a0cd(0x14e)]!==_0x56c9fd['skillName']||_0x4efabf[_0x86a0cd(0x16b)]!==_0x56c9fd[_0x86a0cd(0x16b)]||_0x4efabf[_0x86a0cd(0x17e)]!==_0x56c9fd[_0x86a0cd(0x17e)]||_0x4efabf[_0x86a0cd(0x152)]!==_0x56c9fd['status']||!_0x4efabf[_0x86a0cd(0x17a)]||!_0x4efabf['fileHashes']||!Object['hasOwn'](_0x4efabf['fileHashes'],SKILL_FILE))return undefined;for(const [_0xf3bb45,_0x5cac72]of Object[_0x86a0cd(0x15a)](_0x4efabf[_0x86a0cd(0x16d)])){if(!/^[a-f0-9]{64}$/[_0x86a0cd(0x167)](_0x5cac72))return undefined;const _0x926ac9=resolveManagedFilePath(_0x513af4,_0xf3bb45);if(!existsSync(_0x926ac9)||!lstatSync(_0x926ac9)[_0x86a0cd(0x159)]())return undefined;if(bufferSha256(readFileSync(_0x926ac9))!==_0x5cac72)return undefined;}return{'skill':_0x56c9fd,'scope':_0x30def2,'dir':_0x513af4,'skillMdPath':_0x4bc365,'metadataPath':_0x318c6f,'contentHash':_0x4efabf['contentHash'],'changed':![]};}function withMaterializedSkillFrontmatter(_0xc563a5,_0x17f7e0,_0x58caba){const _0x598a9e=skillDisplayName(_0x17f7e0,_0x58caba),_0xa3f7b2=_0x17f7e0['description']?.['trim']()||_0x598a9e||_0x58caba;return normalizeLocalFiles(_0xc563a5)['map'](_0x99003a=>{const _0x915570=a141_0x570a,_0x251099=fileText(_0x99003a);if(_0x99003a['path']!==SKILL_FILE)return _0x99003a;if(hasYamlFrontmatter(_0x251099))return{'path':_0x99003a[_0x915570(0x155)],'content':withSyncedDisplayName(_0x251099,_0x598a9e)};return{'path':_0x99003a[_0x915570(0x155)],'content':prependSkillFrontmatter(_0x251099,{'name':_0x58caba,'displayName':_0x598a9e,'description':_0xa3f7b2})};});}function hasYamlFrontmatter(_0x1056a3){const _0xdc4b02=a141_0x570a;return/^\uFEFF?---\s*\r?\n/[_0xdc4b02(0x167)](_0x1056a3);}function prependSkillFrontmatter(_0x24fe96,_0x203d66){const _0x30f481=a141_0x570a,_0x1555f9=_0x24fe96['replace'](/^\uFEFF/,'');return[_0x30f481(0x165),_0x30f481(0x14c)+yamlString(_0x203d66['name']),_0x203d66[_0x30f481(0x169)]?_0x30f481(0x15d)+yamlString(_0x203d66['displayName']):undefined,_0x30f481(0x141)+yamlString(_0x203d66['description']),'---','',_0x1555f9][_0x30f481(0x154)](_0x4929a2=>_0x4929a2!==undefined)[_0x30f481(0x15c)]('\x0a');}function yamlString(_0xc7b080){const _0x140b2e=a141_0x570a;return JSON[_0x140b2e(0x173)](_0xc7b080['replace'](/\r/g,'')[_0x140b2e(0x162)]());}function skillDisplayName(_0x9d8fdb,_0x22e8a2){const _0x4fd79e=a141_0x570a,_0x57b039=_0x9d8fdb[_0x4fd79e(0x14e)]?.[_0x4fd79e(0x162)]();return _0x57b039||_0x22e8a2;}function withSyncedDisplayName(_0x1b4e25,_0xd664be){const _0x3d08a6=a141_0x570a,_0x2c9707=_0x1b4e25[_0x3d08a6(0x150)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2c9707)return _0x1b4e25;const _0x2d772f=_0x2c9707[0x1]??'',_0x47784e=_0x2c9707[0x2]??'',_0x4d67b2=parseDocument(_0x47784e);if(_0x4d67b2[_0x3d08a6(0x172)]['length']>0x0||!isMap(_0x4d67b2[_0x3d08a6(0x14a)]))return _0x1b4e25;if(_0xd664be)_0x4d67b2[_0x3d08a6(0x14b)](_0x3d08a6(0x169),_0xd664be);else{if(_0x4d67b2[_0x3d08a6(0x146)](_0x3d08a6(0x169)))_0x4d67b2[_0x3d08a6(0x171)](_0x3d08a6(0x169));else return _0x1b4e25;}forceBlockCollections(_0x4d67b2['contents']);const _0x15e322=_0x4d67b2[_0x3d08a6(0x179)]({'lineWidth':0x0})['trimEnd'](),_0xfc0a30=_0x1b4e25[_0x3d08a6(0x16c)](_0x2c9707[0x0][_0x3d08a6(0x16a)])[_0x3d08a6(0x17d)](/^\r?\n/,'');return _0x2d772f+_0x3d08a6(0x143)+_0x15e322+_0x3d08a6(0x166)+_0xfc0a30;}function forceBlockCollections(_0x1483b5){if(!isNode(_0x1483b5))return;visit(_0x1483b5,(_0x4ae37c,_0x26e9ba)=>{isCollection(_0x26e9ba)&&(_0x26e9ba['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x28e211,_0x39e99f,_0x2bc6c3,_0x2deb60){const _0x21bcbf=a141_0x570a;if(_0x2deb60||!existsSync(_0x39e99f))return;const _0x80a5ae=readMetadataIfPresent(_0x39e99f);if(!_0x80a5ae)return;const _0x460baa=_0x80a5ae[_0x21bcbf(0x16d)]&&Object[_0x21bcbf(0x157)](_0x80a5ae[_0x21bcbf(0x16d)])['length']>0x0?_0x80a5ae['fileHashes']:undefined;if(_0x460baa)for(const [_0x5023fa,_0x392403]of Object[_0x21bcbf(0x15a)](_0x460baa)){const _0x3eb133=resolveManagedFilePath(_0x28e211,_0x5023fa);if(!existsSync(_0x3eb133))throw CliErrors[_0x21bcbf(0x15f)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x28e211,_0x21bcbf(0x163)+_0x5023fa);const _0x39f0d8=lstatSync(_0x3eb133);if(!_0x39f0d8[_0x21bcbf(0x159)]())throw CliErrors[_0x21bcbf(0x15f)](_0x21bcbf(0x161)+_0x28e211,_0x21bcbf(0x17b)+_0x5023fa);const _0x45366e=bufferSha256(readFileSync(_0x3eb133));if(_0x45366e!==_0x392403)throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x28e211+'.\x20Changed\x20file:\x20'+_0x5023fa,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20'+_0x5023fa);}else{const _0x404bf0=resolve(_0x28e211,SKILL_FILE);if(existsSync(_0x404bf0)&&_0x80a5ae[_0x21bcbf(0x17a)]){const _0x49287b=contentHash(readFileSync(_0x404bf0,'utf8'));if(_0x49287b!==_0x80a5ae[_0x21bcbf(0x17a)])throw CliErrors['validation'](_0x21bcbf(0x145)+_0x404bf0,_0x21bcbf(0x14f));}}for(const _0x129dd9 of normalizeLocalFiles(_0x2bc6c3)){if(_0x460baa?.[_0x129dd9[_0x21bcbf(0x155)]])continue;if(!_0x460baa&&_0x129dd9[_0x21bcbf(0x155)]===SKILL_FILE)continue;const _0x1fcd90=resolveManagedFilePath(_0x28e211,_0x129dd9[_0x21bcbf(0x155)]);if(!existsSync(_0x1fcd90))continue;const _0x2c8fb9=lstatSync(_0x1fcd90);if(!_0x2c8fb9[_0x21bcbf(0x159)]())throw CliErrors[_0x21bcbf(0x15f)](_0x21bcbf(0x161)+_0x28e211,_0x21bcbf(0x142)+_0x129dd9[_0x21bcbf(0x155)]);const _0x193355=bufferSha256(readFileSync(_0x1fcd90));if(_0x193355!==fileHash(_0x129dd9))throw CliErrors[_0x21bcbf(0x15f)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x28e211,_0x21bcbf(0x170)+_0x129dd9['path']);}}function materializeFiles(_0x96d980,_0x15e6f1){const _0x2f0aec=a141_0x570a;for(const _0x5007c8 of normalizeLocalFiles(_0x15e6f1)){const _0x3bf03a=resolveManagedFilePath(_0x96d980,_0x5007c8[_0x2f0aec(0x155)]);mkdirSync(dirname(_0x3bf03a),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x3bf03a,fileContent(_0x5007c8),0x180);}}function removeStaleManagedFiles(_0x3924cc,_0x670ea6,_0x174bdf){const _0x58f372=a141_0x570a;if(!_0x670ea6)return;const _0x59b9d7=new Set(normalizeLocalFiles(_0x174bdf)[_0x58f372(0x153)](_0xf61e1b=>_0xf61e1b['path']));for(const _0x283cf1 of Object[_0x58f372(0x157)](_0x670ea6)){if(_0x59b9d7[_0x58f372(0x146)](_0x283cf1))continue;const _0xe2ed49=resolveManagedFilePath(_0x3924cc,_0x283cf1);existsSync(_0xe2ed49)&&lstatSync(_0xe2ed49)[_0x58f372(0x159)]()&&rmSync(_0xe2ed49,{'force':!![]});}}
|
|
1
|
+
(function(_0x4c6d87,_0x52bb5a){const _0x5ca07d=a141_0x48c7,_0x4e8212=_0x4c6d87();while(!![]){try{const _0x3f2c57=parseInt(_0x5ca07d(0x1f5))/0x1+parseInt(_0x5ca07d(0x1dd))/0x2+-parseInt(_0x5ca07d(0x1fd))/0x3*(parseInt(_0x5ca07d(0x1ec))/0x4)+-parseInt(_0x5ca07d(0x1e8))/0x5*(parseInt(_0x5ca07d(0x1e3))/0x6)+-parseInt(_0x5ca07d(0x1ea))/0x7+parseInt(_0x5ca07d(0x1e9))/0x8*(parseInt(_0x5ca07d(0x20b))/0x9)+-parseInt(_0x5ca07d(0x201))/0xa*(-parseInt(_0x5ca07d(0x1d3))/0xb);if(_0x3f2c57===_0x52bb5a)break;else _0x4e8212['push'](_0x4e8212['shift']());}catch(_0x1d7ddf){_0x4e8212['push'](_0x4e8212['shift']());}}}(a141_0x4c02,0xb88d5));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';function a141_0x4c02(){const _0x183965=['packageBytes','contents','\x0a---\x0a\x0a','example','stringify','585MstOrv','242piksfu','slice','path','paths','fileHashes','displayName','name:\x20','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','.\x20Changed\x20file:\x20','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','2972954cjnBKY','pulledAt','entries','keys','displayName:\x20','toString','4374XCayId','delete','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','scope','7315ScNsky','130600zjpnHV','4239942wXoZvm','description','14468YXVPmp','set','test','find','validation','---','appCode','has','accessKey','620863nRnbWY','env','match','length','name','isFile','schemaVersion','utf8','699mwACYm','skillName','map','trim','46570prbpGJ','contentHash','version','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','replace'];a141_0x4c02=function(){return _0x183965;};return a141_0x4c02();}export function materializeRuntimeSkill(_0x538793,_0x57b591,_0x593db9){const _0xd93695=a141_0x48c7,_0x5bbf7d=requireSkillCode(_0x538793),_0x28c2cf=requirePackageBytes(_0x5bbf7d,_0x593db9[_0xd93695(0x206)]),_0x526c40=extractDownloadedPackage(_0x28c2cf),_0x157f5e=_0x526c40[_0xd93695(0x1ef)](_0x2323a1=>_0x2323a1['path']===SKILL_FILE);if(!_0x157f5e)throw CliErrors[_0xd93695(0x1f0)]('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+':\x20'+_0x5bbf7d);const _0x55bec6=withMaterializedSkillFrontmatter(_0x526c40,_0x538793,_0x5bbf7d),_0x5744f7=_0x55bec6['find'](_0x33f00c=>_0x33f00c[_0xd93695(0x1d5)]===SKILL_FILE),_0x279f7b=fileText(_0x5744f7),_0x14e70e=getRuntimeSkillDir(_0x593db9[_0xd93695(0x1f6)],_0x593db9[_0xd93695(0x1f4)],_0x593db9[_0xd93695(0x1f2)],_0x57b591,_0x5bbf7d,_0x593db9['paths']),_0x11e729=resolve(_0x14e70e,SKILL_FILE),_0x4de224=resolve(_0x14e70e,METADATA_FILE),_0xb5989b=contentHash(_0x279f7b),_0x52d645=readMetadataIfPresent(_0x4de224)?.[_0xd93695(0x1d7)];ensurePulledFilesCanBeOverwritten(_0x14e70e,_0x4de224,_0x55bec6,_0x593db9['force']===!![]),mkdirSync(_0x14e70e,{'recursive':!![],'mode':0x1c0});const _0x49700f=existsSync(_0x11e729)?readFileSync(_0x11e729,_0xd93695(0x1fc)):undefined;return materializeFiles(_0x14e70e,_0x55bec6),removeStaleManagedFiles(_0x14e70e,_0x52d645,_0x55bec6),writeJsonAtomic(_0x4de224,buildMetadata(_0x538793,_0x57b591,_0x593db9[_0xd93695(0x1f2)],_0xb5989b,_0x593db9[_0xd93695(0x1de)],_0x55bec6,_0x28c2cf)),{'skill':_0x538793,'scope':_0x57b591,'dir':_0x14e70e,'skillMdPath':_0x11e729,'metadataPath':_0x4de224,'contentHash':_0xb5989b,'changed':_0x49700f!==_0x279f7b};}export function reuseMaterializedRuntimeSkill(_0x130946,_0x53de5f,_0x551dba){const _0x39a489=a141_0x48c7,_0x410652=_0x130946[_0x39a489(0x203)]?.[_0x39a489(0x200)]();if(!_0x410652)return undefined;const _0x83ae3e=requireSkillCode(_0x130946),_0x4b4443=getRuntimeSkillDir(_0x551dba['env'],_0x551dba[_0x39a489(0x1f4)],_0x551dba[_0x39a489(0x1f2)],_0x53de5f,_0x83ae3e,_0x551dba[_0x39a489(0x1d6)]),_0x2e18f7=resolve(_0x4b4443,SKILL_FILE),_0x1f8800=resolve(_0x4b4443,METADATA_FILE),_0x80344f=readMetadataIfPresent(_0x1f8800);if(!_0x80344f||_0x80344f[_0x39a489(0x1fb)]!==0x2||_0x80344f[_0x39a489(0x1f2)]!==_0x551dba[_0x39a489(0x1f2)]||_0x80344f[_0x39a489(0x1e7)]!==_0x53de5f||_0x80344f['skillCode']!==_0x83ae3e||_0x80344f[_0x39a489(0x203)]!==_0x410652||_0x80344f['id']!==_0x130946['id']||_0x80344f[_0x39a489(0x1fe)]!==_0x130946[_0x39a489(0x1fe)]||_0x80344f[_0x39a489(0x1eb)]!==_0x130946[_0x39a489(0x1eb)]||_0x80344f[_0x39a489(0x209)]!==_0x130946[_0x39a489(0x209)]||_0x80344f['status']!==_0x130946['status']||!_0x80344f['contentHash']||!_0x80344f[_0x39a489(0x1d7)]||!Object['hasOwn'](_0x80344f[_0x39a489(0x1d7)],SKILL_FILE))return undefined;for(const [_0x4482ac,_0x5ac75f]of Object[_0x39a489(0x1df)](_0x80344f['fileHashes'])){if(!/^[a-f0-9]{64}$/['test'](_0x5ac75f))return undefined;const _0x2141ae=resolveManagedFilePath(_0x4b4443,_0x4482ac);if(!existsSync(_0x2141ae)||!lstatSync(_0x2141ae)[_0x39a489(0x1fa)]())return undefined;if(bufferSha256(readFileSync(_0x2141ae))!==_0x5ac75f)return undefined;}return{'skill':_0x130946,'scope':_0x53de5f,'dir':_0x4b4443,'skillMdPath':_0x2e18f7,'metadataPath':_0x1f8800,'contentHash':_0x80344f[_0x39a489(0x202)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x3d577f,_0x3d6dce,_0x569090){const _0x16beae=skillDisplayName(_0x3d6dce,_0x569090),_0x5178d1=_0x3d6dce['description']?.['trim']()||_0x16beae||_0x569090;return normalizeLocalFiles(_0x3d577f)['map'](_0x87c7ba=>{const _0x350f39=a141_0x48c7,_0x4960e7=fileText(_0x87c7ba);if(_0x87c7ba[_0x350f39(0x1d5)]!==SKILL_FILE)return _0x87c7ba;if(hasYamlFrontmatter(_0x4960e7))return{'path':_0x87c7ba[_0x350f39(0x1d5)],'content':withSyncedDisplayName(_0x4960e7,_0x16beae)};return{'path':_0x87c7ba[_0x350f39(0x1d5)],'content':prependSkillFrontmatter(_0x4960e7,{'name':_0x569090,'displayName':_0x16beae,'description':_0x5178d1})};});}function hasYamlFrontmatter(_0x3a89e4){const _0x269ea7=a141_0x48c7;return/^\uFEFF?---\s*\r?\n/[_0x269ea7(0x1ee)](_0x3a89e4);}function prependSkillFrontmatter(_0x17e50b,_0x59bcd9){const _0x36b7d4=a141_0x48c7,_0x12ee56=_0x17e50b['replace'](/^\uFEFF/,'');return[_0x36b7d4(0x1f1),_0x36b7d4(0x1d9)+yamlString(_0x59bcd9[_0x36b7d4(0x1f9)]),_0x59bcd9[_0x36b7d4(0x1d8)]?_0x36b7d4(0x1e1)+yamlString(_0x59bcd9[_0x36b7d4(0x1d8)]):undefined,'description:\x20'+yamlString(_0x59bcd9[_0x36b7d4(0x1eb)]),_0x36b7d4(0x1f1),'',_0x12ee56]['filter'](_0x167c66=>_0x167c66!==undefined)['join']('\x0a');}function yamlString(_0xe8f610){const _0x5bc439=a141_0x48c7;return JSON[_0x5bc439(0x20a)](_0xe8f610[_0x5bc439(0x205)](/\r/g,'')[_0x5bc439(0x200)]());}function skillDisplayName(_0x2195dd,_0x1f5413){const _0x1aa6f8=a141_0x48c7,_0x4e5492=_0x2195dd['skillName']?.[_0x1aa6f8(0x200)]();return _0x4e5492||_0x1f5413;}function withSyncedDisplayName(_0x18adbb,_0x280298){const _0x1b0055=a141_0x48c7,_0x18c10c=_0x18adbb[_0x1b0055(0x1f7)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x18c10c)return _0x18adbb;const _0x490956=_0x18c10c[0x1]??'',_0x497cfc=_0x18c10c[0x2]??'',_0x2b5241=parseDocument(_0x497cfc);if(_0x2b5241['errors'][_0x1b0055(0x1f8)]>0x0||!isMap(_0x2b5241[_0x1b0055(0x207)]))return _0x18adbb;if(_0x280298)_0x2b5241[_0x1b0055(0x1ed)](_0x1b0055(0x1d8),_0x280298);else{if(_0x2b5241[_0x1b0055(0x1f3)](_0x1b0055(0x1d8)))_0x2b5241[_0x1b0055(0x1e4)](_0x1b0055(0x1d8));else return _0x18adbb;}forceBlockCollections(_0x2b5241[_0x1b0055(0x207)]);const _0x212941=_0x2b5241[_0x1b0055(0x1e2)]({'lineWidth':0x0})['trimEnd'](),_0x3dc3de=_0x18adbb[_0x1b0055(0x1d4)](_0x18c10c[0x0][_0x1b0055(0x1f8)])[_0x1b0055(0x205)](/^\r?\n/,'');return _0x490956+'---\x0a'+_0x212941+_0x1b0055(0x208)+_0x3dc3de;}function forceBlockCollections(_0x1c1474){if(!isNode(_0x1c1474))return;visit(_0x1c1474,(_0x53d3ee,_0x411d1f)=>{isCollection(_0x411d1f)&&(_0x411d1f['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x5f377b,_0x3b5006,_0x18a22d,_0x25eb3d){const _0x5be2c3=a141_0x48c7;if(_0x25eb3d||!existsSync(_0x3b5006))return;const _0x583d6d=readMetadataIfPresent(_0x3b5006);if(!_0x583d6d)return;const _0x15131e=_0x583d6d[_0x5be2c3(0x1d7)]&&Object[_0x5be2c3(0x1e0)](_0x583d6d[_0x5be2c3(0x1d7)])[_0x5be2c3(0x1f8)]>0x0?_0x583d6d[_0x5be2c3(0x1d7)]:undefined;if(_0x15131e)for(const [_0x324f2c,_0x48abc2]of Object['entries'](_0x15131e)){const _0x3ac77b=resolveManagedFilePath(_0x5f377b,_0x324f2c);if(!existsSync(_0x3ac77b))throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1da)+_0x5f377b,'Managed\x20file\x20was\x20removed\x20locally:\x20'+_0x324f2c);const _0x22c696=lstatSync(_0x3ac77b);if(!_0x22c696[_0x5be2c3(0x1fa)]())throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1da)+_0x5f377b,'Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20'+_0x324f2c);const _0x5df6cf=bufferSha256(readFileSync(_0x3ac77b));if(_0x5df6cf!==_0x48abc2)throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1da)+_0x5f377b+_0x5be2c3(0x1db)+_0x324f2c,_0x5be2c3(0x204)+_0x324f2c);}else{const _0x51276f=resolve(_0x5f377b,SKILL_FILE);if(existsSync(_0x51276f)&&_0x583d6d[_0x5be2c3(0x202)]){const _0x19650f=contentHash(readFileSync(_0x51276f,_0x5be2c3(0x1fc)));if(_0x19650f!==_0x583d6d[_0x5be2c3(0x202)])throw CliErrors[_0x5be2c3(0x1f0)](_0x5be2c3(0x1e6)+_0x51276f,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x28bdec of normalizeLocalFiles(_0x18a22d)){if(_0x15131e?.[_0x28bdec[_0x5be2c3(0x1d5)]])continue;if(!_0x15131e&&_0x28bdec['path']===SKILL_FILE)continue;const _0x22ca9a=resolveManagedFilePath(_0x5f377b,_0x28bdec['path']);if(!existsSync(_0x22ca9a))continue;const _0x150d78=lstatSync(_0x22ca9a);if(!_0x150d78[_0x5be2c3(0x1fa)]())throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x5f377b,_0x5be2c3(0x1e5)+_0x28bdec['path']);const _0x4f14e1=bufferSha256(readFileSync(_0x22ca9a));if(_0x4f14e1!==fileHash(_0x28bdec))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x5f377b,_0x5be2c3(0x1dc)+_0x28bdec[_0x5be2c3(0x1d5)]);}}function materializeFiles(_0x5ce2f1,_0x3e446b){for(const _0x23540d of normalizeLocalFiles(_0x3e446b)){const _0x507164=resolveManagedFilePath(_0x5ce2f1,_0x23540d['path']);mkdirSync(dirname(_0x507164),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x507164,fileContent(_0x23540d),0x180);}}function a141_0x48c7(_0x2db9b0,_0x376350){_0x2db9b0=_0x2db9b0-0x1d3;const _0x4c024c=a141_0x4c02();let _0x48c7cc=_0x4c024c[_0x2db9b0];return _0x48c7cc;}function removeStaleManagedFiles(_0x586899,_0x482100,_0x1302ac){const _0x2f3b50=a141_0x48c7;if(!_0x482100)return;const _0x5300fa=new Set(normalizeLocalFiles(_0x1302ac)[_0x2f3b50(0x1ff)](_0x59e5ee=>_0x59e5ee[_0x2f3b50(0x1d5)]));for(const _0x319127 of Object[_0x2f3b50(0x1e0)](_0x482100)){if(_0x5300fa[_0x2f3b50(0x1f3)](_0x319127))continue;const _0x181bc9=resolveManagedFilePath(_0x586899,_0x319127);existsSync(_0x181bc9)&&lstatSync(_0x181bc9)[_0x2f3b50(0x1fa)]()&&rmSync(_0x181bc9,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59b027,_0x3d2d67){const _0x20b07e=a142_0x5829,_0x2c639d=_0x59b027();while(!![]){try{const _0x229a17=parseInt(_0x20b07e(0x156))/0x1+parseInt(_0x20b07e(0x145))/0x2*(parseInt(_0x20b07e(0x15f))/0x3)+parseInt(_0x20b07e(0x141))/0x4*(-parseInt(_0x20b07e(0x15c))/0x5)+parseInt(_0x20b07e(0x154))/0x6+-parseInt(_0x20b07e(0x144))/0x7*(-parseInt(_0x20b07e(0x148))/0x8)+parseInt(_0x20b07e(0x164))/0x9+-parseInt(_0x20b07e(0x165))/0xa;if(_0x229a17===_0x3d2d67)break;else _0x2c639d['push'](_0x2c639d['shift']());}catch(_0x13d4a7){_0x2c639d['push'](_0x2c639d['shift']());}}}(a142_0x3948,0x8cda4));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a142_0x5829(_0x25c6ca,_0x119c4c){_0x25c6ca=_0x25c6ca-0x140;const _0x394829=a142_0x3948();let _0x58294e=_0x394829[_0x25c6ca];return _0x58294e;}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';function a142_0x3948(){const _0x2d215e=['description','389747VuvrEy','isArray','personal','string','utf8','parse','97585MRbTrT','fromEntries','tenantCode','1158oWJfwD','skillCode','example','userId','zipSize','2872512zBtTIA','19565840wmBKXf','path','40jKyriX','sourceSessionId','forkedFromVersion','7287ThoGwC','5638XQSwEE','Invalid\x20','ossPath','4968FlkCuX','length','forkedFromSkillId','map','version','status','trim','toISOString','manifest','validation','Runtime\x20Skill\x20is\x20missing\x20skillCode.','readonly','1711056WVwPmy'];a142_0x3948=function(){return _0x2d215e;};return a142_0x3948();}import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x11e999,_0x4cd9fe,_0x4ff493,_0x6663ee,_0x151279,_0x8a15ec,_0xe5c6b1){const _0x4c9a20=a142_0x5829,_0x2aa5c4=_0x8a15ec?normalizeLocalFiles(_0x8a15ec):[],_0x2fd780=!_0xe5c6b1&&_0x2aa5c4[_0x4c9a20(0x149)]>0x0?buildSkillPackage(_0x2aa5c4):undefined,_0x149520=_0xe5c6b1?bufferSha256(_0xe5c6b1):_0x2fd780?.[_0x4c9a20(0x150)]['zipSha256'],_0x2f8671=_0xe5c6b1?.['length']??_0x2fd780?.[_0x4c9a20(0x150)][_0x4c9a20(0x163)],_0x2ced30=_0x2aa5c4['length']>0x0?Object[_0x4c9a20(0x15d)](_0x2aa5c4['map'](_0x31aa47=>[_0x31aa47[_0x4c9a20(0x140)],fileHash(_0x31aa47)])):undefined;return{'schemaVersion':_0x2aa5c4['length']>0x0?0x2:0x1,'id':_0x11e999['id'],'appCode':_0x4ff493,'skillCode':requireSkillCode(_0x11e999),'skillName':_0x11e999['skillName'],'description':_0x11e999[_0x4c9a20(0x155)],'example':_0x11e999[_0x4c9a20(0x161)],'scope':_0x4cd9fe,'readonly':_0x4cd9fe!==_0x4c9a20(0x158)||_0x11e999[_0x4c9a20(0x153)]===!![],'tenantCode':_0x11e999[_0x4c9a20(0x15e)],'userId':_0x11e999[_0x4c9a20(0x162)],'version':_0x11e999[_0x4c9a20(0x14c)],'status':_0x11e999[_0x4c9a20(0x14d)],'tags':Array['isArray'](_0x11e999['tags'])?_0x11e999['tags']:[],'hasUpstreamUpdate':_0x11e999['hasUpstreamUpdate'],'forkedFromSkillId':_0x11e999[_0x4c9a20(0x14a)],'forkedFromVersion':_0x11e999[_0x4c9a20(0x143)],'sourceSessionId':_0x11e999[_0x4c9a20(0x142)],'contentHash':_0x6663ee,'fileHashes':_0x2ced30,'treeHash':_0x2aa5c4[_0x4c9a20(0x149)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x2aa5c4)):undefined,'ossPath':remoteManifestOssPath(_0x11e999['files']),'zipSha256':_0x149520,'zipSize':_0x2f8671,'files':_0x2aa5c4[_0x4c9a20(0x149)]>0x0?_0x2aa5c4[_0x4c9a20(0x14b)](_0x5ff54c=>({'path':_0x5ff54c[_0x4c9a20(0x140)],'hash':fileHash(_0x5ff54c),'size':fileContent(_0x5ff54c)[_0x4c9a20(0x149)]})):undefined,'pulledAt':_0x151279??new Date()[_0x4c9a20(0x14f)]()};}export function requireSkillCode(_0x194d97){const _0x535ab3=a142_0x5829,_0x104547=_0x194d97[_0x535ab3(0x160)]?.[_0x535ab3(0x14e)]();if(!_0x104547)throw CliErrors[_0x535ab3(0x151)](_0x535ab3(0x152));return _0x104547;}export function readMetadataIfPresent(_0x5f0664){const _0x5e0328=a142_0x5829;if(!existsSync(_0x5f0664))return undefined;try{const _0x18a5de=JSON[_0x5e0328(0x15b)](readFileSync(_0x5f0664,_0x5e0328(0x15a)));return _0x18a5de;}catch{throw CliErrors[_0x5e0328(0x151)](_0x5e0328(0x146)+METADATA_FILE+':\x20'+_0x5f0664);}}function remoteManifestOssPath(_0x3e9421){const _0x2e970a=a142_0x5829;if(!_0x3e9421||typeof _0x3e9421!=='object'||Array[_0x2e970a(0x157)](_0x3e9421))return undefined;const _0x5ac383=_0x3e9421[_0x2e970a(0x147)];return typeof _0x5ac383===_0x2e970a(0x159)&&_0x5ac383[_0x2e970a(0x14e)]()?_0x5ac383[_0x2e970a(0x14e)]():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a143_0xd4c2(_0x459597,_0x31545f){_0x459597=_0x459597-0x69;const _0x35ad9b=a143_0x35ad();let _0xd4c29b=_0x35ad9b[_0x459597];return _0xd4c29b;}(function(_0x305eb8,_0x598642){const _0x45f331=a143_0xd4c2,_0x177d9e=_0x305eb8();while(!![]){try{const _0x57151e=-parseInt(_0x45f331(0x6c))/0x1+-parseInt(_0x45f331(0x75))/0x2*(parseInt(_0x45f331(0x6b))/0x3)+parseInt(_0x45f331(0x6a))/0x4*(parseInt(_0x45f331(0x70))/0x5)+-parseInt(_0x45f331(0x7d))/0x6+-parseInt(_0x45f331(0x7a))/0x7+-parseInt(_0x45f331(0x81))/0x8*(parseInt(_0x45f331(0x72))/0x9)+parseInt(_0x45f331(0x79))/0xa;if(_0x57151e===_0x598642)break;else _0x177d9e['push'](_0x177d9e['shift']());}catch(_0x4fef27){_0x177d9e['push'](_0x177d9e['shift']());}}}(a143_0x35ad,0xa1a05));import{existsSync}from'node:fs';import{homedir}from'node:os';function a143_0x35ad(){const _0x238841=['4689153rvHuME','includes','.agents','4857528knvWKt','cache','skillCode','claudeSkillsDir','8vUTBIM','.workbuddy','workbuddySkillsDir','homeDirName','SKILL_ROOT','validation','100DJNBWc','3AyLKOj','196506sPOPQf','trim','cacheRoot','homeDir','230515BTDIGx','filter','8716977gzBwJe','skills','.claude','1435438QEDjVl','CLAUDE_SKILL_ROOT','Unsafe\x20','agentsSkillsDir','28716910Jjjdzc'];a143_0x35ad=function(){return _0x238841;};return a143_0x35ad();}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(_0x4c3b7c={}){const _0x51eb2f=a143_0xd4c2,_0x3deac4=_0x4c3b7c[_0x51eb2f(0x6f)]??homedir(),_0x54db29=resolve(_0x3deac4,PRODUCT_CONFIG[_0x51eb2f(0x84)],_0x51eb2f(0x7e)),_0x4cd508=trimmedEnv(_0x51eb2f(0x85)),_0x10eedf=trimmedEnv(_0x51eb2f(0x76)),_0x3f4aed=resolve(_0x3deac4,_0x51eb2f(0x82)),_0x11d565=_0x4c3b7c[_0x51eb2f(0x83)]??(existsSync(_0x3f4aed)?resolve(_0x3f4aed,_0x51eb2f(0x73)):undefined);return{'homeDir':_0x3deac4,'cacheRoot':_0x54db29,'managedRoot':resolve(_0x3deac4,PRODUCT_CONFIG['homeDirName']),'agentsSkillsDir':_0x4c3b7c[_0x51eb2f(0x78)]??_0x4cd508??resolve(_0x3deac4,_0x51eb2f(0x7c),'skills'),'claudeSkillsDir':_0x4c3b7c[_0x51eb2f(0x80)]??_0x10eedf??resolve(_0x3deac4,_0x51eb2f(0x74),'skills'),'workbuddySkillsDir':_0x11d565};}export function runtimeAgentSkillRoots(_0x2365ad){const _0x2cfaff=a143_0xd4c2;return[_0x2365ad[_0x2cfaff(0x78)],_0x2365ad[_0x2cfaff(0x80)],_0x2365ad[_0x2cfaff(0x83)]][_0x2cfaff(0x71)](_0x42ba5c=>Boolean(_0x42ba5c));}export function getRuntimeSkillCacheRoot(_0x46eebf,_0x12e31f,_0x704d1d={}){const _0x1e13f1=a143_0xd4c2,_0xe59670=resolveSkillSyncPaths(_0x704d1d);return resolve(_0xe59670[_0x1e13f1(0x6e)],_0x46eebf,fingerprintAccessKey(_0x12e31f),'skills');}export function getRuntimeSkillDir(_0x10e486,_0x227e5d,_0x191a7b,_0x2bbbea,_0x15ae54,_0x3328fc={}){const _0x55a98b=a143_0xd4c2;return resolve(getRuntimeSkillCacheRoot(_0x10e486,_0x227e5d,_0x3328fc),safePathSegment(_0x191a7b,'appCode'),_0x2bbbea,safePathSegment(_0x15ae54,_0x55a98b(0x7f)));}export function safePathSegment(_0x51c3e9,_0x18719b='path\x20segment'){const _0x59fbaa=a143_0xd4c2;if(!_0x51c3e9||_0x51c3e9[_0x59fbaa(0x7b)]('/')||_0x51c3e9[_0x59fbaa(0x7b)]('\x5c')||_0x51c3e9[_0x59fbaa(0x7b)]('..'))throw CliErrors[_0x59fbaa(0x69)](_0x59fbaa(0x77)+_0x18719b+'\x20for\x20local\x20path:\x20'+_0x51c3e9);return _0x51c3e9;}function trimmedEnv(_0x22e596){const _0x16f338=a143_0xd4c2,_0x25333c=productEnv(_0x22e596)?.[_0x16f338(0x6d)]();return _0x25333c?_0x25333c:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x565d3a,_0x55c86b){const _0x55aea3=a144_0x3e79,_0x1432f9=_0x565d3a();while(!![]){try{const _0x4db65f=-parseInt(_0x55aea3(0x8f))/0x1*(parseInt(_0x55aea3(0x85))/0x2)+parseInt(_0x55aea3(0xac))/0x3+-parseInt(_0x55aea3(0xa2))/0x4+parseInt(_0x55aea3(0x99))/0x5*(parseInt(_0x55aea3(0x8d))/0x6)+parseInt(_0x55aea3(0x81))/0x7*(parseInt(_0x55aea3(0x8e))/0x8)+-parseInt(_0x55aea3(0x7b))/0x9*(-parseInt(_0x55aea3(0xb2))/0xa)+parseInt(_0x55aea3(0xa9))/0xb*(-parseInt(_0x55aea3(0xa7))/0xc);if(_0x4db65f===_0x55c86b)break;else _0x1432f9['push'](_0x1432f9['shift']());}catch(_0x10d7dd){_0x1432f9['push'](_0x1432f9['shift']());}}}(a144_0x4050,0xba503));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';function a144_0x3e79(_0x4237da,_0x53f212){_0x4237da=_0x4237da-0x72;const _0x405053=a144_0x4050();let _0x3e7915=_0x405053[_0x4237da];return _0x3e7915;}import{basename,resolve}from'node:path';import{parse as a144_0x1c94f0}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(_0x21e6ba,_0x51f10c,_0x3a9768={}){const _0x473299=a144_0x3e79,_0x21d805=resolvePushDirectoryRoot(_0x21e6ba),_0x35ca34=readPushMetadataIfPresent(resolve(_0x21d805,METADATA_FILE),{'ignoreInvalidMetadata':_0x3a9768[_0x473299(0x79)]});if(_0x35ca34?.[_0x473299(0x7f)]&&_0x35ca34[_0x473299(0x7f)]!==_0x51f10c&&!_0x3a9768['allowAppCodeRetarget']&&!_0x3a9768[_0x473299(0x98)])throw CliErrors['validation'](_0x473299(0xb4)+_0x35ca34[_0x473299(0x7f)]+_0x473299(0x78)+_0x51f10c+'\x22.');const _0x1b5afd=resolvePushSkillCode(_0x21d805,_0x51f10c,_0x35ca34,_0x3a9768);if(!_0x1b5afd)throw CliErrors[_0x473299(0x8b)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x473299(0x72));return{'dir':_0x21d805,'skillCode':_0x1b5afd,'metadata':_0x35ca34};}export function readPushDirectory(_0xe3c8a,_0x4d66e6,_0x410316={}){const _0x16722a=a144_0x3e79,_0x50efa6=resolvePushDirectoryIdentity(_0xe3c8a,_0x4d66e6,_0x410316),_0x21f1e4=_0x50efa6[_0x16722a(0x96)],_0x383436=resolve(_0x21f1e4,SKILL_FILE);if(!existsSync(_0x383436)||!lstatSync(_0x383436)[_0x16722a(0xae)]())throw CliErrors[_0x16722a(0x8b)](_0x16722a(0xa4)+SKILL_FILE+':\x20'+_0x383436);const _0x265812=_0x50efa6['metadata'],_0x3f4f12=_0x410316[_0x16722a(0xa6)]??'personal';if(!_0x410316[_0x16722a(0x97)]&&_0x265812?.[_0x16722a(0x86)]===_0x16722a(0xaa))throw CliErrors[_0x16722a(0x8b)](_0x16722a(0x93)+METADATA_FILE+_0x16722a(0xb5)+_0x265812[_0x16722a(0x86)]+'\x22.');if(!_0x410316[_0x16722a(0x97)]&&_0x3f4f12===_0x16722a(0xa8)&&_0x265812?.[_0x16722a(0x86)]&&_0x265812['scope']!=='personal')throw CliErrors[_0x16722a(0x8b)](_0x16722a(0x7d)+METADATA_FILE+'\x20has\x20scope=\x22'+_0x265812[_0x16722a(0x86)]+'\x22.',_0x16722a(0x75)+_0x21f1e4+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x215884=scanSkillDirectory(_0x21f1e4,{'excludedFilePaths':_0x410316[_0x16722a(0x9e)]}),_0x5270ad=buildSkillPackage(_0x215884),_0x105819=readFileSync(_0x383436,_0x16722a(0x9f)),_0x2e982b=_0x50efa6[_0x16722a(0xad)],_0xb4846f=_0x410316[_0x16722a(0x9b)]?undefined:_0x265812,_0x70e42b=readSkillDisplayName(_0x105819);return{'skillCode':_0x2e982b,'metadata':_0x265812,'frontmatterDisplayName':_0x70e42b,'input':{'skillCode':_0x2e982b,'skillName':_0x70e42b??_0xb4846f?.[_0x16722a(0x74)],'description':_0xb4846f?.[_0x16722a(0x89)],'content':_0x105819,'files':_0x5270ad[_0x16722a(0x8c)],'packageBase64':_0x5270ad[_0x16722a(0xb1)],'tags':_0xb4846f?.[_0x16722a(0x9d)],'version':_0xb4846f?.[_0x16722a(0x92)],'sourceSessionId':_0xb4846f?.[_0x16722a(0x95)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x50a2d9,_0xa4a71e,_0xc1a654,_0x13d600={}){const _0x1a02b0=a144_0x3e79,_0x16cab6=resolvePushDirectoryRoot(_0x50a2d9),_0x38e915=readPushMetadataIfPresent(resolve(_0x16cab6,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x5141c1=requireRemoteScope(_0xa4a71e),_0x4f9fa4=readLocalSkillContent(_0x16cab6),_0x2f923e={..._0xa4a71e,'appCode':_0xa4a71e[_0x1a02b0(0x7f)]??_0xc1a654,'skillName':_0xa4a71e[_0x1a02b0(0x74)]??_0x38e915?.[_0x1a02b0(0x74)],'description':_0xa4a71e[_0x1a02b0(0x89)]??_0x38e915?.[_0x1a02b0(0x89)],'example':_0xa4a71e[_0x1a02b0(0x91)]??_0x38e915?.[_0x1a02b0(0x91)],'tags':Array[_0x1a02b0(0x73)](_0xa4a71e[_0x1a02b0(0x9d)])?_0xa4a71e['tags']:_0x38e915?.['tags'],'sourceSessionId':_0xa4a71e[_0x1a02b0(0x95)]??_0x38e915?.['sourceSessionId'],'content':_0xa4a71e[_0x1a02b0(0xb0)]??_0x4f9fa4},_0x4d31d1=buildMetadata(_0x2f923e,_0x5141c1,_0xc1a654,contentHash(_0x4f9fa4),_0x13d600[_0x1a02b0(0x84)]);writeJsonAtomic(resolve(_0x16cab6,METADATA_FILE),_0x4d31d1);}export function recordPushedRuntimeSkill(_0x301647,_0x1882e5,_0x516509,_0x43c5dc={}){const _0x47f1d9=a144_0x3e79,_0x39e7af=resolvePushDirectoryRoot(_0x301647),_0x54508d=scanSkillDirectory(_0x39e7af),_0x419bdf=_0x54508d[_0x47f1d9(0x7c)](_0x28f414=>_0x28f414['path']===SKILL_FILE),_0x34b187=_0x419bdf?fileText(_0x419bdf):'',_0x39e418=tryNormalizePackageManifest(_0x1882e5[_0x47f1d9(0xaf)]),_0x21289b={..._0x1882e5,'content':_0x1882e5[_0x47f1d9(0xb0)]??_0x34b187,'files':_0x39e418},_0x52a811=_0x39e418?normalizeLocalFiles(_0x54508d)['filter'](_0x1cf6e6=>_0x39e418[_0x47f1d9(0xaf)][_0x47f1d9(0x90)](_0x350ae6=>_0x350ae6[_0x47f1d9(0xb6)]===_0x1cf6e6[_0x47f1d9(0xb6)])):undefined,_0x57869b=buildMetadata(_0x21289b,_0x43c5dc[_0x47f1d9(0x86)]??'personal',_0x516509,contentHash(_0x21289b['content']??''),_0x43c5dc[_0x47f1d9(0x76)],_0x52a811);writeJsonAtomic(resolve(_0x39e7af,METADATA_FILE),_0x57869b);}export function deriveSkillCodeFromDirectory(_0x222ad7,_0x5968e2){const _0xe4b9af=a144_0x3e79,_0x3612b0=basename(resolve(_0x222ad7)),_0x464ed3=_0x5968e2+'--';return _0x3612b0[_0xe4b9af(0x82)](_0x464ed3)?_0x3612b0[_0xe4b9af(0x7e)](_0x464ed3[_0xe4b9af(0xab)]):_0x3612b0;}function resolvePushSkillCode(_0x226bb0,_0x192725,_0x2671b0,_0x1a2a5a){const _0x137d32=a144_0x3e79,_0x335097=deriveSkillCodeFromSkillFile(_0x226bb0)||deriveSkillCodeFromDirectory(_0x226bb0,_0x192725);if(_0x1a2a5a['ignoreMetadataSkillCode'])return _0x335097;return _0x2671b0?.[_0x137d32(0xad)]?.['trim']()||_0x335097;}function deriveSkillCodeFromSkillFile(_0x1e6adf){const _0x1433a7=a144_0x3e79,_0x6be3ea=resolve(_0x1e6adf,SKILL_FILE);if(!existsSync(_0x6be3ea)||!lstatSync(_0x6be3ea)[_0x1433a7(0xae)]())return undefined;const _0x26e676=readFileSync(_0x6be3ea,_0x1433a7(0x9f)),_0x33327e=_0x26e676[_0x1433a7(0x8a)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x33327e)return undefined;const _0x2bb764=parseFrontmatterObject(_0x33327e[0x1]??''),_0x300c99=scalarToString(_0x2bb764?.[_0x1433a7(0x7a)]);return _0x300c99?slugifySkillName(_0x300c99):undefined;}function readSkillDisplayName(_0x345e2c){const _0x4a1485=a144_0x3e79,_0x25d5d3=_0x345e2c['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x25d5d3)return undefined;const _0x1da45c=parseFrontmatterObject(_0x25d5d3[0x1]??'');return scalarToString(_0x1da45c?.[_0x4a1485(0x94)]);}function slugifySkillName(_0x53a27b){const _0x4aa12a=a144_0x3e79,_0x21314f=_0x53a27b[_0x4aa12a(0x9c)]()[_0x4aa12a(0x9a)]()[_0x4aa12a(0xa1)](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x4aa12a(0xa1)](/^-+/,'')[_0x4aa12a(0xa1)](/-+$/,'')[_0x4aa12a(0xa1)](/-{2,}/g,'-');if(!_0x21314f)throw CliErrors['validation']('Invalid\x20'+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x21314f;}function parseFrontmatterObject(_0x6ed8f9){try{const _0x5365d0=a144_0x1c94f0(_0x6ed8f9);return _0x5365d0&&typeof _0x5365d0==='object'&&!Array['isArray'](_0x5365d0)?_0x5365d0:undefined;}catch{return undefined;}}function a144_0x4050(){const _0x3a505b=['Skill\x20directory\x20not\x20found:\x20','replace','230560WlcjKc','(unknown)','Missing\x20','isDirectory','targetScope','1881276uPnVSr','personal','209vrTayh','builtin','length','1885338KcNBWW','skillCode','isFile','files','content','packageBase64','263830hXHsQH','isSymbolicLink','Skill\x20metadata\x20appCode\x20\x22','\x20has\x20scope=\x22','path',',\x20or\x20directory\x20name.','isArray','skillName','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','pushedAt','string','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','ignoreInvalidMetadata','name','315XmgAYz','find','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','slice','appCode','unknown','28aXRFts','startsWith','\x20has\x20unsupported\x20scope\x20\x22','refreshedAt','41068qXKHvc','scope','Remote\x20Skill\x20','number','description','match','validation','manifest','259878UeTtqP','2056232FkJfof','6aadzFR','some','example','version','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','displayName','sourceSessionId','dir','ignoreMetadataScope','ignoreMetadataAppCodeMismatch','155TlAZrA','toLowerCase','ignoreMetadataForPayload','trim','tags','excludedFilePaths','utf8'];a144_0x4050=function(){return _0x3a505b;};return a144_0x4050();}function scalarToString(_0x192d52){const _0x18e96f=a144_0x3e79;if(typeof _0x192d52===_0x18e96f(0x77))return _0x192d52[_0x18e96f(0x9c)]();if(typeof _0x192d52===_0x18e96f(0x88)||typeof _0x192d52==='boolean')return String(_0x192d52);return undefined;}function resolvePushDirectoryRoot(_0x3031f4){const _0x5840b5=a144_0x3e79,_0x5a80d8=resolve(_0x3031f4);if(!existsSync(_0x5a80d8))throw CliErrors[_0x5840b5(0x8b)](_0x5840b5(0xa0)+_0x3031f4);const _0x2b5cdd=lstatSync(_0x5a80d8);if(_0x2b5cdd['isDirectory']())return _0x5a80d8;if(_0x2b5cdd[_0x5840b5(0xb3)]()){const _0x45195c=realpathSync(_0x5a80d8);if(lstatSync(_0x45195c)[_0x5840b5(0xa5)]())return _0x45195c;}throw CliErrors[_0x5840b5(0x8b)](_0x5840b5(0xa0)+_0x3031f4);}function requireRemoteScope(_0x54a376){const _0x464db6=a144_0x3e79;if(_0x54a376[_0x464db6(0x86)]===_0x464db6(0xa8)||_0x54a376['scope']==='company'||_0x54a376['scope']===_0x464db6(0xaa))return _0x54a376['scope'];throw CliErrors[_0x464db6(0x8b)](_0x464db6(0x87)+(_0x54a376['skillCode']||_0x464db6(0xa3))+_0x464db6(0x83)+(_0x54a376['scope']??_0x464db6(0x80))+'\x22.');}function readLocalSkillContent(_0x42b85a){const _0x5ef608=a144_0x3e79,_0x2a948f=resolve(_0x42b85a,SKILL_FILE);return existsSync(_0x2a948f)&&lstatSync(_0x2a948f)[_0x5ef608(0xae)]()?readFileSync(_0x2a948f,_0x5ef608(0x9f)):'';}function readPushMetadataIfPresent(_0x35367f,_0x57266f={}){try{return readMetadataIfPresent(_0x35367f);}catch(_0x227c1d){if(_0x57266f['ignoreInvalidMetadata'])return undefined;throw _0x227c1d;}}
|
|
1
|
+
(function(_0x3a7a24,_0x3cc9f2){const _0x1a7b5f=a144_0x24f2,_0x5041bc=_0x3a7a24();while(!![]){try{const _0x124740=parseInt(_0x1a7b5f(0xec))/0x1*(parseInt(_0x1a7b5f(0xf3))/0x2)+parseInt(_0x1a7b5f(0xfb))/0x3+-parseInt(_0x1a7b5f(0x121))/0x4*(-parseInt(_0x1a7b5f(0x104))/0x5)+parseInt(_0x1a7b5f(0x11c))/0x6+-parseInt(_0x1a7b5f(0x109))/0x7*(-parseInt(_0x1a7b5f(0xf0))/0x8)+parseInt(_0x1a7b5f(0x100))/0x9+parseInt(_0x1a7b5f(0xff))/0xa*(-parseInt(_0x1a7b5f(0x113))/0xb);if(_0x124740===_0x3cc9f2)break;else _0x5041bc['push'](_0x5041bc['shift']());}catch(_0x5f318b){_0x5041bc['push'](_0x5041bc['shift']());}}}(a144_0x5ca8,0xbc375));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a144_0xc7253d}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';export function resolvePushDirectoryIdentity(_0x1b6231,_0x4f4af7,_0x31851d={}){const _0x39363f=a144_0x24f2,_0x40f496=resolvePushDirectoryRoot(_0x1b6231),_0x18758e=readPushMetadataIfPresent(resolve(_0x40f496,METADATA_FILE),{'ignoreInvalidMetadata':_0x31851d['ignoreInvalidMetadata']});if(_0x18758e?.[_0x39363f(0xf7)]&&_0x18758e[_0x39363f(0xf7)]!==_0x4f4af7&&!_0x31851d['allowAppCodeRetarget']&&!_0x31851d[_0x39363f(0x120)])throw CliErrors[_0x39363f(0x114)](_0x39363f(0x116)+_0x18758e[_0x39363f(0xf7)]+'\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22'+_0x4f4af7+'\x22.');const _0x174c48=resolvePushSkillCode(_0x40f496,_0x4f4af7,_0x18758e,_0x31851d);if(!_0x174c48)throw CliErrors[_0x39363f(0x114)](_0x39363f(0xef)+SKILL_FILE+',\x20'+METADATA_FILE+_0x39363f(0x126));return{'dir':_0x40f496,'skillCode':_0x174c48,'metadata':_0x18758e};}export function readPushDirectory(_0x47ddc4,_0x157d21,_0x4daa6c={}){const _0x1582cf=a144_0x24f2,_0x18ef50=resolvePushDirectoryIdentity(_0x47ddc4,_0x157d21,_0x4daa6c),_0x5f2ea2=_0x18ef50['dir'],_0x4019fd=resolve(_0x5f2ea2,SKILL_FILE);if(!existsSync(_0x4019fd)||!lstatSync(_0x4019fd)[_0x1582cf(0x111)]())throw CliErrors['validation']('Missing\x20'+SKILL_FILE+':\x20'+_0x4019fd);const _0x46b496=_0x18ef50[_0x1582cf(0xf2)],_0x548067=_0x4daa6c[_0x1582cf(0xf5)]??_0x1582cf(0x110);if(!_0x4daa6c[_0x1582cf(0x102)]&&_0x46b496?.[_0x1582cf(0x127)]===_0x1582cf(0xed))throw CliErrors[_0x1582cf(0x114)]('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+'\x20has\x20scope=\x22'+_0x46b496['scope']+'\x22.');if(!_0x4daa6c[_0x1582cf(0x102)]&&_0x548067===_0x1582cf(0x110)&&_0x46b496?.['scope']&&_0x46b496[_0x1582cf(0x127)]!=='personal')throw CliErrors[_0x1582cf(0x114)]('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x1582cf(0xf8)+_0x46b496[_0x1582cf(0x127)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x5f2ea2+_0x1582cf(0x108));const _0x76b668=scanSkillDirectory(_0x5f2ea2,{'excludedFilePaths':_0x4daa6c['excludedFilePaths']}),_0x188789=buildSkillPackage(_0x76b668),_0x2ea4fd=readFileSync(_0x4019fd,'utf8'),_0x28b960=_0x18ef50[_0x1582cf(0x10f)],_0x3cbe3c=_0x4daa6c[_0x1582cf(0xf1)]?undefined:_0x46b496,_0x2862e4=readSkillDisplayName(_0x2ea4fd);return{'skillCode':_0x28b960,'metadata':_0x46b496,'frontmatterDisplayName':_0x2862e4,'input':{'skillCode':_0x28b960,'skillName':_0x2862e4??_0x3cbe3c?.[_0x1582cf(0x10c)],'description':_0x3cbe3c?.['description'],'content':_0x2ea4fd,'files':_0x188789[_0x1582cf(0x105)],'packageBase64':_0x188789[_0x1582cf(0x12a)],'tags':_0x3cbe3c?.[_0x1582cf(0x119)],'version':_0x3cbe3c?.['version'],'sourceSessionId':_0x3cbe3c?.[_0x1582cf(0x10d)]}};}function a144_0x24f2(_0x5e663b,_0x4c4cd9){_0x5e663b=_0x5e663b-0xec;const _0x5ca8ec=a144_0x5ca8();let _0x24f252=_0x5ca8ec[_0x5e663b];return _0x24f252;}export function refreshPushDirectoryMetadataFromRemote(_0x3892c5,_0x47cb13,_0x4a6fae,_0x2c14e6={}){const _0x4add75=a144_0x24f2,_0x1fd16c=resolvePushDirectoryRoot(_0x3892c5),_0x4b97f1=readPushMetadataIfPresent(resolve(_0x1fd16c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x329b59=requireRemoteScope(_0x47cb13),_0x181834=readLocalSkillContent(_0x1fd16c),_0x4e3531={..._0x47cb13,'appCode':_0x47cb13[_0x4add75(0xf7)]??_0x4a6fae,'skillName':_0x47cb13[_0x4add75(0x10c)]??_0x4b97f1?.[_0x4add75(0x10c)],'description':_0x47cb13[_0x4add75(0x11d)]??_0x4b97f1?.['description'],'example':_0x47cb13[_0x4add75(0xfa)]??_0x4b97f1?.['example'],'tags':Array[_0x4add75(0x10e)](_0x47cb13[_0x4add75(0x119)])?_0x47cb13['tags']:_0x4b97f1?.[_0x4add75(0x119)],'sourceSessionId':_0x47cb13['sourceSessionId']??_0x4b97f1?.['sourceSessionId'],'content':_0x47cb13['content']??_0x181834},_0x213a33=buildMetadata(_0x4e3531,_0x329b59,_0x4a6fae,contentHash(_0x181834),_0x2c14e6[_0x4add75(0x118)]);writeJsonAtomic(resolve(_0x1fd16c,METADATA_FILE),_0x213a33);}export function recordPushedRuntimeSkill(_0x201934,_0x8ef0fd,_0x5570c2,_0x1169f9={}){const _0x2f8785=a144_0x24f2,_0x5e661b=resolvePushDirectoryRoot(_0x201934),_0x13649d=scanSkillDirectory(_0x5e661b),_0x5e9048=_0x13649d[_0x2f8785(0xf4)](_0x3654c0=>_0x3654c0[_0x2f8785(0x101)]===SKILL_FILE),_0x1140a5=_0x5e9048?fileText(_0x5e9048):'',_0x2a5693=tryNormalizePackageManifest(_0x8ef0fd[_0x2f8785(0x107)]),_0x22569d={..._0x8ef0fd,'content':_0x8ef0fd[_0x2f8785(0x11b)]??_0x1140a5,'files':_0x2a5693},_0x226463=_0x2a5693?normalizeLocalFiles(_0x13649d)[_0x2f8785(0x124)](_0x3fcc59=>_0x2a5693[_0x2f8785(0x107)][_0x2f8785(0x11e)](_0x22163b=>_0x22163b['path']===_0x3fcc59[_0x2f8785(0x101)])):undefined,_0x3ffc0c=buildMetadata(_0x22569d,_0x1169f9[_0x2f8785(0x127)]??_0x2f8785(0x110),_0x5570c2,contentHash(_0x22569d[_0x2f8785(0x11b)]??''),_0x1169f9['pushedAt'],_0x226463);writeJsonAtomic(resolve(_0x5e661b,METADATA_FILE),_0x3ffc0c);}export function deriveSkillCodeFromDirectory(_0x5c3286,_0x40f600){const _0xb9ac2c=a144_0x24f2,_0x369b31=basename(resolve(_0x5c3286)),_0x4cb5d3=_0x40f600+'--';return _0x369b31['startsWith'](_0x4cb5d3)?_0x369b31[_0xb9ac2c(0x11f)](_0x4cb5d3['length']):_0x369b31;}function resolvePushSkillCode(_0x245857,_0x1e184a,_0x298d4c,_0x4b4519){const _0x90e980=a144_0x24f2,_0x408ad8=deriveSkillCodeFromSkillFile(_0x245857)||deriveSkillCodeFromDirectory(_0x245857,_0x1e184a);if(_0x4b4519[_0x90e980(0xf6)])return _0x408ad8;return _0x298d4c?.[_0x90e980(0x10f)]?.[_0x90e980(0x115)]()||_0x408ad8;}function deriveSkillCodeFromSkillFile(_0x3d6d0e){const _0xc6c305=a144_0x24f2,_0x464d9c=resolve(_0x3d6d0e,SKILL_FILE);if(!existsSync(_0x464d9c)||!lstatSync(_0x464d9c)['isFile']())return undefined;const _0x3b8437=readFileSync(_0x464d9c,_0xc6c305(0x10a)),_0xf806eb=_0x3b8437[_0xc6c305(0xf9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0xf806eb)return undefined;const _0x3294f3=parseFrontmatterObject(_0xf806eb[0x1]??''),_0x1d238c=scalarToString(_0x3294f3?.[_0xc6c305(0x125)]);return _0x1d238c?slugifySkillName(_0x1d238c):undefined;}function readSkillDisplayName(_0x2ec07d){const _0x59302e=a144_0x24f2,_0x189a58=_0x2ec07d[_0x59302e(0xf9)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x189a58)return undefined;const _0x187a5e=parseFrontmatterObject(_0x189a58[0x1]??'');return scalarToString(_0x187a5e?.['displayName']);}function slugifySkillName(_0x2df6d4){const _0x3518d8=a144_0x24f2,_0x2dbf78=_0x2df6d4[_0x3518d8(0x115)]()['toLowerCase']()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x3518d8(0x10b)](/^-+/,'')[_0x3518d8(0x10b)](/-+$/,'')['replace'](/-{2,}/g,'-');if(!_0x2dbf78)throw CliErrors[_0x3518d8(0x114)]('Invalid\x20'+SKILL_FILE+_0x3518d8(0x106));return _0x2dbf78;}function parseFrontmatterObject(_0x204b33){const _0x3cc426=a144_0x24f2;try{const _0x3d6314=a144_0xc7253d(_0x204b33);return _0x3d6314&&typeof _0x3d6314===_0x3cc426(0x123)&&!Array[_0x3cc426(0x10e)](_0x3d6314)?_0x3d6314:undefined;}catch{return undefined;}}function a144_0x5ca8(){const _0x349115=['example','1148994WeGeAR','isDirectory','company','number','1004250nXBUjt','2585952PmALwx','path','ignoreMetadataScope','ignoreInvalidMetadata','5ULkXOK','manifest','\x20name\x20for\x20SkillHub\x20slug\x20generation.','files','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','49oafMGl','utf8','replace','skillName','sourceSessionId','isArray','skillCode','personal','isFile','boolean','330wkfnBN','validation','trim','Skill\x20metadata\x20appCode\x20\x22','\x20has\x20unsupported\x20scope\x20\x22','refreshedAt','tags','isSymbolicLink','content','3358542roJjrn','description','some','slice','ignoreMetadataAppCodeMismatch','962860ItEWwg','Skill\x20directory\x20not\x20found:\x20','object','filter','name',',\x20or\x20directory\x20name.','scope','Remote\x20Skill\x20','unknown','packageBase64','string','31JhvncC','builtin','(unknown)','Unable\x20to\x20resolve\x20skillCode\x20from\x20','1374848FREVtk','ignoreMetadataForPayload','metadata','71606pBbVtX','find','targetScope','ignoreMetadataSkillCode','appCode','\x20has\x20scope=\x22','match'];a144_0x5ca8=function(){return _0x349115;};return a144_0x5ca8();}function scalarToString(_0x478cab){const _0x8a23d4=a144_0x24f2;if(typeof _0x478cab===_0x8a23d4(0x12b))return _0x478cab[_0x8a23d4(0x115)]();if(typeof _0x478cab===_0x8a23d4(0xfe)||typeof _0x478cab===_0x8a23d4(0x112))return String(_0x478cab);return undefined;}function resolvePushDirectoryRoot(_0x280b8f){const _0x268b70=a144_0x24f2,_0x36d941=resolve(_0x280b8f);if(!existsSync(_0x36d941))throw CliErrors['validation'](_0x268b70(0x122)+_0x280b8f);const _0xd9a4d2=lstatSync(_0x36d941);if(_0xd9a4d2['isDirectory']())return _0x36d941;if(_0xd9a4d2[_0x268b70(0x11a)]()){const _0x523b66=realpathSync(_0x36d941);if(lstatSync(_0x523b66)[_0x268b70(0xfc)]())return _0x523b66;}throw CliErrors[_0x268b70(0x114)]('Skill\x20directory\x20not\x20found:\x20'+_0x280b8f);}function requireRemoteScope(_0x8bdf50){const _0x9f221a=a144_0x24f2;if(_0x8bdf50[_0x9f221a(0x127)]===_0x9f221a(0x110)||_0x8bdf50[_0x9f221a(0x127)]===_0x9f221a(0xfd)||_0x8bdf50['scope']===_0x9f221a(0xed))return _0x8bdf50[_0x9f221a(0x127)];throw CliErrors[_0x9f221a(0x114)](_0x9f221a(0x128)+(_0x8bdf50['skillCode']||_0x9f221a(0xee))+_0x9f221a(0x117)+(_0x8bdf50[_0x9f221a(0x127)]??_0x9f221a(0x129))+'\x22.');}function readLocalSkillContent(_0x270de3){const _0x554d38=a144_0x24f2,_0x1d9cce=resolve(_0x270de3,SKILL_FILE);return existsSync(_0x1d9cce)&&lstatSync(_0x1d9cce)['isFile']()?readFileSync(_0x1d9cce,_0x554d38(0x10a)):'';}function readPushMetadataIfPresent(_0x8d8047,_0x2f7447={}){const _0x44dfcc=a144_0x24f2;try{return readMetadataIfPresent(_0x8d8047);}catch(_0x66c5a1){if(_0x2f7447[_0x44dfcc(0x103)])return undefined;throw _0x66c5a1;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x22ffcb,_0x169a26){const _0x56e99d=a145_0x2b8b,_0x4e354e=_0x22ffcb();while(!![]){try{const _0x1a3cab=-parseInt(_0x56e99d(0x1ef))/0x1+parseInt(_0x56e99d(0x1e9))/0x2+parseInt(_0x56e99d(0x1f2))/0x3+-parseInt(_0x56e99d(0x1e8))/0x4*(-parseInt(_0x56e99d(0x1e6))/0x5)+-parseInt(_0x56e99d(0x1e7))/0x6*(-parseInt(_0x56e99d(0x1f1))/0x7)+parseInt(_0x56e99d(0x1ea))/0x8+parseInt(_0x56e99d(0x1f0))/0x9*(-parseInt(_0x56e99d(0x1f3))/0xa);if(_0x1a3cab===_0x169a26)break;else _0x4e354e['push'](_0x4e354e['shift']());}catch(_0x4486e8){_0x4e354e['push'](_0x4e354e['shift']());}}}(a145_0x21f3,0xeecf6));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x4eaf5f){const _0x7477a3=a145_0x2b8b,_0x45ec8c=_0x4eaf5f&&_0x4eaf5f['length']>0x0?_0x4eaf5f:[_0x7477a3(0x1ee),'company','builtin'],_0x50b382=[];for(const _0x3c2776 of _0x45ec8c){if(!isRuntimeSkillScope(_0x3c2776))throw CliErrors['validation'](_0x7477a3(0x1eb)+_0x3c2776);!_0x50b382['includes'](_0x3c2776)&&_0x50b382[_0x7477a3(0x1ec)](_0x3c2776);}return _0x50b382;}export function isRuntimeSkillScope(_0x17257f){const _0x5b84cc=a145_0x2b8b;return _0x17257f===_0x5b84cc(0x1ee)||_0x17257f===_0x5b84cc(0x1ed)||_0x17257f==='builtin';}function a145_0x2b8b(_0x59a6c0,_0x526635){_0x59a6c0=_0x59a6c0-0x1e6;const _0x21f334=a145_0x21f3();let _0x2b8bab=_0x21f334[_0x59a6c0];return _0x2b8bab;}function a145_0x21f3(){const _0x138a79=['282298XxGHib','1359jxciDf','35jVysbj','4708866LEaEnT','268690BVvLDI','5ALbxMd','855534qvzKVu','188616tcumjh','2354762Muasmi','14484648dmpcBC','Unsupported\x20runtime\x20Skill\x20scope:\x20','push','company','personal'];a145_0x21f3=function(){return _0x138a79;};return a145_0x21f3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x8c80e4,_0x1f8642){const _0x22b435=a147_0x73b1,_0x364294=_0x8c80e4();while(!![]){try{const _0x33ff45=-parseInt(_0x22b435(0x96))/0x1*(parseInt(_0x22b435(0x94))/0x2)+parseInt(_0x22b435(0x89))/0x3*(-parseInt(_0x22b435(0x9b))/0x4)+parseInt(_0x22b435(0x91))/0x5*(-parseInt(_0x22b435(0x8f))/0x6)+-parseInt(_0x22b435(0x8e))/0x7*(-parseInt(_0x22b435(0x8c))/0x8)+-parseInt(_0x22b435(0x97))/0x9+parseInt(_0x22b435(0x93))/0xa+parseInt(_0x22b435(0x90))/0xb;if(_0x33ff45===_0x1f8642)break;else _0x364294['push'](_0x364294['shift']());}catch(_0x51c307){_0x364294['push'](_0x364294['shift']());}}}(a147_0x792a,0xc5160));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a147_0x792a(){const _0x19524b=['23888QcjiOs','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20','581KLUgVE','245910yKAAOr','56504580XWegSI','170KLkLLF','object','617810UKKgGQ','615034AuEcuO','sort','5ANYOqS','4878360UZPZKq','name','validation','code','26960NuIotL','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','length','519WSRQGi','validation_error','path'];a147_0x792a=function(){return _0x19524b;};return a147_0x792a();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';function a147_0x73b1(_0x361ce9,_0x3e5dce){_0x361ce9=_0x361ce9-0x88;const _0x792a07=a147_0x792a();let _0x73b1c0=_0x792a07[_0x361ce9];return _0x73b1c0;}const ZIP_MTIME=new Date('1980-01-01T00:00:00.000Z');export function createDeterministicZipPackage(_0xf2e185){const _0x192281=a147_0x73b1,_0x6c9ee1={};for(const _0xa3c5e1 of normalizeLocalFiles(_0xf2e185)){_0x6c9ee1[_0xa3c5e1[_0x192281(0x8b)]]=fileContent(_0xa3c5e1);}return Buffer['from'](zipSync(_0x6c9ee1,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x57724f){const _0x55e66d=a147_0x73b1;if(_0x57724f[_0x55e66d(0x88)]<0x16)throw CliErrors[_0x55e66d(0x99)](_0x55e66d(0x9c));let _0x36a1e1;try{_0x36a1e1=unzipSync(_0x57724f,{'filter'(_0x18fad7){const _0x21164c=_0x55e66d,_0x4a4efd=normalizeSkillRelativePath(_0x18fad7[_0x21164c(0x98)]);if(_0x4a4efd['endsWith']('/'))throw CliErrors[_0x21164c(0x99)](_0x21164c(0x8d)+_0x4a4efd);return!![];}});}catch(_0x25c0cf){if(isRuntimeSkillValidationError(_0x25c0cf))throw _0x25c0cf;throw CliErrors[_0x55e66d(0x99)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');}return Object['entries'](_0x36a1e1)['map'](([_0x3dbd13,_0x22eefc])=>({'path':normalizeSkillRelativePath(_0x3dbd13),'bytes':Buffer['from'](_0x22eefc)}))[_0x55e66d(0x95)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x5bc2b0){const _0x57a8e0=a147_0x73b1;return typeof _0x5bc2b0===_0x57a8e0(0x92)&&_0x5bc2b0!==null&&_0x57a8e0(0x9a)in _0x5bc2b0&&_0x5bc2b0['code']===_0x57a8e0(0x8a);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbb95e6,_0x3b902b){const _0x5d77ef=a148_0x24e7,_0x21a741=_0xbb95e6();while(!![]){try{const _0xdc4128=parseInt(_0x5d77ef(0x1ab))/0x1+parseInt(_0x5d77ef(0x1ac))/0x2*(-parseInt(_0x5d77ef(0x1ae))/0x3)+parseInt(_0x5d77ef(0x1cf))/0x4*(parseInt(_0x5d77ef(0x1c0))/0x5)+parseInt(_0x5d77ef(0x1d0))/0x6*(-parseInt(_0x5d77ef(0x1b7))/0x7)+-parseInt(_0x5d77ef(0x1b0))/0x8*(parseInt(_0x5d77ef(0x1ca))/0x9)+-parseInt(_0x5d77ef(0x1be))/0xa*(parseInt(_0x5d77ef(0x1b9))/0xb)+parseInt(_0x5d77ef(0x1b1))/0xc;if(_0xdc4128===_0x3b902b)break;else _0x21a741['push'](_0x21a741['shift']());}catch(_0x5aefaa){_0x21a741['push'](_0x21a741['shift']());}}}(a148_0x39b7,0xc4eba));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';function a148_0x24e7(_0x2dbbb0,_0x10aaf6){_0x2dbbb0=_0x2dbbb0-0x1aa;const _0x39b730=a148_0x39b7();let _0x24e7a3=_0x39b730[_0x2dbbb0];return _0x24e7a3;}export function buildSkillPackage(_0x36934a){const _0x48f0ff=a148_0x24e7,_0x78efd3=normalizeLocalFiles(_0x36934a);if(!_0x78efd3[_0x48f0ff(0x1c3)](_0x201e9f=>_0x201e9f[_0x48f0ff(0x1b5)]===SKILL_FILE))throw CliErrors['validation']('Missing\x20'+SKILL_FILE+'\x20in\x20Skill\x20file\x20package.');const _0x578994=localFilesToManifestFiles(_0x78efd3),_0x1225a3=createDeterministicZipPackage(_0x78efd3);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x578994),'zipSha256':bufferSha256(_0x1225a3),'zipSize':_0x1225a3[_0x48f0ff(0x1b8)],'files':_0x578994},'packageBytes':_0x1225a3,'packageBase64':_0x1225a3[_0x48f0ff(0x1c9)](_0x48f0ff(0x1d2))};}export function verifyRuntimeSkillPackage(_0x2c8458,_0x4bc1b9){const _0x129d6b=a148_0x24e7,_0x558f66=normalizePackageManifest(_0x2c8458,{'requireOssPath':![]});if(!_0x558f66)throw CliErrors[_0x129d6b(0x1aa)](_0x129d6b(0x1d4));return extractAndVerifyPackage(_0x558f66,_0x4bc1b9);}export function verifyRuntimeSkillBundle(_0x2c820c,_0x500a4f){const _0x19b4a5=a148_0x24e7,_0x923aea=normalizePackageManifest(_0x2c820c,{'requireOssPath':![]});if(!_0x923aea)throw CliErrors[_0x19b4a5(0x1aa)](_0x19b4a5(0x1d4));return extractAndVerifyPackageFiles(_0x923aea,_0x500a4f);}export function tryNormalizePackageManifest(_0xb963ee){return normalizePackageManifest(_0xb963ee,{'requireOssPath':![]});}export function requirePackageBytes(_0x2b4e85,_0x1c08d4){const _0x1477d4=a148_0x24e7;if(!_0x1c08d4||_0x1c08d4['length']===0x0)throw CliErrors[_0x1477d4(0x1aa)]('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x2b4e85);return _0x1c08d4;}export function extractDownloadedPackage(_0xd5d2d8){const _0x4f4821=a148_0x24e7,_0x247fd4=parseZipPackage(_0xd5d2d8)[_0x4f4821(0x1c6)](_0x410540=>({'path':_0x410540[_0x4f4821(0x1b5)],'bytes':_0x410540[_0x4f4821(0x1cc)]}));if(!_0x247fd4[_0x4f4821(0x1c3)](_0x508629=>_0x508629[_0x4f4821(0x1b5)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20'+SKILL_FILE+'.');return normalizeLocalFiles(_0x247fd4);}function a148_0x39b7(){const _0x35dda3=['1289580QMZNAC','10UEJAjC','has','913431LqRDbT','schemaVersion','84408SefimL','40921920pYVrqj','zipSha256','files','Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','path','object','3913623MJeohF','length','22OpIsjT','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','requireOssPath','Duplicate\x20Skill\x20package\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','3601970TScKRU','isSafeInteger','1465QGWQpa','treeSha256','toLowerCase','some','trim','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','map','Runtime\x20Skill\x20package\x20size\x20mismatch.','zipSize','toString','1341HliZbe','get','bytes','ossPath','string','6564kfMZCT','6kKEhec','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','base64','set','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','validation'];a148_0x39b7=function(){return _0x35dda3;};return a148_0x39b7();}export function localFilesToManifestFiles(_0x145738){const _0x324bb3=a148_0x24e7;return normalizeLocalFiles(_0x145738)[_0x324bb3(0x1c6)](_0x190694=>({'path':_0x190694['path'],'sha256':fileHash(_0x190694),'size':fileContent(_0x190694)[_0x324bb3(0x1b8)]}));}function normalizePackageManifest(_0x388ee4,_0x19f1bc){const _0x50f2f9=a148_0x24e7;if(!_0x388ee4||typeof _0x388ee4!==_0x50f2f9(0x1b6)||Array['isArray'](_0x388ee4))return undefined;const _0x5a4c5e=_0x388ee4,_0x2cd181=typeof _0x5a4c5e[_0x50f2f9(0x1cd)]===_0x50f2f9(0x1ce)?_0x5a4c5e[_0x50f2f9(0x1cd)][_0x50f2f9(0x1c4)]():undefined;if(_0x19f1bc[_0x50f2f9(0x1bb)]&&!_0x2cd181)return undefined;if(!Array['isArray'](_0x5a4c5e[_0x50f2f9(0x1b3)])||_0x5a4c5e[_0x50f2f9(0x1b3)]['length']===0x0)return undefined;if(!isSha256Hex(_0x5a4c5e['treeSha256']))throw CliErrors['validation'](_0x50f2f9(0x1ba));if(!isSha256Hex(_0x5a4c5e[_0x50f2f9(0x1b2)]))throw CliErrors['validation'](_0x50f2f9(0x1bd));if(!Number[_0x50f2f9(0x1bf)](_0x5a4c5e[_0x50f2f9(0x1c8)])||_0x5a4c5e['zipSize']<0x0)throw CliErrors['validation'](_0x50f2f9(0x1c5));const _0x477ba9=normalizeManifestFiles(_0x5a4c5e[_0x50f2f9(0x1b3)]);if(!_0x477ba9[_0x50f2f9(0x1c3)](_0x25699a=>_0x25699a[_0x50f2f9(0x1b5)]===SKILL_FILE))throw CliErrors[_0x50f2f9(0x1aa)]('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x341117=fileTreeHash(_0x477ba9);if(_0x341117!==_0x5a4c5e[_0x50f2f9(0x1c1)][_0x50f2f9(0x1c2)]())throw CliErrors['validation']('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number[_0x50f2f9(0x1bf)](_0x5a4c5e[_0x50f2f9(0x1af)])?_0x5a4c5e[_0x50f2f9(0x1af)]:0x2,'ossPath':_0x2cd181,'treeSha256':_0x341117,'zipSha256':_0x5a4c5e[_0x50f2f9(0x1b2)][_0x50f2f9(0x1c2)](),'zipSize':_0x5a4c5e['zipSize'],'files':_0x477ba9};}function extractAndVerifyPackage(_0x2f9012,_0x4f21ee){const _0x22f9e8=a148_0x24e7,_0x990d0d=normalizePackageManifest(_0x2f9012,{'requireOssPath':![]});if(!_0x990d0d)throw CliErrors[_0x22f9e8(0x1aa)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x4f21ee[_0x22f9e8(0x1b8)]!==_0x990d0d['zipSize'])throw CliErrors[_0x22f9e8(0x1aa)](_0x22f9e8(0x1c7));const _0x38976d=bufferSha256(_0x4f21ee);if(_0x38976d!==_0x990d0d['zipSha256'])throw CliErrors[_0x22f9e8(0x1aa)]('Runtime\x20Skill\x20package\x20sha256\x20mismatch.');return extractAndVerifyPackageFiles(_0x990d0d,_0x4f21ee);}function extractAndVerifyPackageFiles(_0x3aee29,_0x34c875){const _0x48bc89=a148_0x24e7,_0x3151de=parseZipPackage(_0x34c875);if(_0x3151de[_0x48bc89(0x1b8)]!==_0x3aee29[_0x48bc89(0x1b3)]['length'])throw CliErrors[_0x48bc89(0x1aa)]('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x351837=new Map();for(const _0x5dff24 of _0x3151de){if(_0x351837[_0x48bc89(0x1ad)](_0x5dff24[_0x48bc89(0x1b5)]))throw CliErrors[_0x48bc89(0x1aa)](_0x48bc89(0x1bc)+_0x5dff24[_0x48bc89(0x1b5)]);_0x351837[_0x48bc89(0x1d3)](_0x5dff24[_0x48bc89(0x1b5)],_0x5dff24);}const _0xef56f1=[];for(const _0x42f3f5 of _0x3aee29[_0x48bc89(0x1b3)]){const _0x5bff27=_0x351837[_0x48bc89(0x1cb)](_0x42f3f5[_0x48bc89(0x1b5)]);if(!_0x5bff27)throw CliErrors[_0x48bc89(0x1aa)]('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x42f3f5[_0x48bc89(0x1b5)]);if(_0x5bff27[_0x48bc89(0x1cc)][_0x48bc89(0x1b8)]!==_0x42f3f5['size'])throw CliErrors[_0x48bc89(0x1aa)](_0x48bc89(0x1b4)+_0x42f3f5['path']);const _0xd4361=bufferSha256(_0x5bff27[_0x48bc89(0x1cc)]);if(_0xd4361!==_0x42f3f5['sha256'])throw CliErrors[_0x48bc89(0x1aa)](_0x48bc89(0x1d1)+_0x42f3f5['path']);_0xef56f1['push']({'path':_0x42f3f5[_0x48bc89(0x1b5)],'bytes':_0x5bff27[_0x48bc89(0x1cc)]});}return normalizeLocalFiles(_0xef56f1);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x153acf,_0x2fa787){var _0x12673a=a149_0x42a3,_0x364a59=_0x153acf();while(!![]){try{var _0x2a193d=-parseInt(_0x12673a(0x14b))/0x1+parseInt(_0x12673a(0x14a))/0x2*(parseInt(_0x12673a(0x144))/0x3)+parseInt(_0x12673a(0x147))/0x4+parseInt(_0x12673a(0x149))/0x5*(-parseInt(_0x12673a(0x148))/0x6)+-parseInt(_0x12673a(0x146))/0x7+-parseInt(_0x12673a(0x145))/0x8*(parseInt(_0x12673a(0x14d))/0x9)+-parseInt(_0x12673a(0x14e))/0xa*(-parseInt(_0x12673a(0x14c))/0xb);if(_0x2a193d===_0x2fa787)break;else _0x364a59['push'](_0x364a59['shift']());}catch(_0x98f938){_0x364a59['push'](_0x364a59['shift']());}}}(a149_0x25bc,0x1903e));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a149_0x25bc(){var _0x5ebdd8=['36sRcHjU','23570teVhVr','142011DXjfvj','151264hDNSrJ','461797buTXQc','806200hJAQgX','90QUTlyM','9505jdEZDr','4jSIlsy','30715HnZGrT','33OrtJgo'];a149_0x25bc=function(){return _0x5ebdd8;};return a149_0x25bc();}export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';export{materializeRuntimeSkill,reuseMaterializedRuntimeSkill}from'./runtime-skill-sync/materialize.js';function a149_0x42a3(_0x5dc5e3,_0x3dcc20){_0x5dc5e3=_0x5dc5e3-0x144;var _0x25bcce=a149_0x25bc();var _0x42a358=_0x25bcce[_0x5dc5e3];return _0x42a358;}export{readMetadataIfPresent}from'./runtime-skill-sync/metadata.js';export{getRuntimeSkillCacheRoot,getRuntimeSkillDir,resolveSkillSyncPaths,runtimeAgentSkillRoots}from'./runtime-skill-sync/paths.js';export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|