@lovrabet/lovrabet-cli 2.3.0-beta.2 → 2.3.0-beta.3
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 a134_0x3d07(){const _0xcf3628=['lovrabet.skill.json','.svn','3347541AfjWwC','node_modules','SKILL.md','.hg','dist','coverage','.turbo','4521zwTVMk','.git','7VlnxgI','5390560GVnRaq','10wtvoMG','.next','1582322OIXhzP','1263237tXheti','402816ZSFdYj','4wGOZsa','32Aewdyg','5528592QnssHE','build','.DS_Store','.cache'];a134_0x3d07=function(){return _0xcf3628;};return a134_0x3d07();}function a134_0x27e9(_0x5b04a4,_0x401958){_0x5b04a4=_0x5b04a4-0x1d7;const _0x3d0732=a134_0x3d07();let _0x27e9a1=_0x3d0732[_0x5b04a4];return _0x27e9a1;}const a134_0x4662c6=a134_0x27e9;(function(_0x27bbef,_0x25091f){const _0x5d3f0c=a134_0x27e9,_0x8b7314=_0x27bbef();while(!![]){try{const _0x542376=parseInt(_0x5d3f0c(0x1e6))/0x1+-parseInt(_0x5d3f0c(0x1e4))/0x2+-parseInt(_0x5d3f0c(0x1e5))/0x3*(parseInt(_0x5d3f0c(0x1e7))/0x4)+parseInt(_0x5d3f0c(0x1e1))/0x5+parseInt(_0x5d3f0c(0x1e9))/0x6*(-parseInt(_0x5d3f0c(0x1e0))/0x7)+parseInt(_0x5d3f0c(0x1e8))/0x8*(parseInt(_0x5d3f0c(0x1d7))/0x9)+parseInt(_0x5d3f0c(0x1e2))/0xa*(parseInt(_0x5d3f0c(0x1de))/0xb);if(_0x542376===_0x25091f)break;else _0x8b7314['push'](_0x8b7314['shift']());}catch(_0x30ae9a){_0x8b7314['push'](_0x8b7314['shift']());}}}(a134_0x3d07,0xcbf87));export const METADATA_FILE=a134_0x4662c6(0x1ed);export const SKILL_FILE=a134_0x4662c6(0x1d9);export const IGNORED_FILE_NAMES=new Set([METADATA_FILE,a134_0x4662c6(0x1eb)]);export const IGNORED_DIR_NAMES=new Set([a134_0x4662c6(0x1df),a134_0x4662c6(0x1da),a134_0x4662c6(0x1ee),a134_0x4662c6(0x1d8),a134_0x4662c6(0x1e3),a134_0x4662c6(0x1db),a134_0x4662c6(0x1ea),a134_0x4662c6(0x1dc),a134_0x4662c6(0x1dd),a134_0x4662c6(0x1ec)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x139931,_0x356071){const _0x595782=a135_0x5459,_0x258c69=_0x139931();while(!![]){try{const _0x575b30=-parseInt(_0x595782(0x1fa))/0x1+-parseInt(_0x595782(0x1ff))/0x2*(parseInt(_0x595782(0x1fb))/0x3)+-parseInt(_0x595782(0x1f2))/0x4*(-parseInt(_0x595782(0x1f1))/0x5)+-parseInt(_0x595782(0x1fc))/0x6+-parseInt(_0x595782(0x1f3))/0x7*(parseInt(_0x595782(0x1f8))/0x8)+parseInt(_0x595782(0x1fd))/0x9*(-parseInt(_0x595782(0x203))/0xa)+parseInt(_0x595782(0x1f0))/0xb;if(_0x575b30===_0x356071)break;else _0x258c69['push'](_0x258c69['shift']());}catch(_0x3df783){_0x258c69['push'](_0x258c69['shift']());}}}(a135_0x1a3c,0x6f6f0));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(_0x4d0f20,_0x50fcd6){const _0x434c71=a135_0x5459,_0x2efb7e=normalizeSkillRelativePath(_0x50fcd6),_0x2193fa=realOrResolved(_0x4d0f20),_0x414570=resolve(_0x2193fa,..._0x2efb7e[_0x434c71(0x1f6)]('/'));if(!isPathInside(_0x414570,_0x2193fa))throw CliErrors[_0x434c71(0x1fe)](_0x434c71(0x1f4)+_0x50fcd6);return ensureNoSymlinkInManagedPath(_0x2193fa,_0x2efb7e),_0x414570;}function a135_0x1a3c(){const _0x3e73f5=['190YzUZDg','46792XMPVmP','2961308UhQoDc','Unsafe\x20Skill\x20file\x20path:\x20','from','split','isSymbolicLink','8RLBSvH','Refusing\x20to\x20write\x20through\x20Skill\x20symlink\x20path:\x20','656440nmbVJF','3JyhdPZ','3935286ZGRkXL','5758218HVoHZf','validation','1303314YKUaAE','stringify','endsWith','startsWith','10pZVnOV','33426052NrbftG'];a135_0x1a3c=function(){return _0x3e73f5;};return a135_0x1a3c();}export function ensureNoSymlinkInManagedPath(_0x2a9a14,_0x49b1e2){const _0x57c8ef=a135_0x5459;let _0x560850=_0x2a9a14;for(const _0x5911a3 of _0x49b1e2['split']('/')){_0x560850=resolve(_0x560850,_0x5911a3);const _0x25384e=lstatIfPresent(_0x560850);if(_0x25384e?.[_0x57c8ef(0x1f7)]())throw CliErrors[_0x57c8ef(0x1fe)](_0x57c8ef(0x1f9)+_0x49b1e2);}}export function isDanglingSymlink(_0x271e1e){const _0x3a6778=a135_0x5459;try{return lstatSync(_0x271e1e)[_0x3a6778(0x1f7)]();}catch{return![];}}function a135_0x5459(_0x1eaa4e,_0x2992ea){_0x1eaa4e=_0x1eaa4e-0x1f0;const _0x1a3c45=a135_0x1a3c();let _0x545952=_0x1a3c45[_0x1eaa4e];return _0x545952;}export function resolveSymlinkTarget(_0x163efe){const _0x35e4ef=readlinkSync(_0x163efe);return isAbsolute(_0x35e4ef)?_0x35e4ef:resolve(dirname(_0x163efe),_0x35e4ef);}export function isPathInside(_0x23e70d,_0x47a29d){const _0x5dd82e=a135_0x5459,_0x5909a8=_0x23e70d[_0x5dd82e(0x201)](sep)?_0x23e70d:''+_0x23e70d+sep,_0x3db53d=_0x47a29d[_0x5dd82e(0x201)](sep)?_0x47a29d:''+_0x47a29d+sep;return _0x23e70d===_0x47a29d||_0x5909a8[_0x5dd82e(0x202)](_0x3db53d);}export function realOrResolved(_0xd5921b){try{return realpathSync(_0xd5921b);}catch{return resolve(_0xd5921b);}}export function lstatIfPresent(_0x5a90a8){try{return lstatSync(_0x5a90a8);}catch{return undefined;}}export function writeTextAtomic(_0x1042a0,_0x355335,_0x34fbbc){const _0x408dec=a135_0x5459;writeBytesAtomic(_0x1042a0,Buffer[_0x408dec(0x1f5)](_0x355335,'utf8'),_0x34fbbc);}export function writeBytesAtomic(_0x321f0a,_0x260cce,_0x362260){const _0x4976e9=_0x321f0a+'.tmp';try{writeFileSync(_0x4976e9,_0x260cce,{'mode':_0x362260}),renameSync(_0x4976e9,_0x321f0a);}catch(_0x18b1f5){try{rmSync(_0x4976e9,{'force':!![]});}catch{}throw _0x18b1f5;}}export function writeJsonAtomic(_0x5c50b8,_0x12a354){const _0x5d3cdf=a135_0x5459;writeTextAtomic(_0x5c50b8,JSON[_0x5d3cdf(0x200)](_0x12a354,null,0x2)+'\x0a',0x180);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5aab52,_0x2937e2){const _0x3fb5e3=a136_0x2a7d,_0x106bce=_0x5aab52();while(!![]){try{const _0x4bfbc3=parseInt(_0x3fb5e3(0x161))/0x1+-parseInt(_0x3fb5e3(0x15e))/0x2*(parseInt(_0x3fb5e3(0x159))/0x3)+-parseInt(_0x3fb5e3(0x15b))/0x4+parseInt(_0x3fb5e3(0x15d))/0x5+parseInt(_0x3fb5e3(0x165))/0x6*(-parseInt(_0x3fb5e3(0x157))/0x7)+parseInt(_0x3fb5e3(0x160))/0x8+-parseInt(_0x3fb5e3(0x15a))/0x9*(-parseInt(_0x3fb5e3(0x156))/0xa);if(_0x4bfbc3===_0x2937e2)break;else _0x106bce['push'](_0x106bce['shift']());}catch(_0x269330){_0x106bce['push'](_0x106bce['shift']());}}}(a136_0x4167,0x58632));function a136_0x2a7d(_0xdfb767,_0x1e25d1){_0xdfb767=_0xdfb767-0x156;const _0x41676b=a136_0x4167();let _0x2a7dab=_0x41676b[_0xdfb767];return _0x2a7dab;}import{createHash}from'node:crypto';import{fileContent,normalizeManifestFiles}from'./local-files.js';export function contentHash(_0x1260e5){const _0x218408=a136_0x2a7d;return createHash(_0x218408(0x163))['update'](_0x1260e5)[_0x218408(0x15c)](_0x218408(0x15f));}export function fileHash(_0x5c75a9){return bufferSha256(fileContent(_0x5c75a9));}export function bufferSha256(_0x210cfc){const _0x4fac7a=a136_0x2a7d;return createHash(_0x4fac7a(0x163))[_0x4fac7a(0x164)](_0x210cfc)[_0x4fac7a(0x15c)](_0x4fac7a(0x15f));}function a136_0x4167(){const _0x54e8fe=['path','sha256','update','4276542XYRHXR','149770xNjvMH','7CZQiAH','size','70878jbQScy','261LQVsSj','76796cRGMvv','digest','1176350VGokoL','16OlCknL','hex','4431112fDOlUG','59506DkdabL'];a136_0x4167=function(){return _0x54e8fe;};return a136_0x4167();}export function fileTreeHash(_0xb60a26){const _0x4058ee=a136_0x2a7d,_0x597961=createHash(_0x4058ee(0x163));for(const _0x3c3f5d of normalizeManifestFiles(_0xb60a26)){_0x597961['update'](_0x3c3f5d[_0x4058ee(0x162)]),_0x597961['update']('\x00'),_0x597961['update'](_0x3c3f5d[_0x4058ee(0x163)]),_0x597961[_0x4058ee(0x164)]('\x00'),_0x597961[_0x4058ee(0x164)](String(_0x3c3f5d[_0x4058ee(0x158)])),_0x597961[_0x4058ee(0x164)]('\x00');}return _0x597961[_0x4058ee(0x15c)](_0x4058ee(0x15f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a137_0x35e6d9=a137_0x4ae1;(function(_0x108db3,_0x43e5a7){const _0x569feb=a137_0x4ae1,_0x2c042a=_0x108db3();while(!![]){try{const _0xb7a3d5=-parseInt(_0x569feb(0x75))/0x1*(-parseInt(_0x569feb(0x70))/0x2)+-parseInt(_0x569feb(0x6b))/0x3+parseInt(_0x569feb(0x6a))/0x4+parseInt(_0x569feb(0x69))/0x5*(parseInt(_0x569feb(0x68))/0x6)+-parseInt(_0x569feb(0x73))/0x7*(parseInt(_0x569feb(0x76))/0x8)+-parseInt(_0x569feb(0x77))/0x9+parseInt(_0x569feb(0x74))/0xa;if(_0xb7a3d5===_0x43e5a7)break;else _0x2c042a['push'](_0x2c042a['shift']());}catch(_0x1db904){_0x2c042a['push'](_0x2c042a['shift']());}}}(a137_0x69e9,0xe8590));import{resolve}from'node:path';function a137_0x69e9(){const _0x13695c=['44nymxDj','4471608KKYTMC','7677450lKODQc','469578pIcXGU','30mszEqI','207432NXWgii','4857921IOLoSP','skills','cwd','appCode','freeze','40854spDnon','global','.agents','14SSFGUB','31217310mrlUpv'];a137_0x69e9=function(){return _0x13695c;};return a137_0x69e9();}function a137_0x4ae1(_0x992105,_0x15df70){_0x992105=_0x992105-0x68;const _0x69e9e8=a137_0x69e9();let _0x4ae12f=_0x69e9e8[_0x992105];return _0x4ae12f;}import{resolveSkillSyncPaths,runtimeAgentSkillRoots,safePathSegment}from'./paths.js';export function resolveRuntimeSkillInstallTarget(_0x2f8d78,_0x42c66f=a137_0x35e6d9(0x71),_0x481b99={}){const _0x34d6cb=a137_0x35e6d9,_0x58909e=resolveSkillSyncPaths(_0x481b99),_0x31b7ce=safePathSegment(_0x2f8d78,_0x34d6cb(0x6e)),_0x16de4a=_0x42c66f==='project'?[resolve(_0x481b99[_0x34d6cb(0x6d)]??process[_0x34d6cb(0x6d)](),_0x34d6cb(0x72),_0x34d6cb(0x6c))]:runtimeAgentSkillRoots(_0x58909e);return Object[_0x34d6cb(0x6f)]({'scope':_0x42c66f,'appCode':_0x31b7ce,'skillRoots':Object[_0x34d6cb(0x6f)](_0x16de4a),'managedRoot':_0x58909e['managedRoot']});}
|
|
@@ -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_0xc8a214=a138_0x5096;(function(_0x24d554,_0x583fe5){const _0x38d394=a138_0x5096,_0x4225d5=_0x24d554();while(!![]){try{const _0x3fad32=-parseInt(_0x38d394(0x116))/0x1*(-parseInt(_0x38d394(0x11b))/0x2)+parseInt(_0x38d394(0xf5))/0x3*(parseInt(_0x38d394(0x11d))/0x4)+-parseInt(_0x38d394(0x103))/0x5*(parseInt(_0x38d394(0xe7))/0x6)+parseInt(_0x38d394(0x108))/0x7+-parseInt(_0x38d394(0x109))/0x8+parseInt(_0x38d394(0xe9))/0x9+-parseInt(_0x38d394(0xfd))/0xa;if(_0x3fad32===_0x583fe5)break;else _0x4225d5['push'](_0x4225d5['shift']());}catch(_0x563e93){_0x4225d5['push'](_0x4225d5['shift']());}}}(a138_0x412b,0xe977d));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a138_0x4eac83 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';function a138_0x5096(_0x2f0f85,_0xa0a79c){_0x2f0f85=_0x2f0f85-0xe2;const _0x412bc7=a138_0x412b();let _0x5096a9=_0x412bc7[_0x2f0f85];return _0x5096a9;}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_0x4eac83,RESERVED_PROJECT_SKILL_CODES=new Set([a138_0xc8a214(0x115),'runtime-observe',a138_0xc8a214(0x100)]);export function linkEffectiveRuntimeSkills(_0x547f94,_0x2c1462){const _0x399dd=a138_0xc8a214,_0xfbbd8f=new Map();for(const _0x23289a of _0x547f94){const _0x7c35b0=_0x23289a[_0x399dd(0x118)][_0x399dd(0x11c)];if(!_0x7c35b0)continue;const _0x5ef2b5=_0xfbbd8f[_0x399dd(0x10c)](_0x7c35b0);(!_0x5ef2b5||_0x23289a[_0x399dd(0xee)]===_0x399dd(0xed))&&_0xfbbd8f[_0x399dd(0x114)](_0x7c35b0,_0x23289a);}const _0x3f0b8d=[];for(const _0x562237 of _0xfbbd8f['values']()){const _0x24075c=requireSkillCode(_0x562237[_0x399dd(0x118)]),_0x3778b0=readMetadataIfPresent(_0x562237[_0x399dd(0xe5)]);if(_0x3778b0?.['appCode']!==_0x2c1462[_0x399dd(0x10b)]||_0x3778b0[_0x399dd(0x11c)]!==_0x24075c)throw CliErrors[_0x399dd(0x10a)](_0x399dd(0x11a)+_0x2c1462[_0x399dd(0x10b)]+':\x20'+_0x562237[_0x399dd(0xe5)]);const _0x2de865=runtimeSkillLinkName(_0x2c1462,_0x24075c);for(const _0x2f286b of _0x2c1462[_0x399dd(0xe8)]){_0x3f0b8d[_0x399dd(0xf9)](ensureManagedSymlink(resolve(_0x2f286b,_0x2de865),_0x562237[_0x399dd(0xfa)],_0x2c1462,_0x24075c));}}return _0x3f0b8d;}export function pruneStaleRuntimeSkillLinks(_0x3468b7,_0x532c9e,_0x479dee){const _0x9c26a8=a138_0xc8a214,_0x4d6f66=new Set([..._0x532c9e][_0x9c26a8(0xf7)](_0x4987cf=>_0x4987cf[_0x9c26a8(0x10d)]())[_0x9c26a8(0xe2)](Boolean)),_0x12236b=_0x479dee?new Set([..._0x479dee][_0x9c26a8(0xf7)](_0x4305e8=>_0x4305e8[_0x9c26a8(0x10d)]())[_0x9c26a8(0xe2)](Boolean)):undefined,_0x491121=[];for(const _0xa3fa5a of _0x3468b7[_0x9c26a8(0xe8)]){for(const _0x1ea8ad of managedTargetSkillLinkPaths(_0xa3fa5a,_0x3468b7)){const _0x3aee52=runtimeSkillCodeFromLink(_0x3468b7,_0x1ea8ad);if(_0x12236b&&!_0x12236b[_0x9c26a8(0x102)](_0x3aee52))continue;if(_0x4d6f66[_0x9c26a8(0x102)](_0x3aee52))continue;_0x491121[_0x9c26a8(0xf9)](removeManagedSkillLink(_0x1ea8ad,_0x3468b7,_0x3aee52));}}return _0x491121;}export function pruneStaleRuntimeSkillCache(_0x577dbd,_0x46baba={}){const _0x1459fa=a138_0xc8a214,_0x502215=new Set([..._0x577dbd[_0x1459fa(0x10f)]][_0x1459fa(0xf7)](_0x4ac90d=>_0x4ac90d['trim']())[_0x1459fa(0xe2)](Boolean)),_0xd9dd14=_0x577dbd[_0x1459fa(0x111)]?new Set([..._0x577dbd['pruneSkillCodes']][_0x1459fa(0xf7)](_0x2a1181=>_0x2a1181['trim']())[_0x1459fa(0xe2)](Boolean)):undefined,_0x370b25=_0x577dbd[_0x1459fa(0x113)]??[_0x1459fa(0xed),'company'],_0x4249f5=resolve(getRuntimeSkillCacheRoot(_0x577dbd[_0x1459fa(0x110)],_0x577dbd[_0x1459fa(0xf2)],_0x46baba),safePathSegment(_0x577dbd[_0x1459fa(0x10b)],'appCode')),_0x5c05be=[];for(const _0x5102d5 of _0x370b25){const _0xd6c095=resolve(_0x4249f5,_0x5102d5);if(!existsSync(_0xd6c095))continue;for(const _0xca104d of readdirSync(_0xd6c095,{'withFileTypes':!![]})){if(!_0xca104d['isDirectory']())continue;const _0x3d468b=_0xca104d[_0x1459fa(0xf4)];if(_0xd9dd14&&!_0xd9dd14[_0x1459fa(0x102)](_0x3d468b))continue;if(_0x502215[_0x1459fa(0x102)](_0x3d468b))continue;const _0x9ade0d=resolve(_0xd6c095,_0x3d468b),_0x5e164a=readMetadataIfPresent(resolve(_0x9ade0d,METADATA_FILE));if(_0x5e164a?.[_0x1459fa(0x10b)]!==_0x577dbd[_0x1459fa(0x10b)]||_0x5e164a[_0x1459fa(0xee)]!==_0x5102d5||_0x5e164a['skillCode']!==_0x3d468b){_0x5c05be['push']({'path':_0x9ade0d,'action':'skipped','reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0x9ade0d,_0x577dbd[_0x1459fa(0x106)]??[])){_0x5c05be[_0x1459fa(0xf9)]({'path':_0x9ade0d,'action':_0x1459fa(0xe4),'reason':_0x1459fa(0x117)});continue;}removeSync(_0x9ade0d),_0x5c05be[_0x1459fa(0xf9)]({'path':_0x9ade0d,'action':_0x1459fa(0xeb)});}}return _0x5c05be;}function a138_0x412b(){const _0x328ccb=['1670345eGHptT','linked-from-protected-root','skill','slice','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','2aIeugq','skillCode','3851824RSawAu','builtin','filter','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','skipped','metadataPath','isDirectory','1866drHhHD','skillRoots','11747061EmgLiE','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','removed','isSymbolicLink','personal','scope','updated','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','accessKey','managedRoot','name','3WwNaZI','contentHash','map','project','push','dir','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','15986700ioAJAK','agentsSkillsDir','created','secret-retriever','unchanged','has','9795UfRniX','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','length','protectedLinkRoots','external-symlink','5558014jUHjOr','12546624nakclS','validation','appCode','get','trim','not-managed-symlink','activeSkillCodes','env','pruneSkillCodes','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','scopes','set','lovrabet'];a138_0x412b=function(){return _0x328ccb;};return a138_0x412b();}export function linkGlobalRuntimeSkills(_0x486f41,_0x9be5d={}){const _0x4dabd7=a138_0xc8a214,_0x5cd9e1=resolveSkillSyncPaths(_0x9be5d),_0x3a3008=[];for(const _0x1a63b6 of _0x486f41){if(_0x1a63b6[_0x4dabd7(0xee)]!=='builtin')throw CliErrors[_0x4dabd7(0x10a)](_0x4dabd7(0xe3)+_0x1a63b6[_0x4dabd7(0xee)]);const _0x4dce44=requireSkillCode(_0x1a63b6[_0x4dabd7(0x118)]),_0x4dd9a8=copyManagedSkillDirectory(_0x1a63b6[_0x4dabd7(0xfa)],resolve(_0x5cd9e1[_0x4dabd7(0xfe)],_0x4dce44));_0x3a3008[_0x4dabd7(0xf9)]({..._0x4dd9a8,'contentHash':_0x1a63b6[_0x4dabd7(0xf6)]});}return _0x3a3008;}function ensureManagedSymlink(_0x4b1129,_0x2ead86,_0x2dece6,_0xb136bd){const _0x5b21c1=a138_0xc8a214;mkdirSync(dirname(_0x4b1129),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x4b1129)||isDanglingSymlink(_0x4b1129)){const _0x5dc0b8=lstatSync(_0x4b1129);if(!_0x5dc0b8['isSymbolicLink']())throw CliErrors[_0x5b21c1(0x10a)]('Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20'+_0x4b1129);const _0x5a848a=resolveSymlinkTarget(_0x4b1129);if(!isPathInside(realOrResolved(_0x5a848a),realOrResolved(_0x2dece6[_0x5b21c1(0xf3)])))throw CliErrors[_0x5b21c1(0x10a)](_0x5b21c1(0xea)+_0x4b1129);if(realOrResolved(_0x5a848a)===realOrResolved(_0x2ead86))return{'path':_0x4b1129,'target':_0x2ead86,'action':_0x5b21c1(0x101)};const _0x57b0ac=readMetadataIfPresent(resolve(_0x5a848a,METADATA_FILE));if(_0x2dece6[_0x5b21c1(0xee)]==='project'&&(_0x57b0ac?.[_0x5b21c1(0x10b)]!==_0x2dece6[_0x5b21c1(0x10b)]||_0x57b0ac[_0x5b21c1(0x11c)]!==_0xb136bd))throw CliErrors['validation'](_0x5b21c1(0xf0)+_0x4b1129);return unlinkSync(_0x4b1129),symlinkSync(_0x2ead86,_0x4b1129,_0x5b21c1(0xfa)),{'path':_0x4b1129,'target':_0x2ead86,'action':_0x5b21c1(0xef)};}return symlinkSync(_0x2ead86,_0x4b1129,_0x5b21c1(0xfa)),{'path':_0x4b1129,'target':_0x2ead86,'action':_0x5b21c1(0xff)};}function managedTargetSkillLinkPaths(_0x4dcee7,_0x2ccbde){const _0x43326e=a138_0xc8a214;if(!existsSync(_0x4dcee7))return[];const _0x5750f2=_0x2ccbde[_0x43326e(0x10b)]+'--';return readdirSync(_0x4dcee7,{'withFileTypes':!![]})[_0x43326e(0xe2)](_0x44af9b=>_0x2ccbde[_0x43326e(0xee)]===_0x43326e(0xf8)||_0x44af9b[_0x43326e(0xf4)]['startsWith'](_0x5750f2))[_0x43326e(0xf7)](_0x5750a1=>resolve(_0x4dcee7,_0x5750a1[_0x43326e(0xf4)]));}function removeManagedSkillLink(_0x296a7d,_0x164524,_0x1ead4e){const _0x368055=a138_0xc8a214,_0x5ef060=lstatIfPresent(_0x296a7d);if(!_0x5ef060?.['isSymbolicLink']())return{'path':_0x296a7d,'action':'skipped','reason':_0x368055(0x10e)};const _0x1fffb6=resolveSymlinkTarget(_0x296a7d);if(!isPathInside(realOrResolved(_0x1fffb6),realOrResolved(_0x164524[_0x368055(0xf3)])))return{'path':_0x296a7d,'action':_0x368055(0xe4),'reason':_0x368055(0x107)};const _0x1cf4e6=readMetadataIfPresent(resolve(_0x1fffb6,METADATA_FILE));if(_0x164524[_0x368055(0xee)]===_0x368055(0xf8)&&(_0x1cf4e6?.[_0x368055(0x10b)]!==_0x164524[_0x368055(0x10b)]||_0x1cf4e6[_0x368055(0x11c)]!==_0x1ead4e))return{'path':_0x296a7d,'action':_0x368055(0xe4),'reason':'metadata-mismatch'};return unlinkSync(_0x296a7d),{'path':_0x296a7d,'action':_0x368055(0xeb)};}function isLinkedFromAnyRoot(_0x48f116,_0x4fc461){const _0x2820a3=a138_0xc8a214,_0x241a0f=realOrResolved(_0x48f116);for(const _0x24de0a of _0x4fc461){if(!existsSync(_0x24de0a))continue;for(const _0x5ae044 of readdirSync(_0x24de0a,{'withFileTypes':!![]})){if(!_0x5ae044[_0x2820a3(0xec)]())continue;const _0x4fdf97=resolve(_0x24de0a,_0x5ae044['name']);if(realOrResolved(resolveSymlinkTarget(_0x4fdf97))===_0x241a0f)return!![];}}return![];}function runtimeSkillLinkName(_0xb9114,_0x29a8bf){const _0x1e2f5c=a138_0xc8a214,_0x50d5be=safePathSegment(_0x29a8bf,_0x1e2f5c(0x11c));if(_0xb9114[_0x1e2f5c(0xee)]==='project'&&RESERVED_PROJECT_SKILL_CODES['has'](_0x50d5be))throw CliErrors[_0x1e2f5c(0x10a)](_0x1e2f5c(0x112)+_0x50d5be);return _0xb9114[_0x1e2f5c(0xee)]===_0x1e2f5c(0xf8)?_0x50d5be:_0xb9114[_0x1e2f5c(0x10b)]+'--'+_0x50d5be;}function runtimeSkillCodeFromLink(_0x45a976,_0x144667){const _0x2d85c0=a138_0xc8a214,_0x33c1a0=basename(_0x144667);return _0x45a976[_0x2d85c0(0xee)]==='project'?_0x33c1a0:_0x33c1a0[_0x2d85c0(0x119)]((_0x45a976[_0x2d85c0(0x10b)]+'--')[_0x2d85c0(0x105)]);}export function copyManagedSkillDirectory(_0x507772,_0x19acfd){const _0x5945d1=a138_0xc8a214,_0x666a5f=resolve(_0x19acfd,METADATA_FILE),_0x442367=existsSync(_0x19acfd);if(_0x442367){const _0x42aaae=lstatSync(_0x19acfd);if(_0x42aaae[_0x5945d1(0xec)]())throw CliErrors[_0x5945d1(0x10a)](_0x5945d1(0xfb)+_0x19acfd);if(!_0x42aaae[_0x5945d1(0xe6)]())throw CliErrors['validation'](_0x5945d1(0x104)+_0x19acfd);const _0x19232f=readMetadataIfPresent(_0x666a5f);if(_0x19232f?.[_0x5945d1(0xee)]!==_0x5945d1(0x11e))throw CliErrors[_0x5945d1(0x10a)](_0x5945d1(0xfc)+_0x19acfd);}ensureDirSync(dirname(_0x19acfd));const _0x443e4a=_0x442367?readMetadataIfPresent(_0x666a5f)?.[_0x5945d1(0xf6)]:undefined,_0x1c79d0=readMetadataIfPresent(resolve(_0x507772,METADATA_FILE))?.[_0x5945d1(0xf6)];return _0x442367&&removeSync(_0x19acfd),copySkillDirectory(_0x507772,_0x19acfd),{'path':_0x19acfd,'target':_0x507772,'action':!_0x442367?'created':_0x443e4a===_0x1c79d0?_0x5945d1(0x101):_0x5945d1(0xef)};}function copySkillDirectory(_0x509649,_0x203d5a){copySync(_0x509649,_0x203d5a,{'dereference':![],'overwrite':!![],'filter'(_0x29088e){const _0x691dac=a138_0x5096;if(lstatSync(_0x29088e)[_0x691dac(0xec)]())throw CliErrors[_0x691dac(0x10a)](_0x691dac(0xf1)+_0x29088e);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x30a921,_0x289ff4){const _0x1e3d62=a139_0x3c17,_0x1d5c9c=_0x30a921();while(!![]){try{const _0x472a69=-parseInt(_0x1e3d62(0xcd))/0x1+parseInt(_0x1e3d62(0xdb))/0x2*(-parseInt(_0x1e3d62(0xd8))/0x3)+-parseInt(_0x1e3d62(0xce))/0x4+parseInt(_0x1e3d62(0xb6))/0x5*(-parseInt(_0x1e3d62(0xd6))/0x6)+-parseInt(_0x1e3d62(0xc2))/0x7*(-parseInt(_0x1e3d62(0xd7))/0x8)+parseInt(_0x1e3d62(0xc4))/0x9*(-parseInt(_0x1e3d62(0xbb))/0xa)+-parseInt(_0x1e3d62(0xd4))/0xb*(-parseInt(_0x1e3d62(0xbc))/0xc);if(_0x472a69===_0x289ff4)break;else _0x1d5c9c['push'](_0x1d5c9c['shift']());}catch(_0x391ab6){_0x1d5c9c['push'](_0x1d5c9c['shift']());}}}(a139_0xfede,0x26e29));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_0xfede(){const _0x5477d0=['set','sort','code','includes','skillRoots','builtin','map','241600CrNFni','60848phlcPv','trim','isDirectory','appCode','env','skillMdPath','8951921INXlws','linkedPaths','6iKhUno','82744lKbihC','597WxkyeC','project','cache','2038UvelCH','name','accessKey','isArray','dir','tags','isSymbolicLink','metadataPath','117205OYdlLE','scope','localeCompare','source','link','2232190jxkhRn','12cdcDhy','scopes','skillCode','has','local','validation','35kkZIRh','filter','9HkNudB','values'];a139_0xfede=function(){return _0x5477d0;};return a139_0xfede();}import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x68f2be,_0x4b2187,_0x2e67d3={}){const _0x189908=a139_0x3c17,_0x1b04e3=safePathSegment(_0x68f2be['appCode'],_0x189908(0xd1));if(_0x4b2187['appCode']!==_0x1b04e3)throw CliErrors[_0x189908(0xc1)]('Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20'+_0x4b2187[_0x189908(0xd1)]+'\x20!=\x20'+_0x1b04e3);const _0x53d2a1=normalizeRuntimeSkillScopes(_0x68f2be['scopes']),_0xc88bed=new Set(_0x53d2a1),_0x53fc28=_0x68f2be[_0x189908(0xc8)]?.[_0x189908(0xcf)](),_0x5ccd4f=new Map(),_0x3c47c1=resolve(getRuntimeSkillCacheRoot(_0x68f2be[_0x189908(0xd2)],_0x68f2be[_0x189908(0xb0)],_0x2e67d3),_0x1b04e3);for(const _0x58745c of _0x53d2a1){for(const _0x21aff0 of localSkillEntryDirs(resolve(_0x3c47c1,_0x58745c))){collectLocalRuntimeSkill(_0x5ccd4f,_0x21aff0,{'appCode':_0x1b04e3,'scopes':_0xc88bed,'code':_0x53fc28,'source':_0x189908(0xda)});}}for(const _0x37486a of _0x4b2187[_0x189908(0xca)]){for(const _0x4ed703 of localSkillLinkCandidates(_0x37486a,_0x4b2187,_0xc88bed)){collectLocalRuntimeSkill(_0x5ccd4f,_0x4ed703,{'appCode':_0x1b04e3,'scopes':_0xc88bed,'code':_0x53fc28,'source':_0x189908(0xba),'linkedPath':_0x4ed703});}}return Array['from'](_0x5ccd4f[_0x189908(0xc5)]())[_0x189908(0xc7)](compareLocalRuntimeSkills);}function a139_0x3c17(_0x4fee90,_0x3b4002){_0x4fee90=_0x4fee90-0xaf;const _0xfede0b=a139_0xfede();let _0x3c17c1=_0xfede0b[_0x4fee90];return _0x3c17c1;}function localSkillEntryDirs(_0x2a8d7d){const _0x37352d=a139_0x3c17;if(!existsSync(_0x2a8d7d))return[];return readdirSync(_0x2a8d7d,{'withFileTypes':!![]})['filter'](_0x424677=>_0x424677[_0x37352d(0xd0)]()||_0x424677['isSymbolicLink']())[_0x37352d(0xcc)](_0x5397a8=>resolve(_0x2a8d7d,_0x5397a8[_0x37352d(0xaf)]));}function localSkillLinkCandidates(_0x3fd58d,_0x361a7d,_0x27ab9d){const _0x5b525c=a139_0x3c17;if(!existsSync(_0x3fd58d))return[];const _0x203dbe=_0x361a7d['appCode']+'--';return readdirSync(_0x3fd58d,{'withFileTypes':!![]})['filter'](_0x23155f=>_0x23155f['isDirectory']()||_0x23155f[_0x5b525c(0xb4)]())[_0x5b525c(0xc3)](_0x4f1468=>_0x361a7d['scope']===_0x5b525c(0xd9)||_0x4f1468[_0x5b525c(0xaf)]['startsWith'](_0x203dbe)||_0x27ab9d[_0x5b525c(0xbf)](_0x5b525c(0xcb)))[_0x5b525c(0xcc)](_0xbd2335=>resolve(_0x3fd58d,_0xbd2335['name']));}function collectLocalRuntimeSkill(_0x1f94d4,_0xff9de5,_0x3497da){const _0xc12744=a139_0x3c17,_0x3cd4ab=resolve(_0xff9de5,METADATA_FILE),_0x267baa=readMetadataIfPresent(_0x3cd4ab);if(!_0x267baa)return;if(_0x267baa[_0xc12744(0xd1)]!==_0x3497da[_0xc12744(0xd1)])return;if(!isRuntimeSkillScope(_0x267baa[_0xc12744(0xb7)])||!_0x3497da[_0xc12744(0xbd)][_0xc12744(0xbf)](_0x267baa[_0xc12744(0xb7)]))return;const _0x5521c0=_0x267baa['skillCode']?.[_0xc12744(0xcf)]();if(!_0x5521c0)return;if(_0x3497da[_0xc12744(0xc8)]&&_0x5521c0!==_0x3497da[_0xc12744(0xc8)])return;const _0x2fc38b=_0x267baa[_0xc12744(0xb7)]+':'+_0x5521c0,_0x1bdc31=_0x3497da['linkedPath']?[_0x3497da['linkedPath']]:[],_0x3f5c44=_0x1f94d4['get'](_0x2fc38b);if(_0x3f5c44){_0x3497da[_0xc12744(0xb9)]==='cache'&&(_0x3f5c44[_0xc12744(0xb2)]=_0xff9de5,_0x3f5c44['cacheDir']=_0xff9de5,_0x3f5c44[_0xc12744(0xd3)]=resolve(_0xff9de5,SKILL_FILE),_0x3f5c44[_0xc12744(0xb5)]=_0x3cd4ab);for(const _0xcde212 of _0x1bdc31){!_0x3f5c44['linkedPaths'][_0xc12744(0xc9)](_0xcde212)&&_0x3f5c44[_0xc12744(0xd5)]['push'](_0xcde212);}_0x3f5c44[_0xc12744(0xd5)][_0xc12744(0xc7)]();return;}_0x1f94d4[_0xc12744(0xc6)](_0x2fc38b,{..._0x267baa,'tags':Array[_0xc12744(0xb1)](_0x267baa['tags'])?_0x267baa[_0xc12744(0xb3)]:[],'scope':_0x267baa['scope'],'source':_0xc12744(0xc0),'dir':_0xff9de5,'cacheDir':_0x3497da[_0xc12744(0xb9)]===_0xc12744(0xda)?_0xff9de5:undefined,'skillMdPath':resolve(_0xff9de5,SKILL_FILE),'metadataPath':_0x3cd4ab,'linkedPaths':_0x1bdc31});}function compareLocalRuntimeSkills(_0x58b412,_0x26a37b){const _0x5b3d87=a139_0x3c17,_0x2b510a={'personal':0x0,'company':0x1,'builtin':0x2};return _0x2b510a[_0x58b412['scope']]-_0x2b510a[_0x26a37b[_0x5b3d87(0xb7)]]||_0x58b412['skillCode'][_0x5b3d87(0xb8)](_0x26a37b[_0x5b3d87(0xbe)])||_0x58b412[_0x5b3d87(0xb2)][_0x5b3d87(0xb8)](_0x26a37b[_0x5b3d87(0xb2)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9469c3,_0x20a61c){const _0x4fdd8f=a140_0x1d7a,_0x356b6b=_0x9469c3();while(!![]){try{const _0x499960=parseInt(_0x4fdd8f(0x12a))/0x1*(-parseInt(_0x4fdd8f(0x12e))/0x2)+-parseInt(_0x4fdd8f(0x129))/0x3*(-parseInt(_0x4fdd8f(0x148))/0x4)+-parseInt(_0x4fdd8f(0x136))/0x5*(parseInt(_0x4fdd8f(0x150))/0x6)+parseInt(_0x4fdd8f(0x126))/0x7+-parseInt(_0x4fdd8f(0x149))/0x8+-parseInt(_0x4fdd8f(0x14e))/0x9+parseInt(_0x4fdd8f(0x137))/0xa;if(_0x499960===_0x20a61c)break;else _0x356b6b['push'](_0x356b6b['shift']());}catch(_0x553859){_0x356b6b['push'](_0x356b6b['shift']());}}}(a140_0x230a,0x63d5f));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(_0x43c5e3){const _0x2ff170=a140_0x1d7a;return _0x43c5e3[_0x2ff170(0x12c)]??Buffer[_0x2ff170(0x13b)](_0x43c5e3[_0x2ff170(0x13c)]??'','utf8');}export function fileText(_0x21e3d2){const _0x310f4f=a140_0x1d7a;return fileContent(_0x21e3d2)[_0x310f4f(0x133)](_0x310f4f(0x12d));}export function normalizeLocalFiles(_0x5e11cd){const _0x34f171=a140_0x1d7a;if(!Array[_0x34f171(0x127)](_0x5e11cd)||_0x5e11cd[_0x34f171(0x14a)]===0x0)return[];const _0x5be3af=new Map();for(const _0x21b35f of _0x5e11cd){if(!_0x21b35f||typeof _0x21b35f!=='object'||typeof _0x21b35f['path']!==_0x34f171(0x145))throw CliErrors['validation'](_0x34f171(0x139));const _0x39962f=normalizeSkillRelativePath(_0x21b35f[_0x34f171(0x144)]);if(_0x5be3af[_0x34f171(0x131)](_0x39962f))throw CliErrors[_0x34f171(0x135)](_0x34f171(0x13f)+_0x39962f);if(_0x21b35f[_0x34f171(0x12c)]!==undefined&&!Buffer['isBuffer'](_0x21b35f[_0x34f171(0x12c)]))throw CliErrors['validation']('Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20'+_0x39962f);if(_0x21b35f[_0x34f171(0x12c)]===undefined&&typeof _0x21b35f[_0x34f171(0x13c)]!==_0x34f171(0x145))throw CliErrors[_0x34f171(0x135)](_0x34f171(0x140)+_0x39962f);const _0x1dffb5=fileContent(_0x21b35f);_0x5be3af['set'](_0x39962f,{'path':_0x39962f,'bytes':_0x1dffb5});}return Array['from'](_0x5be3af[_0x34f171(0x14c)]())['sort'](compareSkillFiles);}function a140_0x230a(){const _0x18e33=['isSymbolicLink','includes','trim','path','string','startsWith','size','16JpSRNQ','5115192jiSEhd','length','add','values','replace','5294610smrNke','isFile','96QprLlh','test','object','Skill\x20file\x20sha256\x20is\x20invalid:\x20','3603733tjvdYd','isArray','Skill\x20file\x20size\x20is\x20invalid:\x20','74097nccezc','1oOyZqB','name','bytes','utf8','1337566DTnhCS','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','split','has','isDirectory','toString','localeCompare','validation','32880mddphS','17970000HvuoxB','excludedFilePaths','Skill\x20file\x20path\x20must\x20be\x20text.','compare','from','content','sort','sha256','Duplicate\x20Skill\x20file\x20path:\x20','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20'];a140_0x230a=function(){return _0x18e33;};return a140_0x230a();}export function normalizeManifestFiles(_0xaab96f){const _0x1c35c8=a140_0x1d7a;if(!Array['isArray'](_0xaab96f)||_0xaab96f[_0x1c35c8(0x14a)]===0x0)return[];const _0x4e77a8=new Map();for(const _0x11a4dd of _0xaab96f){if(!_0x11a4dd||typeof _0x11a4dd!==_0x1c35c8(0x152)||typeof _0x11a4dd[_0x1c35c8(0x144)]!==_0x1c35c8(0x145))throw CliErrors[_0x1c35c8(0x135)](_0x1c35c8(0x139));const _0x46fc53=normalizeSkillRelativePath(_0x11a4dd[_0x1c35c8(0x144)]);if(_0x4e77a8[_0x1c35c8(0x131)](_0x46fc53))throw CliErrors['validation'](_0x1c35c8(0x13f)+_0x46fc53);if(!isSha256Hex(_0x11a4dd[_0x1c35c8(0x13e)]))throw CliErrors[_0x1c35c8(0x135)](_0x1c35c8(0x153)+_0x46fc53);if(!Number['isSafeInteger'](_0x11a4dd[_0x1c35c8(0x147)])||_0x11a4dd[_0x1c35c8(0x147)]<0x0)throw CliErrors[_0x1c35c8(0x135)](_0x1c35c8(0x128)+_0x46fc53);_0x4e77a8['set'](_0x46fc53,{'path':_0x46fc53,'sha256':_0x11a4dd[_0x1c35c8(0x13e)]['toLowerCase'](),'size':_0x11a4dd['size']});}return Array[_0x1c35c8(0x13b)](_0x4e77a8[_0x1c35c8(0x14c)]())['sort'](compareSkillFiles);}export function scanSkillDirectory(_0xd02dac,_0xff0f93={}){const _0xc5d87d=a140_0x1d7a,_0x3fa838=realpathSync(_0xd02dac),_0x56c712=canonicalExcludedFilePaths(_0xff0f93[_0xc5d87d(0x138)]),_0x291e40=[];function _0x30442d(_0x1360e4){const _0x5b6979=_0xc5d87d,_0x3b2b63=readdirSync(_0x1360e4,{'withFileTypes':!![]})[_0x5b6979(0x13d)]((_0x5f63f6,_0x51f7e2)=>_0x5f63f6['name'][_0x5b6979(0x134)](_0x51f7e2[_0x5b6979(0x12b)]));for(const _0x40a4da of _0x3b2b63){if(_0x40a4da[_0x5b6979(0x132)]()&&IGNORED_DIR_NAMES[_0x5b6979(0x131)](_0x40a4da[_0x5b6979(0x12b)]))continue;if(IGNORED_FILE_NAMES[_0x5b6979(0x131)](_0x40a4da[_0x5b6979(0x12b)]))continue;const _0x40f479=resolve(_0x1360e4,_0x40a4da['name']);if(isExcludedFilePath(_0x40f479,_0x56c712))continue;if(_0x40a4da[_0x5b6979(0x141)]())throw CliErrors[_0x5b6979(0x135)](_0x5b6979(0x12f)+_0x40f479);const _0x22595c=toPosixPath(relative(_0x3fa838,_0x40f479));if(_0x40a4da[_0x5b6979(0x132)]()){_0x30442d(_0x40f479);continue;}if(!_0x40a4da[_0x5b6979(0x14f)]())continue;validateSkillRelativePath(_0x22595c);const _0x3f7fd3=readFileSync(_0x40f479);_0x291e40['push']({'path':_0x22595c,'bytes':_0x3f7fd3});}}return _0x30442d(_0x3fa838),normalizeLocalFiles(_0x291e40);}function canonicalExcludedFilePaths(_0x43f3fa){const _0x4ae26a=a140_0x1d7a,_0x45b850=new Set();for(const _0x41a948 of _0x43f3fa??[]){const _0x511049=resolve(_0x41a948);_0x45b850[_0x4ae26a(0x14b)](_0x511049);try{_0x45b850[_0x4ae26a(0x14b)](realpathSync(_0x511049));}catch{}}return _0x45b850;}function isExcludedFilePath(_0x3584f8,_0x5a20b2){const _0xff0b60=a140_0x1d7a;if(_0x5a20b2[_0xff0b60(0x131)](_0x3584f8))return!![];if(_0x5a20b2[_0xff0b60(0x147)]===0x0)return![];try{return _0x5a20b2[_0xff0b60(0x131)](realpathSync(_0x3584f8));}catch{return![];}}export function compareSkillFiles(_0x44f9e2,_0x53c129){const _0x336e68=a140_0x1d7a;if(_0x44f9e2[_0x336e68(0x144)]===SKILL_FILE)return _0x53c129['path']===SKILL_FILE?0x0:-0x1;if(_0x53c129[_0x336e68(0x144)]===SKILL_FILE)return 0x1;return Buffer[_0x336e68(0x13a)](Buffer[_0x336e68(0x13b)](_0x44f9e2[_0x336e68(0x144)],_0x336e68(0x12d)),Buffer['from'](_0x53c129[_0x336e68(0x144)],_0x336e68(0x12d)));}export function normalizeSkillRelativePath(_0x112da4){const _0x3315a6=a140_0x1d7a,_0x4335cb=toPosixPath(_0x112da4[_0x3315a6(0x143)]());return validateSkillRelativePath(_0x4335cb),_0x4335cb;}function a140_0x1d7a(_0xba82aa,_0x5e3dd5){_0xba82aa=_0xba82aa-0x126;const _0x230a24=a140_0x230a();let _0x1d7a66=_0x230a24[_0xba82aa];return _0x1d7a66;}export function validateSkillRelativePath(_0x441097){const _0x2df739=a140_0x1d7a;if(!_0x441097||_0x441097[_0x2df739(0x146)]('/')||_0x441097[_0x2df739(0x142)]('//'))throw CliErrors[_0x2df739(0x135)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x441097);for(const _0xedcbe8 of _0x441097[_0x2df739(0x130)]('/')){if(!_0xedcbe8||_0xedcbe8==='.'||_0xedcbe8==='..')throw CliErrors[_0x2df739(0x135)]('Unsafe\x20Skill\x20file\x20path:\x20'+_0x441097);}}export function toPosixPath(_0x5db5ec){const _0x1c952=a140_0x1d7a;return _0x5db5ec[_0x1c952(0x14d)](/\\/g,'/');}export function isSha256Hex(_0x1d0d7b){const _0x53da48=a140_0x1d7a;return typeof _0x1d0d7b==='string'&&/^[a-fA-F0-9]{64}$/[_0x53da48(0x151)](_0x1d0d7b);}
|
|
@@ -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(_0x35bc33,_0x54d69c){const _0x1707d4=a141_0x2c1b,_0x58aa26=_0x35bc33();while(!![]){try{const _0x94a828=-parseInt(_0x1707d4(0x147))/0x1+parseInt(_0x1707d4(0x124))/0x2+parseInt(_0x1707d4(0x136))/0x3*(parseInt(_0x1707d4(0x114))/0x4)+-parseInt(_0x1707d4(0x130))/0x5+parseInt(_0x1707d4(0x122))/0x6*(parseInt(_0x1707d4(0x113))/0x7)+-parseInt(_0x1707d4(0x125))/0x8+-parseInt(_0x1707d4(0x135))/0x9*(-parseInt(_0x1707d4(0x11d))/0xa);if(_0x94a828===_0x54d69c)break;else _0x58aa26['push'](_0x58aa26['shift']());}catch(_0x3f47fd){_0x58aa26['push'](_0x58aa26['shift']());}}}(a141_0x23b1,0x3b6b3));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_0x23b1(){const _0x3d9c92=['Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','displayName','10KPHhuB','Runtime\x20Skill\x20package\x20is\x20missing\x20','displayName:\x20','has','contents','162984FdrsSq','toString','922178PToKUB','2799088BYnrHo','isFile','force','packageBytes','name:\x20','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','---\x0a','---','accessKey','Managed\x20file\x20was\x20removed\x20locally:\x20','replace','1534850ERMRRm','version','entries','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','stringify','2899035AgvZbH','6261fxxBpm','test','description:\x20','env','validation','length','.\x20Changed\x20file:\x20','errors','trim','example','description','contentHash','scope','keys','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','find','delete','52148pvjgFj','path','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','pulledAt','appCode','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','match','paths','\x0a---\x0a\x0a','name','utf8','28glXOnZ','116tchIUw','map','flow','skillName','status','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','fileHashes'];a141_0x23b1=function(){return _0x3d9c92;};return a141_0x23b1();}import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';function a141_0x2c1b(_0x1ac275,_0x193c16){_0x1ac275=_0x1ac275-0x10c;const _0x23b19c=a141_0x23b1();let _0x2c1ba2=_0x23b19c[_0x1ac275];return _0x2c1ba2;}import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x5125a4,_0x2c0144,_0x30a13d){const _0x4415c4=a141_0x2c1b,_0x5bc14f=requireSkillCode(_0x5125a4),_0x43128b=requirePackageBytes(_0x5bc14f,_0x30a13d[_0x4415c4(0x128)]),_0x43a014=extractDownloadedPackage(_0x43128b),_0x304bf5=_0x43a014[_0x4415c4(0x145)](_0x4ff8b2=>_0x4ff8b2[_0x4415c4(0x148)]===SKILL_FILE);if(!_0x304bf5)throw CliErrors[_0x4415c4(0x13a)](_0x4415c4(0x11e)+SKILL_FILE+':\x20'+_0x5bc14f);const _0x18c4ae=withMaterializedSkillFrontmatter(_0x43a014,_0x5125a4,_0x5bc14f),_0x5bff73=_0x18c4ae[_0x4415c4(0x145)](_0x1b37a1=>_0x1b37a1['path']===SKILL_FILE),_0x28bb0f=fileText(_0x5bff73),_0x107c0b=getRuntimeSkillDir(_0x30a13d[_0x4415c4(0x139)],_0x30a13d[_0x4415c4(0x12d)],_0x30a13d[_0x4415c4(0x10c)],_0x2c0144,_0x5bc14f,_0x30a13d[_0x4415c4(0x10f)]),_0x4548de=resolve(_0x107c0b,SKILL_FILE),_0x3977bc=resolve(_0x107c0b,METADATA_FILE),_0x56e6c9=contentHash(_0x28bb0f),_0x5e34be=readMetadataIfPresent(_0x3977bc)?.[_0x4415c4(0x11a)];ensurePulledFilesCanBeOverwritten(_0x107c0b,_0x3977bc,_0x18c4ae,_0x30a13d[_0x4415c4(0x127)]===!![]),mkdirSync(_0x107c0b,{'recursive':!![],'mode':0x1c0});const _0x12f00b=existsSync(_0x4548de)?readFileSync(_0x4548de,_0x4415c4(0x112)):undefined;return materializeFiles(_0x107c0b,_0x18c4ae),removeStaleManagedFiles(_0x107c0b,_0x5e34be,_0x18c4ae),writeJsonAtomic(_0x3977bc,buildMetadata(_0x5125a4,_0x2c0144,_0x30a13d['appCode'],_0x56e6c9,_0x30a13d[_0x4415c4(0x14a)],_0x18c4ae,_0x43128b)),{'skill':_0x5125a4,'scope':_0x2c0144,'dir':_0x107c0b,'skillMdPath':_0x4548de,'metadataPath':_0x3977bc,'contentHash':_0x56e6c9,'changed':_0x12f00b!==_0x28bb0f};}export function reuseMaterializedRuntimeSkill(_0x4eb881,_0x508e82,_0x5475f7){const _0x53f10a=a141_0x2c1b,_0x28da0e=_0x4eb881['version']?.[_0x53f10a(0x13e)]();if(!_0x28da0e)return undefined;const _0xe63793=requireSkillCode(_0x4eb881),_0x242379=getRuntimeSkillDir(_0x5475f7[_0x53f10a(0x139)],_0x5475f7[_0x53f10a(0x12d)],_0x5475f7[_0x53f10a(0x10c)],_0x508e82,_0xe63793,_0x5475f7['paths']),_0x1eb9c9=resolve(_0x242379,SKILL_FILE),_0x46b06c=resolve(_0x242379,METADATA_FILE),_0x5f04aa=readMetadataIfPresent(_0x46b06c);if(!_0x5f04aa||_0x5f04aa['schemaVersion']!==0x2||_0x5f04aa[_0x53f10a(0x10c)]!==_0x5475f7['appCode']||_0x5f04aa[_0x53f10a(0x142)]!==_0x508e82||_0x5f04aa['skillCode']!==_0xe63793||_0x5f04aa[_0x53f10a(0x131)]!==_0x28da0e||_0x5f04aa['id']!==_0x4eb881['id']||_0x5f04aa['skillName']!==_0x4eb881[_0x53f10a(0x117)]||_0x5f04aa[_0x53f10a(0x140)]!==_0x4eb881[_0x53f10a(0x140)]||_0x5f04aa[_0x53f10a(0x13f)]!==_0x4eb881['example']||_0x5f04aa[_0x53f10a(0x118)]!==_0x4eb881['status']||!_0x5f04aa[_0x53f10a(0x141)]||!_0x5f04aa[_0x53f10a(0x11a)]||!Object['hasOwn'](_0x5f04aa[_0x53f10a(0x11a)],SKILL_FILE))return undefined;for(const [_0xd51f15,_0x6c3994]of Object[_0x53f10a(0x132)](_0x5f04aa[_0x53f10a(0x11a)])){if(!/^[a-f0-9]{64}$/[_0x53f10a(0x137)](_0x6c3994))return undefined;const _0x3fda4d=resolveManagedFilePath(_0x242379,_0xd51f15);if(!existsSync(_0x3fda4d)||!lstatSync(_0x3fda4d)['isFile']())return undefined;if(bufferSha256(readFileSync(_0x3fda4d))!==_0x6c3994)return undefined;}return{'skill':_0x4eb881,'scope':_0x508e82,'dir':_0x242379,'skillMdPath':_0x1eb9c9,'metadataPath':_0x46b06c,'contentHash':_0x5f04aa[_0x53f10a(0x141)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x182f35,_0x4f6534,_0xc0c57){const _0x3f5688=a141_0x2c1b,_0x57b792=skillDisplayName(_0x4f6534,_0xc0c57),_0x2b67cd=_0x4f6534[_0x3f5688(0x140)]?.[_0x3f5688(0x13e)]()||_0x57b792||_0xc0c57;return normalizeLocalFiles(_0x182f35)[_0x3f5688(0x115)](_0x379383=>{const _0x2d033f=_0x3f5688,_0x1e5a2c=fileText(_0x379383);if(_0x379383['path']!==SKILL_FILE)return _0x379383;if(hasYamlFrontmatter(_0x1e5a2c))return{'path':_0x379383[_0x2d033f(0x148)],'content':withSyncedDisplayName(_0x1e5a2c,_0x57b792)};return{'path':_0x379383['path'],'content':prependSkillFrontmatter(_0x1e5a2c,{'name':_0xc0c57,'displayName':_0x57b792,'description':_0x2b67cd})};});}function hasYamlFrontmatter(_0x54e5a1){const _0x5a71f9=a141_0x2c1b;return/^\uFEFF?---\s*\r?\n/[_0x5a71f9(0x137)](_0x54e5a1);}function prependSkillFrontmatter(_0xf0b81f,_0x480c7e){const _0xf4e8ef=a141_0x2c1b,_0x24bfba=_0xf0b81f[_0xf4e8ef(0x12f)](/^\uFEFF/,'');return[_0xf4e8ef(0x12c),_0xf4e8ef(0x129)+yamlString(_0x480c7e[_0xf4e8ef(0x111)]),_0x480c7e['displayName']?_0xf4e8ef(0x11f)+yamlString(_0x480c7e['displayName']):undefined,_0xf4e8ef(0x138)+yamlString(_0x480c7e[_0xf4e8ef(0x140)]),_0xf4e8ef(0x12c),'',_0x24bfba]['filter'](_0x4f7a6b=>_0x4f7a6b!==undefined)['join']('\x0a');}function yamlString(_0x1cd487){const _0x48316e=a141_0x2c1b;return JSON[_0x48316e(0x134)](_0x1cd487['replace'](/\r/g,'')[_0x48316e(0x13e)]());}function skillDisplayName(_0x9c46cc,_0xbcdc2b){const _0x4f9094=a141_0x2c1b,_0x127b6c=_0x9c46cc['skillName']?.[_0x4f9094(0x13e)]();return _0x127b6c||_0xbcdc2b;}function withSyncedDisplayName(_0x373528,_0x3afc2f){const _0x3efa20=a141_0x2c1b,_0x2644d9=_0x373528[_0x3efa20(0x10e)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x2644d9)return _0x373528;const _0x2e1266=_0x2644d9[0x1]??'',_0x1f9977=_0x2644d9[0x2]??'',_0x3d626a=parseDocument(_0x1f9977);if(_0x3d626a[_0x3efa20(0x13d)][_0x3efa20(0x13b)]>0x0||!isMap(_0x3d626a[_0x3efa20(0x121)]))return _0x373528;if(_0x3afc2f)_0x3d626a['set'](_0x3efa20(0x11c),_0x3afc2f);else{if(_0x3d626a[_0x3efa20(0x120)](_0x3efa20(0x11c)))_0x3d626a[_0x3efa20(0x146)](_0x3efa20(0x11c));else return _0x373528;}forceBlockCollections(_0x3d626a['contents']);const _0x2fc56a=_0x3d626a[_0x3efa20(0x123)]({'lineWidth':0x0})['trimEnd'](),_0x1d73f7=_0x373528['slice'](_0x2644d9[0x0]['length'])[_0x3efa20(0x12f)](/^\r?\n/,'');return _0x2e1266+_0x3efa20(0x12b)+_0x2fc56a+_0x3efa20(0x110)+_0x1d73f7;}function forceBlockCollections(_0x544e84){if(!isNode(_0x544e84))return;visit(_0x544e84,(_0x2e9cf8,_0x4c5cdd)=>{const _0x54d298=a141_0x2c1b;isCollection(_0x4c5cdd)&&(_0x4c5cdd[_0x54d298(0x116)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x472d27,_0x38d9ea,_0x19761b,_0x2c1a3b){const _0x5ef6e7=a141_0x2c1b;if(_0x2c1a3b||!existsSync(_0x38d9ea))return;const _0x24e51e=readMetadataIfPresent(_0x38d9ea);if(!_0x24e51e)return;const _0x18b7aa=_0x24e51e[_0x5ef6e7(0x11a)]&&Object[_0x5ef6e7(0x143)](_0x24e51e[_0x5ef6e7(0x11a)])[_0x5ef6e7(0x13b)]>0x0?_0x24e51e[_0x5ef6e7(0x11a)]:undefined;if(_0x18b7aa)for(const [_0x543163,_0x561085]of Object[_0x5ef6e7(0x132)](_0x18b7aa)){const _0x44f3c5=resolveManagedFilePath(_0x472d27,_0x543163);if(!existsSync(_0x44f3c5))throw CliErrors[_0x5ef6e7(0x13a)](_0x5ef6e7(0x149)+_0x472d27,_0x5ef6e7(0x12e)+_0x543163);const _0x10035d=lstatSync(_0x44f3c5);if(!_0x10035d['isFile']())throw CliErrors[_0x5ef6e7(0x13a)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x472d27,_0x5ef6e7(0x12a)+_0x543163);const _0x591e63=bufferSha256(readFileSync(_0x44f3c5));if(_0x591e63!==_0x561085)throw CliErrors['validation'](_0x5ef6e7(0x149)+_0x472d27+_0x5ef6e7(0x13c)+_0x543163,_0x5ef6e7(0x119)+_0x543163);}else{const _0x399959=resolve(_0x472d27,SKILL_FILE);if(existsSync(_0x399959)&&_0x24e51e[_0x5ef6e7(0x141)]){const _0x53daaa=contentHash(readFileSync(_0x399959,'utf8'));if(_0x53daaa!==_0x24e51e[_0x5ef6e7(0x141)])throw CliErrors[_0x5ef6e7(0x13a)](_0x5ef6e7(0x133)+_0x399959,_0x5ef6e7(0x144));}}for(const _0x543125 of normalizeLocalFiles(_0x19761b)){if(_0x18b7aa?.[_0x543125[_0x5ef6e7(0x148)]])continue;if(!_0x18b7aa&&_0x543125[_0x5ef6e7(0x148)]===SKILL_FILE)continue;const _0x59205b=resolveManagedFilePath(_0x472d27,_0x543125['path']);if(!existsSync(_0x59205b))continue;const _0x374060=lstatSync(_0x59205b);if(!_0x374060[_0x5ef6e7(0x126)]())throw CliErrors[_0x5ef6e7(0x13a)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x472d27,_0x5ef6e7(0x10d)+_0x543125[_0x5ef6e7(0x148)]);const _0x3c7cbf=bufferSha256(readFileSync(_0x59205b));if(_0x3c7cbf!==fileHash(_0x543125))throw CliErrors['validation'](_0x5ef6e7(0x149)+_0x472d27,_0x5ef6e7(0x11b)+_0x543125[_0x5ef6e7(0x148)]);}}function materializeFiles(_0x584390,_0xe09beb){for(const _0x5637e9 of normalizeLocalFiles(_0xe09beb)){const _0x2adc64=resolveManagedFilePath(_0x584390,_0x5637e9['path']);mkdirSync(dirname(_0x2adc64),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2adc64,fileContent(_0x5637e9),0x180);}}function removeStaleManagedFiles(_0x2abe97,_0x2ace9a,_0x198aba){const _0x2f22de=a141_0x2c1b;if(!_0x2ace9a)return;const _0x510128=new Set(normalizeLocalFiles(_0x198aba)[_0x2f22de(0x115)](_0x296c29=>_0x296c29[_0x2f22de(0x148)]));for(const _0x43b5b9 of Object[_0x2f22de(0x143)](_0x2ace9a)){if(_0x510128[_0x2f22de(0x120)](_0x43b5b9))continue;const _0xd18401=resolveManagedFilePath(_0x2abe97,_0x43b5b9);existsSync(_0xd18401)&&lstatSync(_0xd18401)['isFile']()&&rmSync(_0xd18401,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a142_0x8f66(_0x51202f,_0x4982e8){_0x51202f=_0x51202f-0x184;const _0xc4f873=a142_0xc4f8();let _0x8f66ed=_0xc4f873[_0x51202f];return _0x8f66ed;}(function(_0x558717,_0x386a7f){const _0x1b64fb=a142_0x8f66,_0x4acf7d=_0x558717();while(!![]){try{const _0xb60644=parseInt(_0x1b64fb(0x187))/0x1*(-parseInt(_0x1b64fb(0x1a2))/0x2)+-parseInt(_0x1b64fb(0x1a8))/0x3+parseInt(_0x1b64fb(0x193))/0x4*(-parseInt(_0x1b64fb(0x196))/0x5)+-parseInt(_0x1b64fb(0x189))/0x6+-parseInt(_0x1b64fb(0x198))/0x7+-parseInt(_0x1b64fb(0x18f))/0x8+parseInt(_0x1b64fb(0x19d))/0x9;if(_0xb60644===_0x386a7f)break;else _0x4acf7d['push'](_0x4acf7d['shift']());}catch(_0x572a4f){_0x4acf7d['push'](_0x4acf7d['shift']());}}}(a142_0xc4f8,0x50837));import{existsSync,readFileSync}from'node:fs';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,normalizeLocalFiles}from'./local-files.js';import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x220c5b,_0x31f3ce,_0x3b0e96,_0x583ce5,_0x407d9a,_0x24e1be,_0x4e1dee){const _0x41f44=a142_0x8f66,_0x40f4d1=_0x24e1be?normalizeLocalFiles(_0x24e1be):[],_0x4cb735=!_0x4e1dee&&_0x40f4d1['length']>0x0?buildSkillPackage(_0x40f4d1):undefined,_0xbf2735=_0x4e1dee?bufferSha256(_0x4e1dee):_0x4cb735?.[_0x41f44(0x1a4)][_0x41f44(0x184)],_0x14a9e7=_0x4e1dee?.[_0x41f44(0x195)]??_0x4cb735?.[_0x41f44(0x1a4)]['zipSize'],_0x258726=_0x40f4d1[_0x41f44(0x195)]>0x0?Object[_0x41f44(0x1a1)](_0x40f4d1[_0x41f44(0x19f)](_0x1d312e=>[_0x1d312e['path'],fileHash(_0x1d312e)])):undefined;return{'schemaVersion':_0x40f4d1['length']>0x0?0x2:0x1,'id':_0x220c5b['id'],'appCode':_0x3b0e96,'skillCode':requireSkillCode(_0x220c5b),'skillName':_0x220c5b[_0x41f44(0x1a0)],'description':_0x220c5b[_0x41f44(0x1a9)],'example':_0x220c5b[_0x41f44(0x197)],'scope':_0x31f3ce,'readonly':_0x31f3ce!==_0x41f44(0x18d)||_0x220c5b['readonly']===!![],'tenantCode':_0x220c5b[_0x41f44(0x191)],'userId':_0x220c5b['userId'],'version':_0x220c5b[_0x41f44(0x18a)],'status':_0x220c5b['status'],'tags':Array[_0x41f44(0x192)](_0x220c5b[_0x41f44(0x18c)])?_0x220c5b[_0x41f44(0x18c)]:[],'hasUpstreamUpdate':_0x220c5b[_0x41f44(0x18e)],'forkedFromSkillId':_0x220c5b[_0x41f44(0x18b)],'forkedFromVersion':_0x220c5b[_0x41f44(0x1aa)],'sourceSessionId':_0x220c5b[_0x41f44(0x1a7)],'contentHash':_0x583ce5,'fileHashes':_0x258726,'treeHash':_0x40f4d1[_0x41f44(0x195)]>0x0?fileTreeHash(localFilesToManifestFiles(_0x40f4d1)):undefined,'ossPath':remoteManifestOssPath(_0x220c5b[_0x41f44(0x185)]),'zipSha256':_0xbf2735,'zipSize':_0x14a9e7,'files':_0x40f4d1[_0x41f44(0x195)]>0x0?_0x40f4d1['map'](_0x3a5de7=>({'path':_0x3a5de7[_0x41f44(0x19c)],'hash':fileHash(_0x3a5de7),'size':fileContent(_0x3a5de7)['length']})):undefined,'pulledAt':_0x407d9a??new Date()[_0x41f44(0x194)]()};}export function requireSkillCode(_0x55ebe9){const _0x3220d3=a142_0x8f66,_0x47e3bd=_0x55ebe9[_0x3220d3(0x186)]?.[_0x3220d3(0x188)]();if(!_0x47e3bd)throw CliErrors[_0x3220d3(0x1a3)](_0x3220d3(0x1a5));return _0x47e3bd;}export function readMetadataIfPresent(_0x587a0c){const _0xa6de93=a142_0x8f66;if(!existsSync(_0x587a0c))return undefined;try{const _0x31b10f=JSON[_0xa6de93(0x19b)](readFileSync(_0x587a0c,_0xa6de93(0x190)));return _0x31b10f;}catch{throw CliErrors[_0xa6de93(0x1a3)](_0xa6de93(0x1a6)+METADATA_FILE+':\x20'+_0x587a0c);}}function remoteManifestOssPath(_0x4985cf){const _0x57608a=a142_0x8f66;if(!_0x4985cf||typeof _0x4985cf!==_0x57608a(0x19a)||Array[_0x57608a(0x192)](_0x4985cf))return undefined;const _0x43d4b3=_0x4985cf[_0x57608a(0x19e)];return typeof _0x43d4b3===_0x57608a(0x199)&&_0x43d4b3[_0x57608a(0x188)]()?_0x43d4b3[_0x57608a(0x188)]():undefined;}function a142_0xc4f8(){const _0xa03914=['tenantCode','isArray','8116MXNnDV','toISOString','length','1105Pqzpcf','example','4316347Usrkgr','string','object','parse','path','22763547XknRlP','ossPath','map','skillName','fromEntries','2oVWkAR','validation','manifest','Runtime\x20Skill\x20is\x20missing\x20skillCode.','Invalid\x20','sourceSessionId','1039917lmELUU','description','forkedFromVersion','zipSha256','files','skillCode','25601cEcxvl','trim','2993022PbogzL','version','forkedFromSkillId','tags','personal','hasUpstreamUpdate','2107144idpXjf','utf8'];a142_0xc4f8=function(){return _0xa03914;};return a142_0xc4f8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a143_0x379824=a143_0x32f8;(function(_0x12d51e,_0x4b10a8){const _0x3ff80b=a143_0x32f8,_0x103e44=_0x12d51e();while(!![]){try{const _0x23cc76=parseInt(_0x3ff80b(0x1dd))/0x1*(-parseInt(_0x3ff80b(0x1ec))/0x2)+parseInt(_0x3ff80b(0x1e4))/0x3+parseInt(_0x3ff80b(0x1f3))/0x4*(parseInt(_0x3ff80b(0x1ef))/0x5)+-parseInt(_0x3ff80b(0x1e8))/0x6+parseInt(_0x3ff80b(0x1de))/0x7+-parseInt(_0x3ff80b(0x1f4))/0x8*(parseInt(_0x3ff80b(0x1e3))/0x9)+-parseInt(_0x3ff80b(0x1f5))/0xa;if(_0x23cc76===_0x4b10a8)break;else _0x103e44['push'](_0x103e44['shift']());}catch(_0x55f6fc){_0x103e44['push'](_0x103e44['shift']());}}}(a143_0x4103,0x7dbb8));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';function a143_0x32f8(_0x584951,_0xa1638c){_0x584951=_0x584951-0x1dd;const _0x41032a=a143_0x4103();let _0x32f80b=_0x41032a[_0x584951];return _0x32f80b;}import{fingerprintAccessKey}from'../../commands/app/cache.js';function a143_0x4103(){const _0x55d57d=['SKILL_ROOT','2358fBdBay','2310987DLgYzb','validation','skillCode','\x20for\x20local\x20path:\x20','1960920NdCgkp','.claude','path\x20segment','cacheRoot','4GjkEFT','cache','Unsafe\x20','3257995JDyjvk','includes','claudeSkillsDir','workbuddySkillsDir','4pSjexA','8072gPRAQs','10675980cuQLel','homeDir','124421gkuCiJ','7004830sKKkKQ','homeDirName','appCode','skills'];a143_0x4103=function(){return _0x55d57d;};return a143_0x4103();}import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x2f308d={}){const _0x126eeb=a143_0x32f8,_0x905f0f=_0x2f308d[_0x126eeb(0x1f6)]??homedir(),_0x380db0=resolve(_0x905f0f,PRODUCT_CONFIG[_0x126eeb(0x1df)],_0x126eeb(0x1ed)),_0x45cbff=trimmedEnv(_0x126eeb(0x1e2)),_0x38a478=trimmedEnv('CLAUDE_SKILL_ROOT'),_0x1a2ee6=resolve(_0x905f0f,'.workbuddy'),_0x16f69e=_0x2f308d[_0x126eeb(0x1f2)]??(existsSync(_0x1a2ee6)?resolve(_0x1a2ee6,'skills'):undefined);return{'homeDir':_0x905f0f,'cacheRoot':_0x380db0,'managedRoot':resolve(_0x905f0f,PRODUCT_CONFIG[_0x126eeb(0x1df)]),'agentsSkillsDir':_0x2f308d['agentsSkillsDir']??_0x45cbff??resolve(_0x905f0f,'.agents',_0x126eeb(0x1e1)),'claudeSkillsDir':_0x2f308d[_0x126eeb(0x1f1)]??_0x38a478??resolve(_0x905f0f,_0x126eeb(0x1e9),_0x126eeb(0x1e1)),'workbuddySkillsDir':_0x16f69e};}export function runtimeAgentSkillRoots(_0xc29955){const _0x5d6919=a143_0x32f8;return[_0xc29955['agentsSkillsDir'],_0xc29955[_0x5d6919(0x1f1)],_0xc29955['workbuddySkillsDir']]['filter'](_0x17f665=>Boolean(_0x17f665));}export function getRuntimeSkillCacheRoot(_0x2dee62,_0x121b7b,_0x4b7acf={}){const _0x20ede9=a143_0x32f8,_0xecdb28=resolveSkillSyncPaths(_0x4b7acf);return resolve(_0xecdb28[_0x20ede9(0x1eb)],_0x2dee62,fingerprintAccessKey(_0x121b7b),_0x20ede9(0x1e1));}export function getRuntimeSkillDir(_0x5f248d,_0x495e5c,_0x273a4b,_0x3983bb,_0x3f4899,_0x5acd6b={}){const _0x28e8d1=a143_0x32f8;return resolve(getRuntimeSkillCacheRoot(_0x5f248d,_0x495e5c,_0x5acd6b),safePathSegment(_0x273a4b,_0x28e8d1(0x1e0)),_0x3983bb,safePathSegment(_0x3f4899,_0x28e8d1(0x1e6)));}export function safePathSegment(_0x4160df,_0x53d6b3=a143_0x379824(0x1ea)){const _0x3f3883=a143_0x379824;if(!_0x4160df||_0x4160df[_0x3f3883(0x1f0)]('/')||_0x4160df[_0x3f3883(0x1f0)]('\x5c')||_0x4160df[_0x3f3883(0x1f0)]('..'))throw CliErrors[_0x3f3883(0x1e5)](_0x3f3883(0x1ee)+_0x53d6b3+_0x3f3883(0x1e7)+_0x4160df);return _0x4160df;}function trimmedEnv(_0x121fac){const _0x3aa02a=productEnv(_0x121fac)?.['trim']();return _0x3aa02a?_0x3aa02a: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(_0xf6fd02,_0x7d6c3d){const _0x265b7c=a144_0x4845,_0x41ebe0=_0xf6fd02();while(!![]){try{const _0x64d3a2=-parseInt(_0x265b7c(0x188))/0x1+-parseInt(_0x265b7c(0x199))/0x2*(-parseInt(_0x265b7c(0x1a9))/0x3)+parseInt(_0x265b7c(0x17d))/0x4+-parseInt(_0x265b7c(0x181))/0x5*(-parseInt(_0x265b7c(0x19b))/0x6)+parseInt(_0x265b7c(0x185))/0x7+parseInt(_0x265b7c(0x1a0))/0x8*(parseInt(_0x265b7c(0x178))/0x9)+-parseInt(_0x265b7c(0x195))/0xa;if(_0x64d3a2===_0x7d6c3d)break;else _0x41ebe0['push'](_0x41ebe0['shift']());}catch(_0xf3e3e3){_0x41ebe0['push'](_0x41ebe0['shift']());}}}(a144_0x3525,0x9debb));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a144_0x534908}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(_0x22b975,_0x3b92e2,_0x2655a0={}){const _0x37fd24=a144_0x4845,_0x5312e9=resolvePushDirectoryRoot(_0x22b975),_0x1423b1=readPushMetadataIfPresent(resolve(_0x5312e9,METADATA_FILE),{'ignoreInvalidMetadata':_0x2655a0[_0x37fd24(0x19c)]});if(_0x1423b1?.[_0x37fd24(0x19d)]&&_0x1423b1[_0x37fd24(0x19d)]!==_0x3b92e2&&!_0x2655a0['allowAppCodeRetarget']&&!_0x2655a0[_0x37fd24(0x1a4)])throw CliErrors[_0x37fd24(0x191)](_0x37fd24(0x17c)+_0x1423b1[_0x37fd24(0x19d)]+_0x37fd24(0x1b7)+_0x3b92e2+'\x22.');const _0x2d0866=resolvePushSkillCode(_0x5312e9,_0x3b92e2,_0x1423b1,_0x2655a0);if(!_0x2d0866)throw CliErrors['validation'](_0x37fd24(0x18e)+SKILL_FILE+',\x20'+METADATA_FILE+_0x37fd24(0x1a7));return{'dir':_0x5312e9,'skillCode':_0x2d0866,'metadata':_0x1423b1};}export function readPushDirectory(_0x39fe90,_0x11e077,_0x22f880={}){const _0x1b0bfd=a144_0x4845,_0x163bf6=resolvePushDirectoryIdentity(_0x39fe90,_0x11e077,_0x22f880),_0x7d774f=_0x163bf6[_0x1b0bfd(0x1a1)],_0x1c182f=resolve(_0x7d774f,SKILL_FILE);if(!existsSync(_0x1c182f)||!lstatSync(_0x1c182f)[_0x1b0bfd(0x194)]())throw CliErrors[_0x1b0bfd(0x191)](_0x1b0bfd(0x1b8)+SKILL_FILE+':\x20'+_0x1c182f);const _0xda2663=_0x163bf6[_0x1b0bfd(0x1aa)],_0x1b6cfb=_0x22f880[_0x1b0bfd(0x19a)]??_0x1b0bfd(0x1b3);if(!_0x22f880['ignoreMetadataScope']&&_0xda2663?.[_0x1b0bfd(0x1ac)]===_0x1b0bfd(0x1af))throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x1b0bfd(0x17f)+_0xda2663[_0x1b0bfd(0x1ac)]+'\x22.');if(!_0x22f880['ignoreMetadataScope']&&_0x1b6cfb===_0x1b0bfd(0x1b3)&&_0xda2663?.[_0x1b0bfd(0x1ac)]&&_0xda2663[_0x1b0bfd(0x1ac)]!==_0x1b0bfd(0x1b3))throw CliErrors['validation']('Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20'+METADATA_FILE+_0x1b0bfd(0x17f)+_0xda2663[_0x1b0bfd(0x1ac)]+'\x22.',_0x1b0bfd(0x18f)+_0x7d774f+'\x20to\x20submit\x20company\x20Skills\x20for\x20review.');const _0x1f4d94=scanSkillDirectory(_0x7d774f,{'excludedFilePaths':_0x22f880[_0x1b0bfd(0x19e)]}),_0x2f94b8=buildSkillPackage(_0x1f4d94),_0x3bed6e=readFileSync(_0x1c182f,_0x1b0bfd(0x192)),_0x4e6d7e=_0x163bf6[_0x1b0bfd(0x189)],_0x3bbb66=_0x22f880[_0x1b0bfd(0x1ab)]?undefined:_0xda2663,_0x3fb1bd=readSkillDisplayName(_0x3bed6e);return{'skillCode':_0x4e6d7e,'metadata':_0xda2663,'frontmatterDisplayName':_0x3fb1bd,'input':{'skillCode':_0x4e6d7e,'skillName':_0x3fb1bd??_0x3bbb66?.[_0x1b0bfd(0x17a)],'description':_0x3bbb66?.[_0x1b0bfd(0x177)],'content':_0x3bed6e,'files':_0x2f94b8[_0x1b0bfd(0x184)],'packageBase64':_0x2f94b8[_0x1b0bfd(0x18a)],'tags':_0x3bbb66?.[_0x1b0bfd(0x1a8)],'version':_0x3bbb66?.[_0x1b0bfd(0x183)],'sourceSessionId':_0x3bbb66?.[_0x1b0bfd(0x179)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x42c548,_0x26569d,_0x4e1ec0,_0x294b8b={}){const _0x5911d9=a144_0x4845,_0x5cd48c=resolvePushDirectoryRoot(_0x42c548),_0x407fa4=readPushMetadataIfPresent(resolve(_0x5cd48c,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x541969=requireRemoteScope(_0x26569d),_0x2f5570=readLocalSkillContent(_0x5cd48c),_0x5357b8={..._0x26569d,'appCode':_0x26569d[_0x5911d9(0x19d)]??_0x4e1ec0,'skillName':_0x26569d[_0x5911d9(0x17a)]??_0x407fa4?.['skillName'],'description':_0x26569d[_0x5911d9(0x177)]??_0x407fa4?.[_0x5911d9(0x177)],'example':_0x26569d['example']??_0x407fa4?.['example'],'tags':Array[_0x5911d9(0x180)](_0x26569d[_0x5911d9(0x1a8)])?_0x26569d[_0x5911d9(0x1a8)]:_0x407fa4?.[_0x5911d9(0x1a8)],'sourceSessionId':_0x26569d[_0x5911d9(0x179)]??_0x407fa4?.['sourceSessionId'],'content':_0x26569d[_0x5911d9(0x1a2)]??_0x2f5570},_0x418649=buildMetadata(_0x5357b8,_0x541969,_0x4e1ec0,contentHash(_0x2f5570),_0x294b8b[_0x5911d9(0x182)]);writeJsonAtomic(resolve(_0x5cd48c,METADATA_FILE),_0x418649);}export function recordPushedRuntimeSkill(_0x12c009,_0x2de73e,_0x5be39d,_0x111d13={}){const _0x9cf9c=a144_0x4845,_0x549c6e=resolvePushDirectoryRoot(_0x12c009),_0x1e1bc4=scanSkillDirectory(_0x549c6e),_0x1fecb6=_0x1e1bc4['find'](_0x2cd2d7=>_0x2cd2d7[_0x9cf9c(0x17b)]===SKILL_FILE),_0x4b389a=_0x1fecb6?fileText(_0x1fecb6):'',_0x438259=tryNormalizePackageManifest(_0x2de73e[_0x9cf9c(0x1a3)]),_0x71ec98={..._0x2de73e,'content':_0x2de73e[_0x9cf9c(0x1a2)]??_0x4b389a,'files':_0x438259},_0x5349e4=_0x438259?normalizeLocalFiles(_0x1e1bc4)[_0x9cf9c(0x1b0)](_0x22fa91=>_0x438259[_0x9cf9c(0x1a3)]['some'](_0x53ee66=>_0x53ee66['path']===_0x22fa91[_0x9cf9c(0x17b)])):undefined,_0x2aef11=buildMetadata(_0x71ec98,_0x111d13[_0x9cf9c(0x1ac)]??_0x9cf9c(0x1b3),_0x5be39d,contentHash(_0x71ec98[_0x9cf9c(0x1a2)]??''),_0x111d13['pushedAt'],_0x5349e4);writeJsonAtomic(resolve(_0x549c6e,METADATA_FILE),_0x2aef11);}export function deriveSkillCodeFromDirectory(_0x4bcc80,_0x1b2691){const _0x4f072b=a144_0x4845,_0xd29458=basename(resolve(_0x4bcc80)),_0x2cbe43=_0x1b2691+'--';return _0xd29458[_0x4f072b(0x18b)](_0x2cbe43)?_0xd29458[_0x4f072b(0x1b1)](_0x2cbe43[_0x4f072b(0x1b4)]):_0xd29458;}function resolvePushSkillCode(_0x297dcf,_0x205c20,_0x34e0da,_0x28da5b){const _0x5bd36a=a144_0x4845,_0x5ed5a7=deriveSkillCodeFromSkillFile(_0x297dcf)||deriveSkillCodeFromDirectory(_0x297dcf,_0x205c20);if(_0x28da5b['ignoreMetadataSkillCode'])return _0x5ed5a7;return _0x34e0da?.[_0x5bd36a(0x189)]?.['trim']()||_0x5ed5a7;}function deriveSkillCodeFromSkillFile(_0x49992){const _0x2433de=a144_0x4845,_0x21a32c=resolve(_0x49992,SKILL_FILE);if(!existsSync(_0x21a32c)||!lstatSync(_0x21a32c)['isFile']())return undefined;const _0x39ef71=readFileSync(_0x21a32c,_0x2433de(0x192)),_0x40c4cf=_0x39ef71['match'](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x40c4cf)return undefined;const _0xdf8a90=parseFrontmatterObject(_0x40c4cf[0x1]??''),_0x358bdb=scalarToString(_0xdf8a90?.[_0x2433de(0x1b2)]);return _0x358bdb?slugifySkillName(_0x358bdb):undefined;}function readSkillDisplayName(_0x5c2045){const _0x562dc0=a144_0x4845,_0x503c86=_0x5c2045[_0x562dc0(0x1b6)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x503c86)return undefined;const _0x2751eb=parseFrontmatterObject(_0x503c86[0x1]??'');return scalarToString(_0x2751eb?.[_0x562dc0(0x18c)]);}function slugifySkillName(_0x129419){const _0x2e3126=a144_0x4845,_0x419689=_0x129419[_0x2e3126(0x1b5)]()[_0x2e3126(0x186)]()[_0x2e3126(0x17e)](/[^\p{L}\p{N}\p{So}]+/gu,'-')['replace'](/^-+/,'')[_0x2e3126(0x17e)](/-+$/,'')[_0x2e3126(0x17e)](/-{2,}/g,'-');if(!_0x419689)throw CliErrors['validation'](_0x2e3126(0x196)+SKILL_FILE+'\x20name\x20for\x20SkillHub\x20slug\x20generation.');return _0x419689;}function parseFrontmatterObject(_0x386a05){const _0x1d9b70=a144_0x4845;try{const _0x3c12b8=a144_0x534908(_0x386a05);return _0x3c12b8&&typeof _0x3c12b8===_0x1d9b70(0x193)&&!Array[_0x1d9b70(0x180)](_0x3c12b8)?_0x3c12b8:undefined;}catch{return undefined;}}function a144_0x4845(_0x34696a,_0x563d73){_0x34696a=_0x34696a-0x177;const _0x35255d=a144_0x3525();let _0x48456a=_0x35255d[_0x34696a];return _0x48456a;}function scalarToString(_0x58c713){const _0x14aa86=a144_0x4845;if(typeof _0x58c713===_0x14aa86(0x187))return _0x58c713[_0x14aa86(0x1b5)]();if(typeof _0x58c713==='number'||typeof _0x58c713===_0x14aa86(0x1a5))return String(_0x58c713);return undefined;}function resolvePushDirectoryRoot(_0x31870){const _0x312cf3=a144_0x4845,_0x5b47c4=resolve(_0x31870);if(!existsSync(_0x5b47c4))throw CliErrors[_0x312cf3(0x191)](_0x312cf3(0x197)+_0x31870);const _0x39fd4a=lstatSync(_0x5b47c4);if(_0x39fd4a['isDirectory']())return _0x5b47c4;if(_0x39fd4a[_0x312cf3(0x1ae)]()){const _0x286086=realpathSync(_0x5b47c4);if(lstatSync(_0x286086)[_0x312cf3(0x1ad)]())return _0x286086;}throw CliErrors[_0x312cf3(0x191)]('Skill\x20directory\x20not\x20found:\x20'+_0x31870);}function requireRemoteScope(_0x1f7779){const _0x240ffa=a144_0x4845;if(_0x1f7779[_0x240ffa(0x1ac)]===_0x240ffa(0x1b3)||_0x1f7779[_0x240ffa(0x1ac)]===_0x240ffa(0x190)||_0x1f7779[_0x240ffa(0x1ac)]===_0x240ffa(0x1af))return _0x1f7779[_0x240ffa(0x1ac)];throw CliErrors[_0x240ffa(0x191)](_0x240ffa(0x1a6)+(_0x1f7779[_0x240ffa(0x189)]||_0x240ffa(0x198))+_0x240ffa(0x19f)+(_0x1f7779[_0x240ffa(0x1ac)]??_0x240ffa(0x18d))+'\x22.');}function readLocalSkillContent(_0x588ec3){const _0xacedb4=resolve(_0x588ec3,SKILL_FILE);return existsSync(_0xacedb4)&&lstatSync(_0xacedb4)['isFile']()?readFileSync(_0xacedb4,'utf8'):'';}function readPushMetadataIfPresent(_0x1ecbcb,_0x2dbf13={}){const _0x3abd=a144_0x4845;try{return readMetadataIfPresent(_0x1ecbcb);}catch(_0x2c9a0e){if(_0x2dbf13[_0x3abd(0x19c)])return undefined;throw _0x2c9a0e;}}function a144_0x3525(){const _0x516278=['97704GxvDdK','replace','\x20has\x20scope=\x22','isArray','2110jQGDeb','refreshedAt','version','manifest','1120049uJrxKD','toLowerCase','string','968703OEHJrD','skillCode','packageBase64','startsWith','displayName','unknown','Unable\x20to\x20resolve\x20skillCode\x20from\x20','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','company','validation','utf8','object','isFile','10623150wtmloj','Invalid\x20','Skill\x20directory\x20not\x20found:\x20','(unknown)','579416czXmif','targetScope','15492oFWpWG','ignoreInvalidMetadata','appCode','excludedFilePaths','\x20has\x20unsupported\x20scope\x20\x22','416ExrAik','dir','content','files','ignoreMetadataAppCodeMismatch','boolean','Remote\x20Skill\x20',',\x20or\x20directory\x20name.','tags','6GQHJYt','metadata','ignoreMetadataForPayload','scope','isDirectory','isSymbolicLink','builtin','filter','slice','name','personal','length','trim','match','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','Missing\x20','description','142686hDglzz','sourceSessionId','skillName','path','Skill\x20metadata\x20appCode\x20\x22'];a144_0x3525=function(){return _0x516278;};return a144_0x3525();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a145_0x4e46(){const _0x3cb0e8=['length','746928aBsfGb','117294HEBZtc','Unsupported\x20runtime\x20Skill\x20scope:\x20','8UmiDkY','company','personal','validation','956578TDjyfu','builtin','push','36027gXckWE','91gQzRcu','32ZmUXfZ','154850qOpdcS','4103694YhcrLo','518780FbacsF'];a145_0x4e46=function(){return _0x3cb0e8;};return a145_0x4e46();}(function(_0x558690,_0x1669d5){const _0x120010=a145_0x39b5,_0x105c80=_0x558690();while(!![]){try{const _0x26dce7=parseInt(_0x120010(0x1ec))/0x1+parseInt(_0x120010(0x1e9))/0x2+parseInt(_0x120010(0x1e2))/0x3+parseInt(_0x120010(0x1ee))/0x4*(-parseInt(_0x120010(0x1ef))/0x5)+parseInt(_0x120010(0x1e3))/0x6*(parseInt(_0x120010(0x1ed))/0x7)+-parseInt(_0x120010(0x1e5))/0x8*(parseInt(_0x120010(0x1f0))/0x9)+-parseInt(_0x120010(0x1f1))/0xa;if(_0x26dce7===_0x1669d5)break;else _0x105c80['push'](_0x105c80['shift']());}catch(_0x55ccbb){_0x105c80['push'](_0x105c80['shift']());}}}(a145_0x4e46,0x3fec1));import{CliErrors}from'../../errors.js';function a145_0x39b5(_0xf5ac82,_0x503b2b){_0xf5ac82=_0xf5ac82-0x1e2;const _0x4e46ef=a145_0x4e46();let _0x39b593=_0x4e46ef[_0xf5ac82];return _0x39b593;}export function normalizeRuntimeSkillScopes(_0x4837e9){const _0x37716f=a145_0x39b5,_0xc49b78=_0x4837e9&&_0x4837e9[_0x37716f(0x1f2)]>0x0?_0x4837e9:[_0x37716f(0x1e7),_0x37716f(0x1e6),'builtin'],_0x1fc02c=[];for(const _0x5e915e of _0xc49b78){if(!isRuntimeSkillScope(_0x5e915e))throw CliErrors[_0x37716f(0x1e8)](_0x37716f(0x1e4)+_0x5e915e);!_0x1fc02c['includes'](_0x5e915e)&&_0x1fc02c[_0x37716f(0x1eb)](_0x5e915e);}return _0x1fc02c;}export function isRuntimeSkillScope(_0x5b2047){const _0x989d8b=a145_0x39b5;return _0x5b2047==='personal'||_0x5b2047===_0x989d8b(0x1e6)||_0x5b2047===_0x989d8b(0x1ea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a147_0x232e(){const _0x2777c3=['sort','24GIBeZv','endsWith','2718576EaKKvl','2296400fZiddj','code','140140CohrIV','from','195088kUcSUt','65vuMphC','1221toNEmM','validation_error','4744rcMmRP','1980-01-01T00:00:00.000Z','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','1393bnuLPu','validation','entries','name','97386rnbIak','map','path','Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'];a147_0x232e=function(){return _0x2777c3;};return a147_0x232e();}const a147_0xc23e46=a147_0x2137;(function(_0x36767f,_0x1312f4){const _0x4652b9=a147_0x2137,_0x1ea6ac=_0x36767f();while(!![]){try{const _0x54bef5=-parseInt(_0x4652b9(0x1e3))/0x1+parseInt(_0x4652b9(0x1de))/0x2*(-parseInt(_0x4652b9(0x1e7))/0x3)+-parseInt(_0x4652b9(0x1e5))/0x4+-parseInt(_0x4652b9(0x1e6))/0x5*(parseInt(_0x4652b9(0x1d9))/0x6)+-parseInt(_0x4652b9(0x1d5))/0x7*(-parseInt(_0x4652b9(0x1e9))/0x8)+parseInt(_0x4652b9(0x1e0))/0x9+parseInt(_0x4652b9(0x1e1))/0xa;if(_0x54bef5===_0x1312f4)break;else _0x1ea6ac['push'](_0x1ea6ac['shift']());}catch(_0x3ea7c0){_0x1ea6ac['push'](_0x1ea6ac['shift']());}}}(a147_0x232e,0x3bcb0));function a147_0x2137(_0x1b3280,_0xccfd82){_0x1b3280=_0x1b3280-0x1d3;const _0x232e64=a147_0x232e();let _0x2137e8=_0x232e64[_0x1b3280];return _0x2137e8;}import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a147_0xc23e46(0x1d3));export function createDeterministicZipPackage(_0x34e45a){const _0x424d4d=a147_0xc23e46,_0xefab2c={};for(const _0x419838 of normalizeLocalFiles(_0x34e45a)){_0xefab2c[_0x419838[_0x424d4d(0x1db)]]=fileContent(_0x419838);}return Buffer[_0x424d4d(0x1e4)](zipSync(_0xefab2c,{'level':0x0,'mtime':ZIP_MTIME}));}export function parseZipPackage(_0x44a135){const _0x203e83=a147_0xc23e46;if(_0x44a135['length']<0x16)throw CliErrors[_0x203e83(0x1d6)](_0x203e83(0x1d4));let _0xd1fa4e;try{_0xd1fa4e=unzipSync(_0x44a135,{'filter'(_0x138352){const _0x1c54bf=_0x203e83,_0x54f129=normalizeSkillRelativePath(_0x138352[_0x1c54bf(0x1d8)]);if(_0x54f129[_0x1c54bf(0x1df)]('/'))throw CliErrors['validation'](_0x1c54bf(0x1dc)+_0x54f129);return!![];}});}catch(_0x492dbe){if(isRuntimeSkillValidationError(_0x492dbe))throw _0x492dbe;throw CliErrors['validation'](_0x203e83(0x1d4));}return Object[_0x203e83(0x1d7)](_0xd1fa4e)[_0x203e83(0x1da)](([_0x1c4bd6,_0x186979])=>({'path':normalizeSkillRelativePath(_0x1c4bd6),'bytes':Buffer[_0x203e83(0x1e4)](_0x186979)}))[_0x203e83(0x1dd)](compareSkillFiles);}function isRuntimeSkillValidationError(_0x8afc65){const _0x527da6=a147_0xc23e46;return typeof _0x8afc65==='object'&&_0x8afc65!==null&&'code'in _0x8afc65&&_0x8afc65[_0x527da6(0x1e2)]===_0x527da6(0x1e8);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43421c,_0x1684a8){const _0x1c4170=a148_0x2faa,_0x455025=_0x43421c();while(!![]){try{const _0x193d80=-parseInt(_0x1c4170(0xc7))/0x1*(-parseInt(_0x1c4170(0xc6))/0x2)+-parseInt(_0x1c4170(0xc3))/0x3*(-parseInt(_0x1c4170(0xdb))/0x4)+-parseInt(_0x1c4170(0xcb))/0x5+-parseInt(_0x1c4170(0xd4))/0x6+parseInt(_0x1c4170(0xc8))/0x7*(parseInt(_0x1c4170(0xdc))/0x8)+-parseInt(_0x1c4170(0xe6))/0x9+parseInt(_0x1c4170(0xc1))/0xa*(-parseInt(_0x1c4170(0xbe))/0xb);if(_0x193d80===_0x1684a8)break;else _0x455025['push'](_0x455025['shift']());}catch(_0x4ee757){_0x455025['push'](_0x455025['shift']());}}}(a148_0x3afa,0xc80cd));import{CliErrors}from'../../errors.js';function a148_0x3afa(){const _0x566f80=['schemaVersion','map','path','isSafeInteger','Duplicate\x20Skill\x20package\x20entry:\x20','2494452Dbulwj','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','files','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20','3053340VTfxtN','8kItcaf','string','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Runtime\x20Skill\x20package\x20size\x20mismatch.','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','object','Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.','some','toLowerCase','9104085cGJHTR','base64','ossPath','set','isArray','10747guXIgI','length','Missing\x20','10430fXmvDo','validation','6uhKQgX','bytes','sha256','2ENyrlu','1378763zFIwqL','10959263LRwQqa','Runtime\x20Skill\x20package\x20is\x20missing\x20','zipSha256','6026595yNPdGE','toString','zipSize','treeSha256'];a148_0x3afa=function(){return _0x566f80;};return a148_0x3afa();}import{SKILL_FILE}from'./constants.js';import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x5ec2bf){const _0x4dec00=a148_0x2faa,_0x41a534=normalizeLocalFiles(_0x5ec2bf);if(!_0x41a534[_0x4dec00(0xe4)](_0xfea4e8=>_0xfea4e8[_0x4dec00(0xd1)]===SKILL_FILE))throw CliErrors['validation'](_0x4dec00(0xc0)+SKILL_FILE+_0x4dec00(0xde));const _0x167e60=localFilesToManifestFiles(_0x41a534),_0x558634=createDeterministicZipPackage(_0x41a534);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x167e60),'zipSha256':bufferSha256(_0x558634),'zipSize':_0x558634[_0x4dec00(0xbf)],'files':_0x167e60},'packageBytes':_0x558634,'packageBase64':_0x558634[_0x4dec00(0xcc)](_0x4dec00(0xe7))};}function a148_0x2faa(_0x1d97a,_0x3e7e4f){_0x1d97a=_0x1d97a-0xbb;const _0x3afacb=a148_0x3afa();let _0x2faa96=_0x3afacb[_0x1d97a];return _0x2faa96;}export function verifyRuntimeSkillPackage(_0x1d0cd2,_0x4c022c){const _0x624485=a148_0x2faa,_0x1ce496=normalizePackageManifest(_0x1d0cd2,{'requireOssPath':![]});if(!_0x1ce496)throw CliErrors[_0x624485(0xc2)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x1ce496,_0x4c022c);}export function verifyRuntimeSkillBundle(_0x1bb2a6,_0x2d3208){const _0x413f6a=a148_0x2faa,_0x581a9d=normalizePackageManifest(_0x1bb2a6,{'requireOssPath':![]});if(!_0x581a9d)throw CliErrors[_0x413f6a(0xc2)](_0x413f6a(0xd5));return extractAndVerifyPackageFiles(_0x581a9d,_0x2d3208);}export function tryNormalizePackageManifest(_0x114138){return normalizePackageManifest(_0x114138,{'requireOssPath':![]});}export function requirePackageBytes(_0x59dca8,_0x499004){const _0x2753c5=a148_0x2faa;if(!_0x499004||_0x499004[_0x2753c5(0xbf)]===0x0)throw CliErrors['validation'](_0x2753c5(0xda)+_0x59dca8);return _0x499004;}export function extractDownloadedPackage(_0x529dd1){const _0x15a425=a148_0x2faa,_0x3318a0=parseZipPackage(_0x529dd1)[_0x15a425(0xd0)](_0x269fe8=>({'path':_0x269fe8['path'],'bytes':_0x269fe8[_0x15a425(0xc4)]}));if(!_0x3318a0[_0x15a425(0xe4)](_0x313f4a=>_0x313f4a[_0x15a425(0xd1)]===SKILL_FILE))throw CliErrors['validation'](_0x15a425(0xc9)+SKILL_FILE+'.');return normalizeLocalFiles(_0x3318a0);}export function localFilesToManifestFiles(_0x923ed3){const _0x44de45=a148_0x2faa;return normalizeLocalFiles(_0x923ed3)[_0x44de45(0xd0)](_0x1769d8=>({'path':_0x1769d8[_0x44de45(0xd1)],'sha256':fileHash(_0x1769d8),'size':fileContent(_0x1769d8)[_0x44de45(0xbf)]}));}function normalizePackageManifest(_0x5b96f6,_0x3159d3){const _0x3627ed=a148_0x2faa;if(!_0x5b96f6||typeof _0x5b96f6!==_0x3627ed(0xe2)||Array[_0x3627ed(0xbd)](_0x5b96f6))return undefined;const _0x2948fe=_0x5b96f6,_0x485842=typeof _0x2948fe[_0x3627ed(0xbb)]===_0x3627ed(0xdd)?_0x2948fe[_0x3627ed(0xbb)]['trim']():undefined;if(_0x3159d3['requireOssPath']&&!_0x485842)return undefined;if(!Array[_0x3627ed(0xbd)](_0x2948fe['files'])||_0x2948fe[_0x3627ed(0xd6)]['length']===0x0)return undefined;if(!isSha256Hex(_0x2948fe[_0x3627ed(0xce)]))throw CliErrors[_0x3627ed(0xc2)](_0x3627ed(0xe3));if(!isSha256Hex(_0x2948fe[_0x3627ed(0xca)]))throw CliErrors[_0x3627ed(0xc2)](_0x3627ed(0xd7));if(!Number[_0x3627ed(0xd2)](_0x2948fe[_0x3627ed(0xcd)])||_0x2948fe['zipSize']<0x0)throw CliErrors[_0x3627ed(0xc2)](_0x3627ed(0xdf));const _0x3ce288=normalizeManifestFiles(_0x2948fe['files']);if(!_0x3ce288[_0x3627ed(0xe4)](_0x29cc9c=>_0x29cc9c[_0x3627ed(0xd1)]===SKILL_FILE))throw CliErrors['validation']('Runtime\x20Skill\x20manifest\x20is\x20missing\x20'+SKILL_FILE+'.');const _0x334ca8=fileTreeHash(_0x3ce288);if(_0x334ca8!==_0x2948fe[_0x3627ed(0xce)]['toLowerCase']())throw CliErrors[_0x3627ed(0xc2)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.');return{'schemaVersion':Number['isSafeInteger'](_0x2948fe[_0x3627ed(0xcf)])?_0x2948fe['schemaVersion']:0x2,'ossPath':_0x485842,'treeSha256':_0x334ca8,'zipSha256':_0x2948fe[_0x3627ed(0xca)][_0x3627ed(0xe5)](),'zipSize':_0x2948fe['zipSize'],'files':_0x3ce288};}function extractAndVerifyPackage(_0x1ca2c1,_0x4acade){const _0x5a1289=a148_0x2faa,_0x17f6db=normalizePackageManifest(_0x1ca2c1,{'requireOssPath':![]});if(!_0x17f6db)throw CliErrors[_0x5a1289(0xc2)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');if(_0x4acade[_0x5a1289(0xbf)]!==_0x17f6db[_0x5a1289(0xcd)])throw CliErrors['validation'](_0x5a1289(0xe0));const _0x222108=bufferSha256(_0x4acade);if(_0x222108!==_0x17f6db[_0x5a1289(0xca)])throw CliErrors['validation'](_0x5a1289(0xd9));return extractAndVerifyPackageFiles(_0x17f6db,_0x4acade);}function extractAndVerifyPackageFiles(_0x4b06fe,_0x506f20){const _0x1aa65e=a148_0x2faa,_0x25a626=parseZipPackage(_0x506f20);if(_0x25a626[_0x1aa65e(0xbf)]!==_0x4b06fe[_0x1aa65e(0xd6)][_0x1aa65e(0xbf)])throw CliErrors['validation']('Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.');const _0x40e931=new Map();for(const _0x1304f7 of _0x25a626){if(_0x40e931['has'](_0x1304f7[_0x1aa65e(0xd1)]))throw CliErrors[_0x1aa65e(0xc2)](_0x1aa65e(0xd3)+_0x1304f7['path']);_0x40e931[_0x1aa65e(0xbc)](_0x1304f7[_0x1aa65e(0xd1)],_0x1304f7);}const _0x5025ea=[];for(const _0x165515 of _0x4b06fe[_0x1aa65e(0xd6)]){const _0x5c31fb=_0x40e931['get'](_0x165515[_0x1aa65e(0xd1)]);if(!_0x5c31fb)throw CliErrors[_0x1aa65e(0xc2)](_0x1aa65e(0xd8)+_0x165515['path']);if(_0x5c31fb[_0x1aa65e(0xc4)][_0x1aa65e(0xbf)]!==_0x165515['size'])throw CliErrors[_0x1aa65e(0xc2)]('Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20'+_0x165515[_0x1aa65e(0xd1)]);const _0x42273d=bufferSha256(_0x5c31fb['bytes']);if(_0x42273d!==_0x165515[_0x1aa65e(0xc5)])throw CliErrors['validation'](_0x1aa65e(0xe1)+_0x165515[_0x1aa65e(0xd1)]);_0x5025ea['push']({'path':_0x165515['path'],'bytes':_0x5c31fb[_0x1aa65e(0xc4)]});}return normalizeLocalFiles(_0x5025ea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c9a7e,_0xa2462b){var _0x231ee4=a149_0x4268,_0x118cf4=_0x4c9a7e();while(!![]){try{var _0x428910=-parseInt(_0x231ee4(0xdf))/0x1+parseInt(_0x231ee4(0xe6))/0x2*(parseInt(_0x231ee4(0xe2))/0x3)+parseInt(_0x231ee4(0xe4))/0x4+parseInt(_0x231ee4(0xe3))/0x5*(-parseInt(_0x231ee4(0xe9))/0x6)+-parseInt(_0x231ee4(0xe7))/0x7+parseInt(_0x231ee4(0xe0))/0x8*(parseInt(_0x231ee4(0xe5))/0x9)+-parseInt(_0x231ee4(0xe1))/0xa*(-parseInt(_0x231ee4(0xe8))/0xb);if(_0x428910===_0xa2462b)break;else _0x118cf4['push'](_0x118cf4['shift']());}catch(_0x55d645){_0x118cf4['push'](_0x118cf4['shift']());}}}(a149_0x1f60,0x2ee87));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';function a149_0x4268(_0x184e2c,_0x71fa64){_0x184e2c=_0x184e2c-0xdf;var _0x1f60fb=a149_0x1f60();var _0x4268c5=_0x1f60fb[_0x184e2c];return _0x4268c5;}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';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';function a149_0x1f60(){var _0x2041f5=['4149oOuwHx','16hFWxpn','2016042MRxAOm','33fqQHjU','12imxlDk','86947ntSYuy','1528jkiFLX','752470kWepCo','109854BiQeBN','339695QqvpaI','384920KSIaBR'];a149_0x1f60=function(){return _0x2041f5;};return a149_0x1f60();}
|