@lovrabet/lovrabet-cli 2.3.5 → 2.3.6-beta.1
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/approval/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/import-excel.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.d.ts +10 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/kb-search-client.js +1 -1
- package/lib/core/sdk-client.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/access-error.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/generated/official-routing.js +1 -1
- package/lib/generated/routing-contract.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/services/dataset-import/auto-id-runner.d.ts +3 -1
- package/lib/services/dataset-import/auto-id-runner.js +1 -1
- package/lib/services/dataset-import/excel-reader.js +1 -1
- package/lib/services/dataset-import/image-bytes.d.ts +3 -0
- package/lib/services/dataset-import/image-bytes.js +1 -0
- package/lib/services/dataset-import/image-ooxml.d.ts +10 -0
- package/lib/services/dataset-import/image-ooxml.js +1 -0
- package/lib/services/dataset-import/image-runner.d.ts +48 -0
- package/lib/services/dataset-import/image-runner.js +1 -0
- package/lib/services/dataset-import/metadata.js +1 -1
- package/lib/services/dataset-import/preview.js +1 -1
- package/lib/services/dataset-import/runner.d.ts +10 -1
- package/lib/services/dataset-import/runner.js +1 -1
- package/lib/services/dataset-import/types.d.ts +28 -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/positive-safe-integer.js +1 -1
- package/lib/utils/redaction.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 +4 -1
- package/skills/lovrabet/SKILL.md +3 -1
- package/skills/lovrabet/references/lovrabet-excel-import.md +19 -0
- package/skills/lovrabet.manifest.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
function a150_0x397c(){const _0x4ab375=['skipped','managedRoot','appCode','dir','isDirectory','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','1967090GuoWvT','lovrabet','Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20','metadataPath','105604oNtxyc','protectedLinkRoots','unchanged','validation','get','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','updated','pruneSkillCodes','12lEOjaj','removed','linked-from-protected-root','contentHash','28RSBzxT','builtin','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','scope','personal','external-symlink','109543xNrkWn','110oVwNqZ','239031vEGDsq','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','trim','filter','scopes','76318fGaOVq','name','104GIeXTV','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','isSymbolicLink','has','project','Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20','company','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','skillRoots','477256DMdcqt','22818CUHewr','push','slice','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','startsWith','created','skillCode','map','skill'];a150_0x397c=function(){return _0x4ab375;};return a150_0x397c();}const a150_0x4f07da=a150_0x32dc;(function(_0x1306c6,_0x5cb470){const _0x5cd2d3=a150_0x32dc,_0x194f31=_0x1306c6();while(!![]){try{const _0x86e34b=parseInt(_0x5cd2d3(0xb6))/0x1+parseInt(_0x5cd2d3(0xc8))/0x2+parseInt(_0x5cd2d3(0xac))/0x3*(-parseInt(_0x5cd2d3(0xdc))/0x4)+parseInt(_0x5cd2d3(0xd8))/0x5+parseInt(_0x5cd2d3(0xc9))/0x6*(-parseInt(_0x5cd2d3(0xb0))/0x7)+-parseInt(_0x5cd2d3(0xbf))/0x8*(parseInt(_0x5cd2d3(0xb8))/0x9)+parseInt(_0x5cd2d3(0xb7))/0xa*(-parseInt(_0x5cd2d3(0xbd))/0xb);if(_0x86e34b===_0x5cb470)break;else _0x194f31['push'](_0x194f31['shift']());}catch(_0x56991d){_0x194f31['push'](_0x194f31['shift']());}}}(a150_0x397c,0x30a14));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';import{basename,dirname,resolve}from'node:path';import a150_0x463601 from'fs-extra';import{CliErrors}from'../../errors.js';function a150_0x32dc(_0x59b3ec,_0x1b870d){_0x59b3ec=_0x59b3ec-0xa7;const _0x397c32=a150_0x397c();let _0x32dc54=_0x397c32[_0x59b3ec];return _0x32dc54;}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}=a150_0x463601,RESERVED_PROJECT_SKILL_CODES=new Set([a150_0x4f07da(0xd9),'runtime-observe','secret-retriever']);export function linkEffectiveRuntimeSkills(_0x312ddc,_0x3821fc){const _0x146d03=a150_0x4f07da,_0x2b8b05=new Map();for(const _0x13722c of _0x312ddc){const _0x111366=_0x13722c[_0x146d03(0xd1)]['skillCode'];if(!_0x111366)continue;const _0x189b3d=_0x2b8b05[_0x146d03(0xa8)](_0x111366);(!_0x189b3d||_0x13722c[_0x146d03(0xb3)]==='personal')&&_0x2b8b05['set'](_0x111366,_0x13722c);}const _0x5d727c=[];for(const _0x5ba75 of _0x2b8b05['values']()){const _0x3c1ab5=requireSkillCode(_0x5ba75[_0x146d03(0xd1)]),_0x215856=readMetadataIfPresent(_0x5ba75[_0x146d03(0xdb)]);if(_0x215856?.[_0x146d03(0xd4)]!==_0x3821fc['appCode']||_0x215856[_0x146d03(0xcf)]!==_0x3c1ab5)throw CliErrors[_0x146d03(0xa7)](_0x146d03(0xd7)+_0x3821fc['appCode']+':\x20'+_0x5ba75[_0x146d03(0xdb)]);const _0x2e0252=runtimeSkillLinkName(_0x3821fc,_0x3c1ab5);for(const _0x164d3b of _0x3821fc[_0x146d03(0xc7)]){_0x5d727c[_0x146d03(0xca)](ensureManagedSymlink(resolve(_0x164d3b,_0x2e0252),_0x5ba75['dir'],_0x3821fc,_0x3c1ab5));}}return _0x5d727c;}export function pruneStaleRuntimeSkillLinks(_0x3cf453,_0xaea8f5,_0x40c75d){const _0x2bc093=a150_0x4f07da,_0x396605=new Set([..._0xaea8f5][_0x2bc093(0xd0)](_0x1aaf67=>_0x1aaf67[_0x2bc093(0xba)]())[_0x2bc093(0xbb)](Boolean)),_0x3ce94d=_0x40c75d?new Set([..._0x40c75d][_0x2bc093(0xd0)](_0x4bc385=>_0x4bc385[_0x2bc093(0xba)]())[_0x2bc093(0xbb)](Boolean)):undefined,_0x11e011=[];for(const _0x272205 of _0x3cf453[_0x2bc093(0xc7)]){for(const _0x526d3a of managedTargetSkillLinkPaths(_0x272205,_0x3cf453)){const _0x148a67=runtimeSkillCodeFromLink(_0x3cf453,_0x526d3a);if(_0x3ce94d&&!_0x3ce94d['has'](_0x148a67))continue;if(_0x396605[_0x2bc093(0xc2)](_0x148a67))continue;_0x11e011[_0x2bc093(0xca)](removeManagedSkillLink(_0x526d3a,_0x3cf453,_0x148a67));}}return _0x11e011;}export function pruneStaleRuntimeSkillCache(_0x2c02e5,_0x42cbb2={}){const _0x270336=a150_0x4f07da,_0x13bf17=new Set([..._0x2c02e5['activeSkillCodes']][_0x270336(0xd0)](_0x56a6c5=>_0x56a6c5['trim']())[_0x270336(0xbb)](Boolean)),_0x4c3cea=_0x2c02e5['pruneSkillCodes']?new Set([..._0x2c02e5[_0x270336(0xab)]][_0x270336(0xd0)](_0x4ee4df=>_0x4ee4df[_0x270336(0xba)]())[_0x270336(0xbb)](Boolean)):undefined,_0x54af8a=_0x2c02e5[_0x270336(0xbc)]??[_0x270336(0xb4),_0x270336(0xc5)],_0x47556c=resolve(getRuntimeSkillCacheRoot(_0x2c02e5['env'],_0x2c02e5['accessKey'],_0x42cbb2),safePathSegment(_0x2c02e5[_0x270336(0xd4)],_0x270336(0xd4))),_0x4a75f9=[];for(const _0x53dfa1 of _0x54af8a){const _0x598979=resolve(_0x47556c,_0x53dfa1);if(!existsSync(_0x598979))continue;for(const _0x5896d4 of readdirSync(_0x598979,{'withFileTypes':!![]})){if(!_0x5896d4[_0x270336(0xd6)]())continue;const _0x29250f=_0x5896d4[_0x270336(0xbe)];if(_0x4c3cea&&!_0x4c3cea[_0x270336(0xc2)](_0x29250f))continue;if(_0x13bf17[_0x270336(0xc2)](_0x29250f))continue;const _0xb4c3f6=resolve(_0x598979,_0x29250f),_0x2e841a=readMetadataIfPresent(resolve(_0xb4c3f6,METADATA_FILE));if(_0x2e841a?.[_0x270336(0xd4)]!==_0x2c02e5['appCode']||_0x2e841a['scope']!==_0x53dfa1||_0x2e841a[_0x270336(0xcf)]!==_0x29250f){_0x4a75f9['push']({'path':_0xb4c3f6,'action':_0x270336(0xd2),'reason':'metadata-mismatch'});continue;}if(isLinkedFromAnyRoot(_0xb4c3f6,_0x2c02e5[_0x270336(0xdd)]??[])){_0x4a75f9[_0x270336(0xca)]({'path':_0xb4c3f6,'action':_0x270336(0xd2),'reason':_0x270336(0xae)});continue;}removeSync(_0xb4c3f6),_0x4a75f9[_0x270336(0xca)]({'path':_0xb4c3f6,'action':_0x270336(0xad)});}}return _0x4a75f9;}export function linkGlobalRuntimeSkills(_0x5107b8,_0x427b32={}){const _0x3e0f6d=a150_0x4f07da,_0x57bfff=resolveSkillSyncPaths(_0x427b32),_0x376ae3=[];for(const _0x32805a of _0x5107b8){if(_0x32805a[_0x3e0f6d(0xb3)]!=='builtin')throw CliErrors[_0x3e0f6d(0xa7)](_0x3e0f6d(0xcc)+_0x32805a['scope']);const _0x197844=requireSkillCode(_0x32805a[_0x3e0f6d(0xd1)]),_0x821592=copyManagedSkillDirectory(_0x32805a['dir'],resolve(_0x57bfff['agentsSkillsDir'],_0x197844));_0x376ae3[_0x3e0f6d(0xca)]({..._0x821592,'contentHash':_0x32805a['contentHash']});}return _0x376ae3;}function ensureManagedSymlink(_0x22c6eb,_0x4bed13,_0x5efdf2,_0x2d9a68){const _0x322395=a150_0x4f07da;mkdirSync(dirname(_0x22c6eb),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x22c6eb)||isDanglingSymlink(_0x22c6eb)){const _0x24c84c=lstatSync(_0x22c6eb);if(!_0x24c84c[_0x322395(0xc1)]())throw CliErrors[_0x322395(0xa7)](_0x322395(0xb9)+_0x22c6eb);const _0x2616ab=resolveSymlinkTarget(_0x22c6eb);if(!isPathInside(realOrResolved(_0x2616ab),realOrResolved(_0x5efdf2[_0x322395(0xd3)])))throw CliErrors['validation'](_0x322395(0xb2)+_0x22c6eb);if(realOrResolved(_0x2616ab)===realOrResolved(_0x4bed13))return{'path':_0x22c6eb,'target':_0x4bed13,'action':_0x322395(0xde)};const _0x1c7b39=readMetadataIfPresent(resolve(_0x2616ab,METADATA_FILE));if(_0x5efdf2[_0x322395(0xb3)]===_0x322395(0xc3)&&(_0x1c7b39?.[_0x322395(0xd4)]!==_0x5efdf2[_0x322395(0xd4)]||_0x1c7b39[_0x322395(0xcf)]!==_0x2d9a68))throw CliErrors[_0x322395(0xa7)](_0x322395(0xc4)+_0x22c6eb);return unlinkSync(_0x22c6eb),symlinkSync(_0x4bed13,_0x22c6eb,_0x322395(0xd5)),{'path':_0x22c6eb,'target':_0x4bed13,'action':'updated'};}return symlinkSync(_0x4bed13,_0x22c6eb,_0x322395(0xd5)),{'path':_0x22c6eb,'target':_0x4bed13,'action':'created'};}function managedTargetSkillLinkPaths(_0x1fdb5f,_0xa633da){const _0x43874c=a150_0x4f07da;if(!existsSync(_0x1fdb5f))return[];const _0xccfe3c=_0xa633da[_0x43874c(0xd4)]+'--';return readdirSync(_0x1fdb5f,{'withFileTypes':!![]})[_0x43874c(0xbb)](_0x28d049=>_0xa633da[_0x43874c(0xb3)]===_0x43874c(0xc3)||_0x28d049[_0x43874c(0xbe)][_0x43874c(0xcd)](_0xccfe3c))[_0x43874c(0xd0)](_0x32b191=>resolve(_0x1fdb5f,_0x32b191[_0x43874c(0xbe)]));}function removeManagedSkillLink(_0x5ce108,_0x169115,_0x17bbf3){const _0x6567e1=a150_0x4f07da,_0x30e504=lstatIfPresent(_0x5ce108);if(!_0x30e504?.[_0x6567e1(0xc1)]())return{'path':_0x5ce108,'action':_0x6567e1(0xd2),'reason':'not-managed-symlink'};const _0x4dbc08=resolveSymlinkTarget(_0x5ce108);if(!isPathInside(realOrResolved(_0x4dbc08),realOrResolved(_0x169115[_0x6567e1(0xd3)])))return{'path':_0x5ce108,'action':_0x6567e1(0xd2),'reason':_0x6567e1(0xb5)};const _0x1757d2=readMetadataIfPresent(resolve(_0x4dbc08,METADATA_FILE));if(_0x169115['scope']==='project'&&(_0x1757d2?.[_0x6567e1(0xd4)]!==_0x169115[_0x6567e1(0xd4)]||_0x1757d2['skillCode']!==_0x17bbf3))return{'path':_0x5ce108,'action':'skipped','reason':'metadata-mismatch'};return unlinkSync(_0x5ce108),{'path':_0x5ce108,'action':_0x6567e1(0xad)};}function isLinkedFromAnyRoot(_0x4c143b,_0x3844a8){const _0x3d744a=a150_0x4f07da,_0x2700ae=realOrResolved(_0x4c143b);for(const _0x3ebb57 of _0x3844a8){if(!existsSync(_0x3ebb57))continue;for(const _0x57da05 of readdirSync(_0x3ebb57,{'withFileTypes':!![]})){if(!_0x57da05[_0x3d744a(0xc1)]())continue;const _0x1de91b=resolve(_0x3ebb57,_0x57da05[_0x3d744a(0xbe)]);if(realOrResolved(resolveSymlinkTarget(_0x1de91b))===_0x2700ae)return!![];}}return![];}function runtimeSkillLinkName(_0x40a54f,_0x4c9fa9){const _0x360500=a150_0x4f07da,_0x13b13b=safePathSegment(_0x4c9fa9,'skillCode');if(_0x40a54f[_0x360500(0xb3)]===_0x360500(0xc3)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x13b13b))throw CliErrors[_0x360500(0xa7)](_0x360500(0xa9)+_0x13b13b);return _0x40a54f[_0x360500(0xb3)]===_0x360500(0xc3)?_0x13b13b:_0x40a54f[_0x360500(0xd4)]+'--'+_0x13b13b;}function runtimeSkillCodeFromLink(_0x203787,_0x986549){const _0x28b482=a150_0x4f07da,_0x34e48a=basename(_0x986549);return _0x203787[_0x28b482(0xb3)]===_0x28b482(0xc3)?_0x34e48a:_0x34e48a[_0x28b482(0xcb)]((_0x203787['appCode']+'--')['length']);}export function copyManagedSkillDirectory(_0xfe4e7e,_0x46dbe3){const _0x5f46ec=a150_0x4f07da,_0x2a50d7=resolve(_0x46dbe3,METADATA_FILE),_0x1d5631=existsSync(_0x46dbe3);if(_0x1d5631){const _0x176223=lstatSync(_0x46dbe3);if(_0x176223[_0x5f46ec(0xc1)]())throw CliErrors[_0x5f46ec(0xa7)](_0x5f46ec(0xc6)+_0x46dbe3);if(!_0x176223[_0x5f46ec(0xd6)]())throw CliErrors[_0x5f46ec(0xa7)]('Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20'+_0x46dbe3);const _0x5e75d6=readMetadataIfPresent(_0x2a50d7);if(_0x5e75d6?.[_0x5f46ec(0xb3)]!==_0x5f46ec(0xb1))throw CliErrors[_0x5f46ec(0xa7)](_0x5f46ec(0xda)+_0x46dbe3);}ensureDirSync(dirname(_0x46dbe3));const _0x15702b=_0x1d5631?readMetadataIfPresent(_0x2a50d7)?.[_0x5f46ec(0xaf)]:undefined,_0x30bcca=readMetadataIfPresent(resolve(_0xfe4e7e,METADATA_FILE))?.['contentHash'];return _0x1d5631&&removeSync(_0x46dbe3),copySkillDirectory(_0xfe4e7e,_0x46dbe3),{'path':_0x46dbe3,'target':_0xfe4e7e,'action':!_0x1d5631?_0x5f46ec(0xce):_0x15702b===_0x30bcca?'unchanged':_0x5f46ec(0xaa)};}function copySkillDirectory(_0x10c86c,_0x467aab){copySync(_0x10c86c,_0x467aab,{'dereference':![],'overwrite':!![],'filter'(_0x3a7003){const _0x146eea=a150_0x32dc;if(lstatSync(_0x3a7003)[_0x146eea(0xc1)]())throw CliErrors[_0x146eea(0xa7)](_0x146eea(0xc0)+_0x3a7003);return!![];}});}
|
|
1
|
+
function a153_0x51f9(_0x4752fc,_0x33dbaf){_0x4752fc=_0x4752fc-0x138;const _0x26ad3b=a153_0x26ad();let _0x51f94c=_0x26ad3b[_0x4752fc];return _0x51f94c;}(function(_0x4af788,_0x51fade){const _0x438772=a153_0x51f9,_0x3b5797=_0x4af788();while(!![]){try{const _0x5900b5=-parseInt(_0x438772(0x141))/0x1+parseInt(_0x438772(0x15c))/0x2*(parseInt(_0x438772(0x14d))/0x3)+parseInt(_0x438772(0x151))/0x4*(-parseInt(_0x438772(0x146))/0x5)+parseInt(_0x438772(0x148))/0x6*(-parseInt(_0x438772(0x16a))/0x7)+-parseInt(_0x438772(0x166))/0x8+parseInt(_0x438772(0x13f))/0x9+parseInt(_0x438772(0x14f))/0xa;if(_0x5900b5===_0x51fade)break;else _0x3b5797['push'](_0x3b5797['shift']());}catch(_0x32e5cd){_0x3b5797['push'](_0x3b5797['shift']());}}}(a153_0x26ad,0x63ff9));import{existsSync,lstatSync,mkdirSync,readdirSync,symlinkSync,unlinkSync}from'node:fs';function a153_0x26ad(){const _0x224f64=['isSymbolicLink','push','validation','name','isDirectory','managedRoot','values','personal','skill','2XAouio','updated','metadata-mismatch','scope','external-symlink','Refusing\x20to\x20shadow\x20reserved\x20Agent\x20Skill\x20in\x20project\x20scope:\x20','dir','not-managed-symlink','metadataPath','has','3081592uqHhtN','set','project','env','7ufiTct','scopes','Refusing\x20to\x20link\x20Skill\x20metadata\x20outside\x20target\x20','appCode','startsWith','skipped','Refusing\x20to\x20overwrite\x20unmanaged\x20symlink:\x20','accessKey','Refusing\x20to\x20overwrite\x20global\x20Skill\x20path:\x20','company','Refusing\x20to\x20copy\x20Skill\x20symlink:\x20','activeSkillCodes','Only\x20builtin\x20Skills\x20can\x20be\x20linked\x20into\x20the\x20global\x20Skill\x20root:\x20','map','skillRoots','2904291EjJJVr','builtin','83502ClYKuH','length','Refusing\x20to\x20overwrite\x20global\x20Skill\x20symlink:\x20','filter','unchanged','3415GTImVp','pruneSkillCodes','2268924iwqHYg','contentHash','Refusing\x20to\x20overwrite\x20unmanaged\x20path:\x20','get','trim','152157pVIcjw','created','11213970rlQJcZ','protectedLinkRoots','1396iEnTtw','skillCode'];a153_0x26ad=function(){return _0x224f64;};return a153_0x26ad();}import{basename,dirname,resolve}from'node:path';import a153_0x609949 from'fs-extra';import{CliErrors}from'../../errors.js';import{METADATA_FILE}from'./constants.js';import{isDanglingSymlink,isPathInside,lstatIfPresent,realOrResolved,resolveSymlinkTarget}from'./fs-utils.js';import{readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillCacheRoot,resolveSkillSyncPaths,safePathSegment}from'./paths.js';const {copySync,ensureDirSync,removeSync}=a153_0x609949,RESERVED_PROJECT_SKILL_CODES=new Set(['lovrabet','runtime-observe','secret-retriever']);export function linkEffectiveRuntimeSkills(_0x255057,_0x2370ef){const _0x3a497d=a153_0x51f9,_0x1ad881=new Map();for(const _0x438609 of _0x255057){const _0x7d0b14=_0x438609[_0x3a497d(0x15b)][_0x3a497d(0x152)];if(!_0x7d0b14)continue;const _0x4c90e3=_0x1ad881[_0x3a497d(0x14b)](_0x7d0b14);(!_0x4c90e3||_0x438609['scope']===_0x3a497d(0x15a))&&_0x1ad881[_0x3a497d(0x167)](_0x7d0b14,_0x438609);}const _0x1e471b=[];for(const _0x800dc4 of _0x1ad881[_0x3a497d(0x159)]()){const _0x529931=requireSkillCode(_0x800dc4[_0x3a497d(0x15b)]),_0x36eb07=readMetadataIfPresent(_0x800dc4['metadataPath']);if(_0x36eb07?.[_0x3a497d(0x16d)]!==_0x2370ef[_0x3a497d(0x16d)]||_0x36eb07[_0x3a497d(0x152)]!==_0x529931)throw CliErrors['validation'](_0x3a497d(0x16c)+_0x2370ef[_0x3a497d(0x16d)]+':\x20'+_0x800dc4[_0x3a497d(0x164)]);const _0x325c10=runtimeSkillLinkName(_0x2370ef,_0x529931);for(const _0x1f5ae8 of _0x2370ef[_0x3a497d(0x13e)]){_0x1e471b['push'](ensureManagedSymlink(resolve(_0x1f5ae8,_0x325c10),_0x800dc4[_0x3a497d(0x162)],_0x2370ef,_0x529931));}}return _0x1e471b;}export function pruneStaleRuntimeSkillLinks(_0x2878b1,_0x30172a,_0x51be02){const _0x2600ff=a153_0x51f9,_0x1dcacd=new Set([..._0x30172a][_0x2600ff(0x13d)](_0x241302=>_0x241302[_0x2600ff(0x14c)]())[_0x2600ff(0x144)](Boolean)),_0x194384=_0x51be02?new Set([..._0x51be02][_0x2600ff(0x13d)](_0x2197de=>_0x2197de[_0x2600ff(0x14c)]())[_0x2600ff(0x144)](Boolean)):undefined,_0x332939=[];for(const _0x413520 of _0x2878b1[_0x2600ff(0x13e)]){for(const _0x517a94 of managedTargetSkillLinkPaths(_0x413520,_0x2878b1)){const _0x1b2522=runtimeSkillCodeFromLink(_0x2878b1,_0x517a94);if(_0x194384&&!_0x194384[_0x2600ff(0x165)](_0x1b2522))continue;if(_0x1dcacd[_0x2600ff(0x165)](_0x1b2522))continue;_0x332939[_0x2600ff(0x154)](removeManagedSkillLink(_0x517a94,_0x2878b1,_0x1b2522));}}return _0x332939;}export function pruneStaleRuntimeSkillCache(_0xc235ec,_0x1afbf0={}){const _0x6047bf=a153_0x51f9,_0x3a2a44=new Set([..._0xc235ec[_0x6047bf(0x13b)]]['map'](_0x5f566c=>_0x5f566c[_0x6047bf(0x14c)]())[_0x6047bf(0x144)](Boolean)),_0x1d2375=_0xc235ec[_0x6047bf(0x147)]?new Set([..._0xc235ec[_0x6047bf(0x147)]][_0x6047bf(0x13d)](_0x3991eb=>_0x3991eb[_0x6047bf(0x14c)]())['filter'](Boolean)):undefined,_0x4ad6bd=_0xc235ec[_0x6047bf(0x16b)]??[_0x6047bf(0x15a),_0x6047bf(0x139)],_0x8870b2=resolve(getRuntimeSkillCacheRoot(_0xc235ec[_0x6047bf(0x169)],_0xc235ec[_0x6047bf(0x171)],_0x1afbf0),safePathSegment(_0xc235ec[_0x6047bf(0x16d)],_0x6047bf(0x16d))),_0x4226fe=[];for(const _0x1ea0c8 of _0x4ad6bd){const _0x328e0c=resolve(_0x8870b2,_0x1ea0c8);if(!existsSync(_0x328e0c))continue;for(const _0x2b1e8f of readdirSync(_0x328e0c,{'withFileTypes':!![]})){if(!_0x2b1e8f[_0x6047bf(0x157)]())continue;const _0x5a5e96=_0x2b1e8f[_0x6047bf(0x156)];if(_0x1d2375&&!_0x1d2375[_0x6047bf(0x165)](_0x5a5e96))continue;if(_0x3a2a44['has'](_0x5a5e96))continue;const _0x39cd4f=resolve(_0x328e0c,_0x5a5e96),_0x1daea7=readMetadataIfPresent(resolve(_0x39cd4f,METADATA_FILE));if(_0x1daea7?.['appCode']!==_0xc235ec[_0x6047bf(0x16d)]||_0x1daea7[_0x6047bf(0x15f)]!==_0x1ea0c8||_0x1daea7[_0x6047bf(0x152)]!==_0x5a5e96){_0x4226fe['push']({'path':_0x39cd4f,'action':_0x6047bf(0x16f),'reason':_0x6047bf(0x15e)});continue;}if(isLinkedFromAnyRoot(_0x39cd4f,_0xc235ec[_0x6047bf(0x150)]??[])){_0x4226fe['push']({'path':_0x39cd4f,'action':'skipped','reason':'linked-from-protected-root'});continue;}removeSync(_0x39cd4f),_0x4226fe['push']({'path':_0x39cd4f,'action':'removed'});}}return _0x4226fe;}export function linkGlobalRuntimeSkills(_0x277ce0,_0x3135d9={}){const _0x3dbef9=a153_0x51f9,_0x2c86ad=resolveSkillSyncPaths(_0x3135d9),_0xd4371b=[];for(const _0x4bed66 of _0x277ce0){if(_0x4bed66[_0x3dbef9(0x15f)]!=='builtin')throw CliErrors[_0x3dbef9(0x155)](_0x3dbef9(0x13c)+_0x4bed66[_0x3dbef9(0x15f)]);const _0x5f05ef=requireSkillCode(_0x4bed66[_0x3dbef9(0x15b)]),_0x3988c2=copyManagedSkillDirectory(_0x4bed66[_0x3dbef9(0x162)],resolve(_0x2c86ad['agentsSkillsDir'],_0x5f05ef));_0xd4371b[_0x3dbef9(0x154)]({..._0x3988c2,'contentHash':_0x4bed66[_0x3dbef9(0x149)]});}return _0xd4371b;}function ensureManagedSymlink(_0x65f586,_0x3a4d37,_0x314b21,_0xaf4571){const _0x2f9f5b=a153_0x51f9;mkdirSync(dirname(_0x65f586),{'recursive':!![],'mode':0x1c0});if(existsSync(_0x65f586)||isDanglingSymlink(_0x65f586)){const _0x50d761=lstatSync(_0x65f586);if(!_0x50d761[_0x2f9f5b(0x153)]())throw CliErrors[_0x2f9f5b(0x155)](_0x2f9f5b(0x14a)+_0x65f586);const _0x6cd575=resolveSymlinkTarget(_0x65f586);if(!isPathInside(realOrResolved(_0x6cd575),realOrResolved(_0x314b21[_0x2f9f5b(0x158)])))throw CliErrors[_0x2f9f5b(0x155)](_0x2f9f5b(0x170)+_0x65f586);if(realOrResolved(_0x6cd575)===realOrResolved(_0x3a4d37))return{'path':_0x65f586,'target':_0x3a4d37,'action':_0x2f9f5b(0x145)};const _0x27c59c=readMetadataIfPresent(resolve(_0x6cd575,METADATA_FILE));if(_0x314b21[_0x2f9f5b(0x15f)]===_0x2f9f5b(0x168)&&(_0x27c59c?.[_0x2f9f5b(0x16d)]!==_0x314b21[_0x2f9f5b(0x16d)]||_0x27c59c[_0x2f9f5b(0x152)]!==_0xaf4571))throw CliErrors[_0x2f9f5b(0x155)]('Refusing\x20to\x20overwrite\x20managed\x20Skill\x20link\x20owned\x20by\x20another\x20app\x20or\x20code:\x20'+_0x65f586);return unlinkSync(_0x65f586),symlinkSync(_0x3a4d37,_0x65f586,_0x2f9f5b(0x162)),{'path':_0x65f586,'target':_0x3a4d37,'action':_0x2f9f5b(0x15d)};}return symlinkSync(_0x3a4d37,_0x65f586,_0x2f9f5b(0x162)),{'path':_0x65f586,'target':_0x3a4d37,'action':_0x2f9f5b(0x14e)};}function managedTargetSkillLinkPaths(_0x3b6a29,_0x4fd073){const _0x525f57=a153_0x51f9;if(!existsSync(_0x3b6a29))return[];const _0xc279dc=_0x4fd073[_0x525f57(0x16d)]+'--';return readdirSync(_0x3b6a29,{'withFileTypes':!![]})['filter'](_0x1158f2=>_0x4fd073[_0x525f57(0x15f)]===_0x525f57(0x168)||_0x1158f2[_0x525f57(0x156)][_0x525f57(0x16e)](_0xc279dc))[_0x525f57(0x13d)](_0x33f590=>resolve(_0x3b6a29,_0x33f590['name']));}function removeManagedSkillLink(_0x407149,_0x1be8f3,_0x8e2b67){const _0x15ab48=a153_0x51f9,_0x2123e1=lstatIfPresent(_0x407149);if(!_0x2123e1?.[_0x15ab48(0x153)]())return{'path':_0x407149,'action':_0x15ab48(0x16f),'reason':_0x15ab48(0x163)};const _0xa9dbd5=resolveSymlinkTarget(_0x407149);if(!isPathInside(realOrResolved(_0xa9dbd5),realOrResolved(_0x1be8f3[_0x15ab48(0x158)])))return{'path':_0x407149,'action':_0x15ab48(0x16f),'reason':_0x15ab48(0x160)};const _0x583495=readMetadataIfPresent(resolve(_0xa9dbd5,METADATA_FILE));if(_0x1be8f3[_0x15ab48(0x15f)]===_0x15ab48(0x168)&&(_0x583495?.[_0x15ab48(0x16d)]!==_0x1be8f3[_0x15ab48(0x16d)]||_0x583495[_0x15ab48(0x152)]!==_0x8e2b67))return{'path':_0x407149,'action':_0x15ab48(0x16f),'reason':_0x15ab48(0x15e)};return unlinkSync(_0x407149),{'path':_0x407149,'action':'removed'};}function isLinkedFromAnyRoot(_0x4c8d46,_0x16afe9){const _0x3b1b4c=a153_0x51f9,_0x2b941c=realOrResolved(_0x4c8d46);for(const _0x35987d of _0x16afe9){if(!existsSync(_0x35987d))continue;for(const _0xd0ab06 of readdirSync(_0x35987d,{'withFileTypes':!![]})){if(!_0xd0ab06[_0x3b1b4c(0x153)]())continue;const _0x4bc0ff=resolve(_0x35987d,_0xd0ab06[_0x3b1b4c(0x156)]);if(realOrResolved(resolveSymlinkTarget(_0x4bc0ff))===_0x2b941c)return!![];}}return![];}function runtimeSkillLinkName(_0x4961d8,_0x1d30d9){const _0x4d80fe=a153_0x51f9,_0x5c8651=safePathSegment(_0x1d30d9,_0x4d80fe(0x152));if(_0x4961d8[_0x4d80fe(0x15f)]===_0x4d80fe(0x168)&&RESERVED_PROJECT_SKILL_CODES['has'](_0x5c8651))throw CliErrors[_0x4d80fe(0x155)](_0x4d80fe(0x161)+_0x5c8651);return _0x4961d8['scope']===_0x4d80fe(0x168)?_0x5c8651:_0x4961d8[_0x4d80fe(0x16d)]+'--'+_0x5c8651;}function runtimeSkillCodeFromLink(_0x5b1450,_0x53e875){const _0x34e42d=a153_0x51f9,_0x15a2ef=basename(_0x53e875);return _0x5b1450['scope']===_0x34e42d(0x168)?_0x15a2ef:_0x15a2ef['slice']((_0x5b1450[_0x34e42d(0x16d)]+'--')[_0x34e42d(0x142)]);}export function copyManagedSkillDirectory(_0x27a8fb,_0xda3db7){const _0x189e11=a153_0x51f9,_0x3d52a0=resolve(_0xda3db7,METADATA_FILE),_0x4adb64=existsSync(_0xda3db7);if(_0x4adb64){const _0x291ac2=lstatSync(_0xda3db7);if(_0x291ac2[_0x189e11(0x153)]())throw CliErrors[_0x189e11(0x155)](_0x189e11(0x143)+_0xda3db7);if(!_0x291ac2[_0x189e11(0x157)]())throw CliErrors[_0x189e11(0x155)](_0x189e11(0x138)+_0xda3db7);const _0xaa82bf=readMetadataIfPresent(_0x3d52a0);if(_0xaa82bf?.[_0x189e11(0x15f)]!==_0x189e11(0x140))throw CliErrors[_0x189e11(0x155)]('Refusing\x20to\x20overwrite\x20unmanaged\x20global\x20Skill\x20directory:\x20'+_0xda3db7);}ensureDirSync(dirname(_0xda3db7));const _0x174c22=_0x4adb64?readMetadataIfPresent(_0x3d52a0)?.['contentHash']:undefined,_0x4dcf85=readMetadataIfPresent(resolve(_0x27a8fb,METADATA_FILE))?.['contentHash'];return _0x4adb64&&removeSync(_0xda3db7),copySkillDirectory(_0x27a8fb,_0xda3db7),{'path':_0xda3db7,'target':_0x27a8fb,'action':!_0x4adb64?'created':_0x174c22===_0x4dcf85?_0x189e11(0x145):_0x189e11(0x15d)};}function copySkillDirectory(_0x28c7e4,_0x1d3eeb){copySync(_0x28c7e4,_0x1d3eeb,{'dereference':![],'overwrite':!![],'filter'(_0x2157bd){const _0x4f30e3=a153_0x51f9;if(lstatSync(_0x2157bd)[_0x4f30e3(0x153)]())throw CliErrors['validation'](_0x4f30e3(0x13a)+_0x2157bd);return!![];}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2364c,_0x29819d){const _0x9b8d4d=a154_0x238d,_0x49205b=_0x2364c();while(!![]){try{const _0x3b86ed=parseInt(_0x9b8d4d(0x1cc))/0x1+-parseInt(_0x9b8d4d(0x1ce))/0x2*(-parseInt(_0x9b8d4d(0x1b3))/0x3)+parseInt(_0x9b8d4d(0x1a4))/0x4*(parseInt(_0x9b8d4d(0x1bb))/0x5)+-parseInt(_0x9b8d4d(0x1a9))/0x6*(-parseInt(_0x9b8d4d(0x1b9))/0x7)+-parseInt(_0x9b8d4d(0x1a5))/0x8+parseInt(_0x9b8d4d(0x1a1))/0x9+-parseInt(_0x9b8d4d(0x1b6))/0xa*(-parseInt(_0x9b8d4d(0x1a8))/0xb);if(_0x3b86ed===_0x29819d)break;else _0x49205b['push'](_0x49205b['shift']());}catch(_0x3deedf){_0x49205b['push'](_0x49205b['shift']());}}}(a154_0x4b32,0x8d110));import{existsSync,readdirSync}from'node:fs';function a154_0x4b32(){const _0x1dd5c6=['from','38300XUPQmU','6734624Ruhzrk','isArray','isSymbolicLink','3018169fbMOvN','1146WvTZIl','env','get','scope','builtin','scopes','link','skillRoots','dir','map','8241axhETJ','appCode','skillCode','10lnyBFL','isDirectory','set','1687jEapRl','Runtime\x20Skill\x20install\x20target\x20app\x20mismatch:\x20','235fleDqH','skillMdPath','trim','name','startsWith','code','tags','sort','source','cache','push','localeCompare','values','filter','includes','linkedPath','\x20!=\x20','17768uVxSOc','has','328wSinsa','1628325uUpEpQ','linkedPaths'];a154_0x4b32=function(){return _0x1dd5c6;};return a154_0x4b32();}import{resolve}from'node:path';function a154_0x238d(_0x297e19,_0xa86be2){_0x297e19=_0x297e19-0x1a1;const _0x4b3279=a154_0x4b32();let _0x238d71=_0x4b3279[_0x297e19];return _0x238d71;}import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{readMetadataIfPresent}from'./metadata.js';import{getRuntimeSkillCacheRoot,safePathSegment}from'./paths.js';import{isRuntimeSkillScope,normalizeRuntimeSkillScopes}from'./scopes.js';export function listLocalRuntimeSkills(_0x2bfe5c,_0x179ce7,_0x37d4c1={}){const _0x238ae0=a154_0x238d,_0x44e12f=safePathSegment(_0x2bfe5c[_0x238ae0(0x1b4)],_0x238ae0(0x1b4));if(_0x179ce7[_0x238ae0(0x1b4)]!==_0x44e12f)throw CliErrors['validation'](_0x238ae0(0x1ba)+_0x179ce7['appCode']+_0x238ae0(0x1cb)+_0x44e12f);const _0x371c46=normalizeRuntimeSkillScopes(_0x2bfe5c[_0x238ae0(0x1ae)]),_0x14c2a5=new Set(_0x371c46),_0x5ba057=_0x2bfe5c['code']?.[_0x238ae0(0x1bd)](),_0x37bbfa=new Map(),_0x528cfc=resolve(getRuntimeSkillCacheRoot(_0x2bfe5c[_0x238ae0(0x1aa)],_0x2bfe5c['accessKey'],_0x37d4c1),_0x44e12f);for(const _0x550520 of _0x371c46){for(const _0x3d865b of localSkillEntryDirs(resolve(_0x528cfc,_0x550520))){collectLocalRuntimeSkill(_0x37bbfa,_0x3d865b,{'appCode':_0x44e12f,'scopes':_0x14c2a5,'code':_0x5ba057,'source':_0x238ae0(0x1c4)});}}for(const _0x274f2f of _0x179ce7[_0x238ae0(0x1b0)]){for(const _0x4f5d7b of localSkillLinkCandidates(_0x274f2f,_0x179ce7,_0x14c2a5)){collectLocalRuntimeSkill(_0x37bbfa,_0x4f5d7b,{'appCode':_0x44e12f,'scopes':_0x14c2a5,'code':_0x5ba057,'source':_0x238ae0(0x1af),'linkedPath':_0x4f5d7b});}}return Array[_0x238ae0(0x1a3)](_0x37bbfa[_0x238ae0(0x1c7)]())[_0x238ae0(0x1c2)](compareLocalRuntimeSkills);}function localSkillEntryDirs(_0x13b92b){const _0x624e93=a154_0x238d;if(!existsSync(_0x13b92b))return[];return readdirSync(_0x13b92b,{'withFileTypes':!![]})[_0x624e93(0x1c8)](_0x3e860c=>_0x3e860c[_0x624e93(0x1b7)]()||_0x3e860c[_0x624e93(0x1a7)]())[_0x624e93(0x1b2)](_0x2a2159=>resolve(_0x13b92b,_0x2a2159[_0x624e93(0x1be)]));}function localSkillLinkCandidates(_0x364ab9,_0x53a760,_0xc16e74){const _0x5737d8=a154_0x238d;if(!existsSync(_0x364ab9))return[];const _0x2750cf=_0x53a760[_0x5737d8(0x1b4)]+'--';return readdirSync(_0x364ab9,{'withFileTypes':!![]})[_0x5737d8(0x1c8)](_0x47969b=>_0x47969b[_0x5737d8(0x1b7)]()||_0x47969b['isSymbolicLink']())[_0x5737d8(0x1c8)](_0x1a572d=>_0x53a760[_0x5737d8(0x1ac)]==='project'||_0x1a572d[_0x5737d8(0x1be)][_0x5737d8(0x1bf)](_0x2750cf)||_0xc16e74['has'](_0x5737d8(0x1ad)))[_0x5737d8(0x1b2)](_0x3341c1=>resolve(_0x364ab9,_0x3341c1[_0x5737d8(0x1be)]));}function collectLocalRuntimeSkill(_0x510fa9,_0x351ebc,_0x485fc4){const _0x5521b8=a154_0x238d,_0x518300=resolve(_0x351ebc,METADATA_FILE),_0x2a9853=readMetadataIfPresent(_0x518300);if(!_0x2a9853)return;if(_0x2a9853[_0x5521b8(0x1b4)]!==_0x485fc4[_0x5521b8(0x1b4)])return;if(!isRuntimeSkillScope(_0x2a9853['scope'])||!_0x485fc4['scopes'][_0x5521b8(0x1cd)](_0x2a9853[_0x5521b8(0x1ac)]))return;const _0x368e97=_0x2a9853[_0x5521b8(0x1b5)]?.[_0x5521b8(0x1bd)]();if(!_0x368e97)return;if(_0x485fc4[_0x5521b8(0x1c0)]&&_0x368e97!==_0x485fc4['code'])return;const _0x432e41=_0x2a9853[_0x5521b8(0x1ac)]+':'+_0x368e97,_0x391265=_0x485fc4[_0x5521b8(0x1ca)]?[_0x485fc4[_0x5521b8(0x1ca)]]:[],_0x325b06=_0x510fa9[_0x5521b8(0x1ab)](_0x432e41);if(_0x325b06){_0x485fc4['source']===_0x5521b8(0x1c4)&&(_0x325b06['dir']=_0x351ebc,_0x325b06['cacheDir']=_0x351ebc,_0x325b06[_0x5521b8(0x1bc)]=resolve(_0x351ebc,SKILL_FILE),_0x325b06['metadataPath']=_0x518300);for(const _0x23ee10 of _0x391265){!_0x325b06['linkedPaths'][_0x5521b8(0x1c9)](_0x23ee10)&&_0x325b06[_0x5521b8(0x1a2)][_0x5521b8(0x1c5)](_0x23ee10);}_0x325b06[_0x5521b8(0x1a2)]['sort']();return;}_0x510fa9[_0x5521b8(0x1b8)](_0x432e41,{..._0x2a9853,'tags':Array[_0x5521b8(0x1a6)](_0x2a9853[_0x5521b8(0x1c1)])?_0x2a9853[_0x5521b8(0x1c1)]:[],'scope':_0x2a9853['scope'],'source':'local','dir':_0x351ebc,'cacheDir':_0x485fc4[_0x5521b8(0x1c3)]===_0x5521b8(0x1c4)?_0x351ebc:undefined,'skillMdPath':resolve(_0x351ebc,SKILL_FILE),'metadataPath':_0x518300,'linkedPaths':_0x391265});}function compareLocalRuntimeSkills(_0x5d31dd,_0x510c66){const _0x29e1f8=a154_0x238d,_0xe6c169={'personal':0x0,'company':0x1,'builtin':0x2};return _0xe6c169[_0x5d31dd[_0x29e1f8(0x1ac)]]-_0xe6c169[_0x510c66[_0x29e1f8(0x1ac)]]||_0x5d31dd['skillCode'][_0x29e1f8(0x1c6)](_0x510c66[_0x29e1f8(0x1b5)])||_0x5d31dd[_0x29e1f8(0x1b1)][_0x29e1f8(0x1c6)](_0x510c66[_0x29e1f8(0x1b1)]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xf0da54,_0xb9f9c9){const _0x4e4953=a155_0x4cc9,_0xf7efb5=_0xf0da54();while(!![]){try{const _0x500338=-parseInt(_0x4e4953(0x80))/0x1*(-parseInt(_0x4e4953(0x95))/0x2)+-parseInt(_0x4e4953(0x7b))/0x3*(-parseInt(_0x4e4953(0x8b))/0x4)+-parseInt(_0x4e4953(0x7e))/0x5+parseInt(_0x4e4953(0x81))/0x6*(parseInt(_0x4e4953(0x91))/0x7)+parseInt(_0x4e4953(0x83))/0x8*(parseInt(_0x4e4953(0x98))/0x9)+parseInt(_0x4e4953(0x8a))/0xa*(-parseInt(_0x4e4953(0x74))/0xb)+parseInt(_0x4e4953(0x77))/0xc*(parseInt(_0x4e4953(0x85))/0xd);if(_0x500338===_0xb9f9c9)break;else _0xf7efb5['push'](_0xf7efb5['shift']());}catch(_0x2d8e5b){_0xf7efb5['push'](_0xf7efb5['shift']());}}}(a155_0x4fd6,0x53916));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(_0x3bccad){const _0x2287bd=a155_0x4cc9;return _0x3bccad[_0x2287bd(0x93)]??Buffer['from'](_0x3bccad[_0x2287bd(0x87)]??'','utf8');}function a155_0x4cc9(_0x2547cd,_0x54ff84){_0x2547cd=_0x2547cd-0x74;const _0x4fd625=a155_0x4fd6();let _0x4cc905=_0x4fd625[_0x2547cd];return _0x4cc905;}export function fileText(_0x571301){const _0x10e122=a155_0x4cc9;return fileContent(_0x571301)['toString'](_0x10e122(0xa0));}export function normalizeLocalFiles(_0x5b7067){const _0x1906c0=a155_0x4cc9;if(!Array['isArray'](_0x5b7067)||_0x5b7067['length']===0x0)return[];const _0x59bd4f=new Map();for(const _0x144605 of _0x5b7067){if(!_0x144605||typeof _0x144605!==_0x1906c0(0x8e)||typeof _0x144605[_0x1906c0(0x96)]!=='string')throw CliErrors[_0x1906c0(0x97)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x1be04a=normalizeSkillRelativePath(_0x144605[_0x1906c0(0x96)]);if(_0x59bd4f[_0x1906c0(0x7c)](_0x1be04a))throw CliErrors[_0x1906c0(0x97)](_0x1906c0(0x9c)+_0x1be04a);if(_0x144605['bytes']!==undefined&&!Buffer[_0x1906c0(0x9d)](_0x144605[_0x1906c0(0x93)]))throw CliErrors[_0x1906c0(0x97)](_0x1906c0(0x99)+_0x1be04a);if(_0x144605[_0x1906c0(0x93)]===undefined&&typeof _0x144605[_0x1906c0(0x87)]!==_0x1906c0(0x75))throw CliErrors[_0x1906c0(0x97)](_0x1906c0(0x90)+_0x1be04a);const _0x5ec9e7=fileContent(_0x144605);_0x59bd4f['set'](_0x1be04a,{'path':_0x1be04a,'bytes':_0x5ec9e7});}return Array[_0x1906c0(0x8d)](_0x59bd4f[_0x1906c0(0x7d)]())['sort'](compareSkillFiles);}export function normalizeManifestFiles(_0x5d2128){const _0x4f58a4=a155_0x4cc9;if(!Array['isArray'](_0x5d2128)||_0x5d2128[_0x4f58a4(0x8f)]===0x0)return[];const _0xec047b=new Map();for(const _0x5efbe1 of _0x5d2128){if(!_0x5efbe1||typeof _0x5efbe1!==_0x4f58a4(0x8e)||typeof _0x5efbe1[_0x4f58a4(0x96)]!==_0x4f58a4(0x75))throw CliErrors[_0x4f58a4(0x97)]('Skill\x20file\x20path\x20must\x20be\x20text.');const _0x30a363=normalizeSkillRelativePath(_0x5efbe1[_0x4f58a4(0x96)]);if(_0xec047b['has'](_0x30a363))throw CliErrors[_0x4f58a4(0x97)](_0x4f58a4(0x9c)+_0x30a363);if(!isSha256Hex(_0x5efbe1[_0x4f58a4(0xa1)]))throw CliErrors[_0x4f58a4(0x97)](_0x4f58a4(0x7f)+_0x30a363);if(!Number[_0x4f58a4(0x7a)](_0x5efbe1['size'])||_0x5efbe1['size']<0x0)throw CliErrors[_0x4f58a4(0x97)]('Skill\x20file\x20size\x20is\x20invalid:\x20'+_0x30a363);_0xec047b[_0x4f58a4(0x86)](_0x30a363,{'path':_0x30a363,'sha256':_0x5efbe1['sha256']['toLowerCase'](),'size':_0x5efbe1[_0x4f58a4(0x92)]});}return Array[_0x4f58a4(0x8d)](_0xec047b['values']())[_0x4f58a4(0x79)](compareSkillFiles);}export function scanSkillDirectory(_0xab2310,_0x5c58d7={}){const _0x5e2a37=a155_0x4cc9,_0x575601=realpathSync(_0xab2310),_0xc7eb97=canonicalExcludedFilePaths(_0x5c58d7[_0x5e2a37(0x9f)]),_0x956c82=[];function _0x4cb614(_0x2a3e37){const _0x4ed3d9=_0x5e2a37,_0x132843=readdirSync(_0x2a3e37,{'withFileTypes':!![]})['sort']((_0xd84e88,_0x15bc37)=>_0xd84e88[_0x4ed3d9(0x82)]['localeCompare'](_0x15bc37[_0x4ed3d9(0x82)]));for(const _0x1cee63 of _0x132843){if(_0x1cee63['isDirectory']()&&IGNORED_DIR_NAMES[_0x4ed3d9(0x7c)](_0x1cee63[_0x4ed3d9(0x82)]))continue;if(IGNORED_FILE_NAMES[_0x4ed3d9(0x7c)](_0x1cee63[_0x4ed3d9(0x82)]))continue;const _0x169a87=resolve(_0x2a3e37,_0x1cee63[_0x4ed3d9(0x82)]);if(isExcludedFilePath(_0x169a87,_0xc7eb97))continue;if(_0x1cee63[_0x4ed3d9(0x9e)]())throw CliErrors['validation'](_0x4ed3d9(0x94)+_0x169a87);const _0x22db87=toPosixPath(relative(_0x575601,_0x169a87));if(_0x1cee63[_0x4ed3d9(0x84)]()){_0x4cb614(_0x169a87);continue;}if(!_0x1cee63[_0x4ed3d9(0x76)]())continue;validateSkillRelativePath(_0x22db87);const _0x5b02fc=readFileSync(_0x169a87);_0x956c82[_0x4ed3d9(0x9a)]({'path':_0x22db87,'bytes':_0x5b02fc});}}return _0x4cb614(_0x575601),normalizeLocalFiles(_0x956c82);}function canonicalExcludedFilePaths(_0x15adc2){const _0x4314b6=a155_0x4cc9,_0x31ec14=new Set();for(const _0x8fc049 of _0x15adc2??[]){const _0x43fef9=resolve(_0x8fc049);_0x31ec14['add'](_0x43fef9);try{_0x31ec14[_0x4314b6(0x78)](realpathSync(_0x43fef9));}catch{}}return _0x31ec14;}function isExcludedFilePath(_0x1b35c7,_0xe68571){const _0xdf6ec9=a155_0x4cc9;if(_0xe68571[_0xdf6ec9(0x7c)](_0x1b35c7))return!![];if(_0xe68571[_0xdf6ec9(0x92)]===0x0)return![];try{return _0xe68571['has'](realpathSync(_0x1b35c7));}catch{return![];}}export function compareSkillFiles(_0x49dd4a,_0x1a5ebb){const _0x773f76=a155_0x4cc9;if(_0x49dd4a[_0x773f76(0x96)]===SKILL_FILE)return _0x1a5ebb[_0x773f76(0x96)]===SKILL_FILE?0x0:-0x1;if(_0x1a5ebb[_0x773f76(0x96)]===SKILL_FILE)return 0x1;return Buffer['compare'](Buffer[_0x773f76(0x8d)](_0x49dd4a[_0x773f76(0x96)],'utf8'),Buffer[_0x773f76(0x8d)](_0x1a5ebb[_0x773f76(0x96)],_0x773f76(0xa0)));}export function normalizeSkillRelativePath(_0x284ee8){const _0x30b8ba=toPosixPath(_0x284ee8['trim']());return validateSkillRelativePath(_0x30b8ba),_0x30b8ba;}export function validateSkillRelativePath(_0x209e48){const _0x26c40a=a155_0x4cc9;if(!_0x209e48||_0x209e48[_0x26c40a(0x9b)]('/')||_0x209e48[_0x26c40a(0x88)]('//'))throw CliErrors[_0x26c40a(0x97)](_0x26c40a(0xa2)+_0x209e48);for(const _0x46c1f3 of _0x209e48[_0x26c40a(0x8c)]('/')){if(!_0x46c1f3||_0x46c1f3==='.'||_0x46c1f3==='..')throw CliErrors['validation'](_0x26c40a(0xa2)+_0x209e48);}}function a155_0x4fd6(){const _0xa2ea3a=['isFile','298092kzSxMf','add','sort','isSafeInteger','68271xImEfQ','has','values','2055075vQFewr','Skill\x20file\x20sha256\x20is\x20invalid:\x20','682XgyQMN','30wiqVUU','name','809808mPMgQn','isDirectory','221DuVUPB','set','content','includes','replace','1040EXSBEp','4SylGxw','split','from','object','length','Skill\x20file\x20content\x20must\x20be\x20text\x20or\x20bytes:\x20','320341VtlBjW','size','bytes','Skill\x20directory\x20contains\x20unsupported\x20symlink:\x20','388lURcsJ','path','validation','18gDkMEC','Skill\x20file\x20bytes\x20must\x20be\x20a\x20Buffer:\x20','push','startsWith','Duplicate\x20Skill\x20file\x20path:\x20','isBuffer','isSymbolicLink','excludedFilePaths','utf8','sha256','Unsafe\x20Skill\x20file\x20path:\x20','27005LzbxpW','string'];a155_0x4fd6=function(){return _0xa2ea3a;};return a155_0x4fd6();}export function toPosixPath(_0x2f89bd){const _0x537082=a155_0x4cc9;return _0x2f89bd[_0x537082(0x89)](/\\/g,'/');}export function isSha256Hex(_0x159049){const _0x126fd8=a155_0x4cc9;return typeof _0x159049===_0x126fd8(0x75)&&/^[a-fA-F0-9]{64}$/['test'](_0x159049);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x56639d,_0x395114){const _0x12050a=a153_0xb6f0,_0x1f2eef=_0x56639d();while(!![]){try{const _0x5efecd=parseInt(_0x12050a(0x1ea))/0x1*(parseInt(_0x12050a(0x20e))/0x2)+-parseInt(_0x12050a(0x1ee))/0x3+-parseInt(_0x12050a(0x209))/0x4*(parseInt(_0x12050a(0x1fe))/0x5)+parseInt(_0x12050a(0x1ff))/0x6+parseInt(_0x12050a(0x212))/0x7+-parseInt(_0x12050a(0x1f4))/0x8+-parseInt(_0x12050a(0x1e9))/0x9*(-parseInt(_0x12050a(0x203))/0xa);if(_0x5efecd===_0x395114)break;else _0x1f2eef['push'](_0x1f2eef['shift']());}catch(_0x432954){_0x1f2eef['push'](_0x1f2eef['shift']());}}}(a153_0x245c,0x890c7));import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x5d09af,_0x3d490f,_0x4224e9){const _0x5a622f=a153_0xb6f0,_0x6ea353=requireSkillCode(_0x5d09af),_0x5df971=requirePackageBytes(_0x6ea353,_0x4224e9['packageBytes']),_0x68f4f0=extractDownloadedPackage(_0x5df971),_0x1129b8=_0x68f4f0[_0x5a622f(0x20b)](_0x3dcaba=>_0x3dcaba['path']===SKILL_FILE);if(!_0x1129b8)throw CliErrors[_0x5a622f(0x1fc)](_0x5a622f(0x1f8)+SKILL_FILE+':\x20'+_0x6ea353);const _0x4e2413=withMaterializedSkillFrontmatter(_0x68f4f0,_0x5d09af,_0x6ea353),_0xab2d2a=_0x4e2413[_0x5a622f(0x20b)](_0x5bfc8d=>_0x5bfc8d['path']===SKILL_FILE),_0x182a33=fileText(_0xab2d2a),_0x121f8e=getRuntimeSkillDir(_0x4224e9[_0x5a622f(0x205)],_0x4224e9[_0x5a622f(0x211)],_0x4224e9[_0x5a622f(0x220)],_0x3d490f,_0x6ea353,_0x4224e9['paths']),_0x440ee8=resolve(_0x121f8e,SKILL_FILE),_0xe232ca=resolve(_0x121f8e,METADATA_FILE),_0x363ede=contentHash(_0x182a33),_0x429a6a=readMetadataIfPresent(_0xe232ca)?.[_0x5a622f(0x206)];ensurePulledFilesCanBeOverwritten(_0x121f8e,_0xe232ca,_0x4e2413,_0x4224e9[_0x5a622f(0x213)]===!![]),mkdirSync(_0x121f8e,{'recursive':!![],'mode':0x1c0});const _0x2f8e8b=existsSync(_0x440ee8)?readFileSync(_0x440ee8,_0x5a622f(0x214)):undefined;return materializeFiles(_0x121f8e,_0x4e2413),removeStaleManagedFiles(_0x121f8e,_0x429a6a,_0x4e2413),writeJsonAtomic(_0xe232ca,buildMetadata(_0x5d09af,_0x3d490f,_0x4224e9[_0x5a622f(0x220)],_0x363ede,_0x4224e9[_0x5a622f(0x20d)],_0x4e2413,_0x5df971)),{'skill':_0x5d09af,'scope':_0x3d490f,'dir':_0x121f8e,'skillMdPath':_0x440ee8,'metadataPath':_0xe232ca,'contentHash':_0x363ede,'changed':_0x2f8e8b!==_0x182a33};}export function reuseMaterializedRuntimeSkill(_0x438104,_0x56f308,_0x4d214e){const _0x29d55a=a153_0xb6f0,_0x3c7043=_0x438104[_0x29d55a(0x1ed)]?.[_0x29d55a(0x202)]();if(!_0x3c7043)return undefined;const _0x4ce162=requireSkillCode(_0x438104),_0x38f82d=getRuntimeSkillDir(_0x4d214e[_0x29d55a(0x205)],_0x4d214e[_0x29d55a(0x211)],_0x4d214e[_0x29d55a(0x220)],_0x56f308,_0x4ce162,_0x4d214e['paths']),_0x4f61b5=resolve(_0x38f82d,SKILL_FILE),_0xc282ad=resolve(_0x38f82d,METADATA_FILE),_0x261d85=readMetadataIfPresent(_0xc282ad);if(!_0x261d85||_0x261d85['schemaVersion']!==0x2||_0x261d85[_0x29d55a(0x220)]!==_0x4d214e['appCode']||_0x261d85[_0x29d55a(0x20a)]!==_0x56f308||_0x261d85['skillCode']!==_0x4ce162||_0x261d85[_0x29d55a(0x1ed)]!==_0x3c7043||_0x261d85['id']!==_0x438104['id']||_0x261d85[_0x29d55a(0x218)]!==_0x438104[_0x29d55a(0x218)]||_0x261d85['description']!==_0x438104[_0x29d55a(0x21b)]||_0x261d85['example']!==_0x438104[_0x29d55a(0x21a)]||_0x261d85[_0x29d55a(0x210)]!==_0x438104['status']||!_0x261d85[_0x29d55a(0x215)]||!_0x261d85['fileHashes']||!Object[_0x29d55a(0x1fb)](_0x261d85['fileHashes'],SKILL_FILE))return undefined;for(const [_0x5da58e,_0xa2612c]of Object[_0x29d55a(0x1fd)](_0x261d85[_0x29d55a(0x206)])){if(!/^[a-f0-9]{64}$/['test'](_0xa2612c))return undefined;const _0x1ba7bc=resolveManagedFilePath(_0x38f82d,_0x5da58e);if(!existsSync(_0x1ba7bc)||!lstatSync(_0x1ba7bc)[_0x29d55a(0x207)]())return undefined;if(bufferSha256(readFileSync(_0x1ba7bc))!==_0xa2612c)return undefined;}return{'skill':_0x438104,'scope':_0x56f308,'dir':_0x38f82d,'skillMdPath':_0x4f61b5,'metadataPath':_0xc282ad,'contentHash':_0x261d85[_0x29d55a(0x215)],'changed':![]};}function a153_0xb6f0(_0x1b8ae9,_0xe8c4ea){_0x1b8ae9=_0x1b8ae9-0x1e9;const _0x245ce0=a153_0x245c();let _0xb6f0a1=_0x245ce0[_0x1b8ae9];return _0xb6f0a1;}function withMaterializedSkillFrontmatter(_0x28238f,_0x3df9c1,_0xcf9f0e){const _0x397814=a153_0xb6f0,_0x293bf4=skillDisplayName(_0x3df9c1,_0xcf9f0e),_0x49f395=_0x3df9c1['description']?.[_0x397814(0x202)]()||_0x293bf4||_0xcf9f0e;return normalizeLocalFiles(_0x28238f)['map'](_0x471d6b=>{const _0x4392ec=_0x397814,_0x1ca94b=fileText(_0x471d6b);if(_0x471d6b[_0x4392ec(0x1f5)]!==SKILL_FILE)return _0x471d6b;if(hasYamlFrontmatter(_0x1ca94b))return{'path':_0x471d6b['path'],'content':withSyncedDisplayName(_0x1ca94b,_0x293bf4)};return{'path':_0x471d6b[_0x4392ec(0x1f5)],'content':prependSkillFrontmatter(_0x1ca94b,{'name':_0xcf9f0e,'displayName':_0x293bf4,'description':_0x49f395})};});}function hasYamlFrontmatter(_0x555c6d){return/^\uFEFF?---\s*\r?\n/['test'](_0x555c6d);}function prependSkillFrontmatter(_0x677bd4,_0x5a2201){const _0x539c3c=a153_0xb6f0,_0x279139=_0x677bd4[_0x539c3c(0x200)](/^\uFEFF/,'');return[_0x539c3c(0x21f),'name:\x20'+yamlString(_0x5a2201[_0x539c3c(0x20f)]),_0x5a2201[_0x539c3c(0x208)]?'displayName:\x20'+yamlString(_0x5a2201['displayName']):undefined,_0x539c3c(0x21c)+yamlString(_0x5a2201[_0x539c3c(0x21b)]),_0x539c3c(0x21f),'',_0x279139]['filter'](_0x40542a=>_0x40542a!==undefined)[_0x539c3c(0x1f7)]('\x0a');}function yamlString(_0x95b68){const _0x388bea=a153_0xb6f0;return JSON['stringify'](_0x95b68[_0x388bea(0x200)](/\r/g,'')['trim']());}function skillDisplayName(_0x24a1e4,_0x40f5e5){const _0x56405a=a153_0xb6f0,_0x58179b=_0x24a1e4[_0x56405a(0x218)]?.['trim']();return _0x58179b||_0x40f5e5;}function withSyncedDisplayName(_0x56146e,_0x218fba){const _0x3428f5=a153_0xb6f0,_0x1f7ada=_0x56146e[_0x3428f5(0x21e)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x1f7ada)return _0x56146e;const _0x3171d0=_0x1f7ada[0x1]??'',_0x589ddc=_0x1f7ada[0x2]??'',_0x3b62e3=parseDocument(_0x589ddc);if(_0x3b62e3[_0x3428f5(0x1f2)][_0x3428f5(0x1ec)]>0x0||!isMap(_0x3b62e3['contents']))return _0x56146e;if(_0x218fba)_0x3b62e3[_0x3428f5(0x1fa)](_0x3428f5(0x208),_0x218fba);else{if(_0x3b62e3['has'](_0x3428f5(0x208)))_0x3b62e3['delete']('displayName');else return _0x56146e;}forceBlockCollections(_0x3b62e3['contents']);const _0x41e855=_0x3b62e3[_0x3428f5(0x1f0)]({'lineWidth':0x0})[_0x3428f5(0x1f9)](),_0x35f322=_0x56146e[_0x3428f5(0x1eb)](_0x1f7ada[0x0][_0x3428f5(0x1ec)])[_0x3428f5(0x200)](/^\r?\n/,'');return _0x3171d0+_0x3428f5(0x217)+_0x41e855+_0x3428f5(0x1f1)+_0x35f322;}function forceBlockCollections(_0x32d5ea){if(!isNode(_0x32d5ea))return;visit(_0x32d5ea,(_0x16d239,_0x58bdae)=>{isCollection(_0x58bdae)&&(_0x58bdae['flow']=![]);});}function ensurePulledFilesCanBeOverwritten(_0x318563,_0x23e9d8,_0x3026e4,_0x57a9b0){const _0x5469cc=a153_0xb6f0;if(_0x57a9b0||!existsSync(_0x23e9d8))return;const _0x10cd53=readMetadataIfPresent(_0x23e9d8);if(!_0x10cd53)return;const _0x24b825=_0x10cd53[_0x5469cc(0x206)]&&Object[_0x5469cc(0x216)](_0x10cd53[_0x5469cc(0x206)])[_0x5469cc(0x1ec)]>0x0?_0x10cd53[_0x5469cc(0x206)]:undefined;if(_0x24b825)for(const [_0x82a63,_0x70b510]of Object['entries'](_0x24b825)){const _0x34e646=resolveManagedFilePath(_0x318563,_0x82a63);if(!existsSync(_0x34e646))throw CliErrors[_0x5469cc(0x1fc)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x318563,_0x5469cc(0x219)+_0x82a63);const _0x5c26f6=lstatSync(_0x34e646);if(!_0x5c26f6[_0x5469cc(0x207)]())throw CliErrors[_0x5469cc(0x1fc)](_0x5469cc(0x1ef)+_0x318563,_0x5469cc(0x21d)+_0x82a63);const _0x32c479=bufferSha256(readFileSync(_0x34e646));if(_0x32c479!==_0x70b510)throw CliErrors[_0x5469cc(0x1fc)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x318563+_0x5469cc(0x1f3)+_0x82a63,_0x5469cc(0x1f6)+_0x82a63);}else{const _0x264d6e=resolve(_0x318563,SKILL_FILE);if(existsSync(_0x264d6e)&&_0x10cd53[_0x5469cc(0x215)]){const _0x461694=contentHash(readFileSync(_0x264d6e,_0x5469cc(0x214)));if(_0x461694!==_0x10cd53[_0x5469cc(0x215)])throw CliErrors['validation'](_0x5469cc(0x20c)+_0x264d6e,'Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.');}}for(const _0x42448f of normalizeLocalFiles(_0x3026e4)){if(_0x24b825?.[_0x42448f[_0x5469cc(0x1f5)]])continue;if(!_0x24b825&&_0x42448f[_0x5469cc(0x1f5)]===SKILL_FILE)continue;const _0x40e3b1=resolveManagedFilePath(_0x318563,_0x42448f[_0x5469cc(0x1f5)]);if(!existsSync(_0x40e3b1))continue;const _0x34f4ae=lstatSync(_0x40e3b1);if(!_0x34f4ae['isFile']())throw CliErrors[_0x5469cc(0x1fc)](_0x5469cc(0x1ef)+_0x318563,'Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20'+_0x42448f[_0x5469cc(0x1f5)]);const _0x12232e=bufferSha256(readFileSync(_0x40e3b1));if(_0x12232e!==fileHash(_0x42448f))throw CliErrors[_0x5469cc(0x1fc)]('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x318563,_0x5469cc(0x204)+_0x42448f['path']);}}function materializeFiles(_0x2ab414,_0x2ccc82){for(const _0x4390cd of normalizeLocalFiles(_0x2ccc82)){const _0x5a4cb8=resolveManagedFilePath(_0x2ab414,_0x4390cd['path']);mkdirSync(dirname(_0x5a4cb8),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x5a4cb8,fileContent(_0x4390cd),0x180);}}function a153_0x245c(){const _0x1c568c=['find','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','pulledAt','20QApPrr','name','status','accessKey','1863414opdwMm','force','utf8','contentHash','keys','---\x0a','skillName','Managed\x20file\x20was\x20removed\x20locally:\x20','example','description','description:\x20','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','match','---','appCode','9522099aFAzst','80854ZZUJJN','slice','length','version','1484205kumfCQ','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','toString','\x0a---\x0a\x0a','errors','.\x20Changed\x20file:\x20','5701296Mpsbjm','path','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','join','Runtime\x20Skill\x20package\x20is\x20missing\x20','trimEnd','set','hasOwn','validation','entries','2963965OMMLTj','1372728bABGex','replace','map','trim','10fPhhso','Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20','env','fileHashes','isFile','displayName','4itElNH','scope'];a153_0x245c=function(){return _0x1c568c;};return a153_0x245c();}function removeStaleManagedFiles(_0x321bc4,_0x4faf46,_0x437294){const _0x21cd37=a153_0xb6f0;if(!_0x4faf46)return;const _0x5af6b5=new Set(normalizeLocalFiles(_0x437294)[_0x21cd37(0x201)](_0x1cc1f7=>_0x1cc1f7[_0x21cd37(0x1f5)]));for(const _0x36f394 of Object[_0x21cd37(0x216)](_0x4faf46)){if(_0x5af6b5['has'](_0x36f394))continue;const _0x571e1d=resolveManagedFilePath(_0x321bc4,_0x36f394);existsSync(_0x571e1d)&&lstatSync(_0x571e1d)['isFile']()&&rmSync(_0x571e1d,{'force':!![]});}}
|
|
1
|
+
(function(_0x17b248,_0x539082){const _0x2f08e9=a156_0x15ca,_0x5164de=_0x17b248();while(!![]){try{const _0x3cce1d=parseInt(_0x2f08e9(0xb7))/0x1*(-parseInt(_0x2f08e9(0xc5))/0x2)+-parseInt(_0x2f08e9(0xa8))/0x3*(-parseInt(_0x2f08e9(0xaf))/0x4)+-parseInt(_0x2f08e9(0xbb))/0x5+-parseInt(_0x2f08e9(0xab))/0x6+parseInt(_0x2f08e9(0xd6))/0x7+parseInt(_0x2f08e9(0xd3))/0x8*(parseInt(_0x2f08e9(0xbe))/0x9)+-parseInt(_0x2f08e9(0xcd))/0xa*(-parseInt(_0x2f08e9(0xc4))/0xb);if(_0x3cce1d===_0x539082)break;else _0x5164de['push'](_0x5164de['shift']());}catch(_0x53fa9f){_0x5164de['push'](_0x5164de['shift']());}}}(a156_0x4cd1,0xe8f29));function a156_0x4cd1(){const _0x19d5fc=['appCode','displayName','join','keys','Managed\x20file\x20is\x20no\x20longer\x20a\x20regular\x20file:\x20','name:\x20','name','accessKey','---','replace','toString','slice','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.\x20Changed\x20file:\x20','798ugMIMr','status','schemaVersion','8621076nLtTuE','example','.\x20Changed\x20file:\x20','flow','10932RITqpT','validation','Local\x20SKILL.md\x20has\x20unpushed\x20edits:\x20','trimEnd','map','paths','description','isFile','1gNskas','force','hasOwn','length','5220975NDSjQy','skillCode','contentHash','860193lZjAbn','test','set','packageBytes','path','contents','517tOAdsV','2069338fVwbTZ','match','displayName:\x20','find','skillName','Push\x20the\x20directory\x20first,\x20then\x20rerun\x20skill\x20install.','has','Remote\x20Skill\x20would\x20overwrite\x20a\x20local\x20non-file\x20path:\x20','132670ffLLEF','stringify','entries','Managed\x20file\x20was\x20removed\x20locally:\x20','fileHashes','filter','120OrAKlx','pulledAt','Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20','11799767JzpRQM','trim','scope','Runtime\x20Skill\x20package\x20is\x20missing\x20','env'];a156_0x4cd1=function(){return _0x19d5fc;};return a156_0x4cd1();}import{existsSync,lstatSync,mkdirSync,readFileSync,rmSync}from'node:fs';import{dirname,resolve}from'node:path';import{isCollection,isMap,isNode,parseDocument,visit}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{resolveManagedFilePath,writeBytesAtomic,writeJsonAtomic}from'./fs-utils.js';import{bufferSha256,contentHash,fileHash}from'./hashing.js';import{fileContent,fileText,normalizeLocalFiles}from'./local-files.js';import{buildMetadata,readMetadataIfPresent,requireSkillCode}from'./metadata.js';function a156_0x15ca(_0x4833ff,_0x35bac1){_0x4833ff=_0x4833ff-0xa7;const _0x4cd1c8=a156_0x4cd1();let _0x15ca9c=_0x4cd1c8[_0x4833ff];return _0x15ca9c;}import{getRuntimeSkillDir}from'./paths.js';import{extractDownloadedPackage,requirePackageBytes}from'./zip-package.js';export function materializeRuntimeSkill(_0x23845c,_0x3dd9d2,_0x5e6479){const _0x25a6d2=a156_0x15ca,_0x568d15=requireSkillCode(_0x23845c),_0x610ef3=requirePackageBytes(_0x568d15,_0x5e6479[_0x25a6d2(0xc1)]),_0x43441a=extractDownloadedPackage(_0x610ef3),_0x302201=_0x43441a[_0x25a6d2(0xc8)](_0x958fd6=>_0x958fd6[_0x25a6d2(0xc2)]===SKILL_FILE);if(!_0x302201)throw CliErrors[_0x25a6d2(0xb0)](_0x25a6d2(0xd9)+SKILL_FILE+':\x20'+_0x568d15);const _0xec96c4=withMaterializedSkillFrontmatter(_0x43441a,_0x23845c,_0x568d15),_0x4a796d=_0xec96c4[_0x25a6d2(0xc8)](_0x22deb1=>_0x22deb1['path']===SKILL_FILE),_0x4a2073=fileText(_0x4a796d),_0x4d9383=getRuntimeSkillDir(_0x5e6479['env'],_0x5e6479[_0x25a6d2(0xe2)],_0x5e6479['appCode'],_0x3dd9d2,_0x568d15,_0x5e6479[_0x25a6d2(0xb4)]),_0x2c3420=resolve(_0x4d9383,SKILL_FILE),_0x1d89ec=resolve(_0x4d9383,METADATA_FILE),_0x7f0b8c=contentHash(_0x4a2073),_0x482996=readMetadataIfPresent(_0x1d89ec)?.[_0x25a6d2(0xd1)];ensurePulledFilesCanBeOverwritten(_0x4d9383,_0x1d89ec,_0xec96c4,_0x5e6479[_0x25a6d2(0xb8)]===!![]),mkdirSync(_0x4d9383,{'recursive':!![],'mode':0x1c0});const _0x23dd68=existsSync(_0x2c3420)?readFileSync(_0x2c3420,'utf8'):undefined;return materializeFiles(_0x4d9383,_0xec96c4),removeStaleManagedFiles(_0x4d9383,_0x482996,_0xec96c4),writeJsonAtomic(_0x1d89ec,buildMetadata(_0x23845c,_0x3dd9d2,_0x5e6479['appCode'],_0x7f0b8c,_0x5e6479[_0x25a6d2(0xd4)],_0xec96c4,_0x610ef3)),{'skill':_0x23845c,'scope':_0x3dd9d2,'dir':_0x4d9383,'skillMdPath':_0x2c3420,'metadataPath':_0x1d89ec,'contentHash':_0x7f0b8c,'changed':_0x23dd68!==_0x4a2073};}export function reuseMaterializedRuntimeSkill(_0x31447a,_0x5b6960,_0x349e4b){const _0x1d3e44=a156_0x15ca,_0x499aba=_0x31447a['version']?.['trim']();if(!_0x499aba)return undefined;const _0x43e380=requireSkillCode(_0x31447a),_0x2879d0=getRuntimeSkillDir(_0x349e4b[_0x1d3e44(0xda)],_0x349e4b[_0x1d3e44(0xe2)],_0x349e4b['appCode'],_0x5b6960,_0x43e380,_0x349e4b['paths']),_0x2cf032=resolve(_0x2879d0,SKILL_FILE),_0x59ccd0=resolve(_0x2879d0,METADATA_FILE),_0x4a6bd4=readMetadataIfPresent(_0x59ccd0);if(!_0x4a6bd4||_0x4a6bd4[_0x1d3e44(0xaa)]!==0x2||_0x4a6bd4['appCode']!==_0x349e4b[_0x1d3e44(0xdb)]||_0x4a6bd4[_0x1d3e44(0xd8)]!==_0x5b6960||_0x4a6bd4[_0x1d3e44(0xbc)]!==_0x43e380||_0x4a6bd4['version']!==_0x499aba||_0x4a6bd4['id']!==_0x31447a['id']||_0x4a6bd4['skillName']!==_0x31447a['skillName']||_0x4a6bd4[_0x1d3e44(0xb5)]!==_0x31447a[_0x1d3e44(0xb5)]||_0x4a6bd4[_0x1d3e44(0xac)]!==_0x31447a['example']||_0x4a6bd4[_0x1d3e44(0xa9)]!==_0x31447a[_0x1d3e44(0xa9)]||!_0x4a6bd4[_0x1d3e44(0xbd)]||!_0x4a6bd4[_0x1d3e44(0xd1)]||!Object[_0x1d3e44(0xb9)](_0x4a6bd4[_0x1d3e44(0xd1)],SKILL_FILE))return undefined;for(const [_0x240b39,_0x29de40]of Object[_0x1d3e44(0xcf)](_0x4a6bd4[_0x1d3e44(0xd1)])){if(!/^[a-f0-9]{64}$/[_0x1d3e44(0xbf)](_0x29de40))return undefined;const _0x547c2b=resolveManagedFilePath(_0x2879d0,_0x240b39);if(!existsSync(_0x547c2b)||!lstatSync(_0x547c2b)[_0x1d3e44(0xb6)]())return undefined;if(bufferSha256(readFileSync(_0x547c2b))!==_0x29de40)return undefined;}return{'skill':_0x31447a,'scope':_0x5b6960,'dir':_0x2879d0,'skillMdPath':_0x2cf032,'metadataPath':_0x59ccd0,'contentHash':_0x4a6bd4[_0x1d3e44(0xbd)],'changed':![]};}function withMaterializedSkillFrontmatter(_0x39e686,_0x30495a,_0x45277c){const _0x2c49cf=a156_0x15ca,_0x592630=skillDisplayName(_0x30495a,_0x45277c),_0x5368b7=_0x30495a[_0x2c49cf(0xb5)]?.[_0x2c49cf(0xd7)]()||_0x592630||_0x45277c;return normalizeLocalFiles(_0x39e686)[_0x2c49cf(0xb3)](_0x1f765d=>{const _0x217dbc=_0x2c49cf,_0x389895=fileText(_0x1f765d);if(_0x1f765d[_0x217dbc(0xc2)]!==SKILL_FILE)return _0x1f765d;if(hasYamlFrontmatter(_0x389895))return{'path':_0x1f765d['path'],'content':withSyncedDisplayName(_0x389895,_0x592630)};return{'path':_0x1f765d[_0x217dbc(0xc2)],'content':prependSkillFrontmatter(_0x389895,{'name':_0x45277c,'displayName':_0x592630,'description':_0x5368b7})};});}function hasYamlFrontmatter(_0x2a9c8a){const _0x518f2c=a156_0x15ca;return/^\uFEFF?---\s*\r?\n/[_0x518f2c(0xbf)](_0x2a9c8a);}function prependSkillFrontmatter(_0x1ddc40,_0xac208f){const _0x1ec6e4=a156_0x15ca,_0x438b29=_0x1ddc40[_0x1ec6e4(0xe4)](/^\uFEFF/,'');return[_0x1ec6e4(0xe3),_0x1ec6e4(0xe0)+yamlString(_0xac208f[_0x1ec6e4(0xe1)]),_0xac208f['displayName']?_0x1ec6e4(0xc7)+yamlString(_0xac208f[_0x1ec6e4(0xdc)]):undefined,'description:\x20'+yamlString(_0xac208f[_0x1ec6e4(0xb5)]),_0x1ec6e4(0xe3),'',_0x438b29][_0x1ec6e4(0xd2)](_0x3285d7=>_0x3285d7!==undefined)[_0x1ec6e4(0xdd)]('\x0a');}function yamlString(_0x58306f){const _0xe943dd=a156_0x15ca;return JSON[_0xe943dd(0xce)](_0x58306f[_0xe943dd(0xe4)](/\r/g,'')[_0xe943dd(0xd7)]());}function skillDisplayName(_0x380765,_0x5c6bc5){const _0x443112=a156_0x15ca,_0x47b7b0=_0x380765[_0x443112(0xc9)]?.['trim']();return _0x47b7b0||_0x5c6bc5;}function withSyncedDisplayName(_0x3cb360,_0x48a4aa){const _0x523a65=a156_0x15ca,_0x5202c0=_0x3cb360[_0x523a65(0xc6)](/^(\uFEFF?)---\s*\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5202c0)return _0x3cb360;const _0x3aa49b=_0x5202c0[0x1]??'',_0x1fa895=_0x5202c0[0x2]??'',_0x1da62d=parseDocument(_0x1fa895);if(_0x1da62d['errors'][_0x523a65(0xba)]>0x0||!isMap(_0x1da62d[_0x523a65(0xc3)]))return _0x3cb360;if(_0x48a4aa)_0x1da62d[_0x523a65(0xc0)](_0x523a65(0xdc),_0x48a4aa);else{if(_0x1da62d['has'](_0x523a65(0xdc)))_0x1da62d['delete']('displayName');else return _0x3cb360;}forceBlockCollections(_0x1da62d[_0x523a65(0xc3)]);const _0x49ca28=_0x1da62d[_0x523a65(0xe5)]({'lineWidth':0x0})[_0x523a65(0xb2)](),_0x2116c9=_0x3cb360[_0x523a65(0xe6)](_0x5202c0[0x0][_0x523a65(0xba)])[_0x523a65(0xe4)](/^\r?\n/,'');return _0x3aa49b+'---\x0a'+_0x49ca28+'\x0a---\x0a\x0a'+_0x2116c9;}function forceBlockCollections(_0x4f271f){if(!isNode(_0x4f271f))return;visit(_0x4f271f,(_0x4b3baa,_0x243139)=>{const _0x2d4697=a156_0x15ca;isCollection(_0x243139)&&(_0x243139[_0x2d4697(0xae)]=![]);});}function ensurePulledFilesCanBeOverwritten(_0x1d8fdb,_0x477c0e,_0x5cb99c,_0x146414){const _0x154965=a156_0x15ca;if(_0x146414||!existsSync(_0x477c0e))return;const _0xd3d91=readMetadataIfPresent(_0x477c0e);if(!_0xd3d91)return;const _0x2dbd50=_0xd3d91[_0x154965(0xd1)]&&Object[_0x154965(0xde)](_0xd3d91[_0x154965(0xd1)])[_0x154965(0xba)]>0x0?_0xd3d91[_0x154965(0xd1)]:undefined;if(_0x2dbd50)for(const [_0x4fea05,_0x577879]of Object[_0x154965(0xcf)](_0x2dbd50)){const _0x3f69d2=resolveManagedFilePath(_0x1d8fdb,_0x4fea05);if(!existsSync(_0x3f69d2))throw CliErrors['validation']('Local\x20Skill\x20files\x20have\x20unpushed\x20edits:\x20'+_0x1d8fdb,_0x154965(0xd0)+_0x4fea05);const _0x2ab7bc=lstatSync(_0x3f69d2);if(!_0x2ab7bc[_0x154965(0xb6)]())throw CliErrors[_0x154965(0xb0)](_0x154965(0xd5)+_0x1d8fdb,_0x154965(0xdf)+_0x4fea05);const _0xfcdf71=bufferSha256(readFileSync(_0x3f69d2));if(_0xfcdf71!==_0x577879)throw CliErrors[_0x154965(0xb0)](_0x154965(0xd5)+_0x1d8fdb+_0x154965(0xad)+_0x4fea05,_0x154965(0xa7)+_0x4fea05);}else{const _0x4df8aa=resolve(_0x1d8fdb,SKILL_FILE);if(existsSync(_0x4df8aa)&&_0xd3d91[_0x154965(0xbd)]){const _0x1e5c61=contentHash(readFileSync(_0x4df8aa,'utf8'));if(_0x1e5c61!==_0xd3d91[_0x154965(0xbd)])throw CliErrors['validation'](_0x154965(0xb1)+_0x4df8aa,_0x154965(0xca));}}for(const _0x160c35 of normalizeLocalFiles(_0x5cb99c)){if(_0x2dbd50?.[_0x160c35['path']])continue;if(!_0x2dbd50&&_0x160c35[_0x154965(0xc2)]===SKILL_FILE)continue;const _0xf7492c=resolveManagedFilePath(_0x1d8fdb,_0x160c35['path']);if(!existsSync(_0xf7492c))continue;const _0x524927=lstatSync(_0xf7492c);if(!_0x524927[_0x154965(0xb6)]())throw CliErrors[_0x154965(0xb0)](_0x154965(0xd5)+_0x1d8fdb,_0x154965(0xcc)+_0x160c35[_0x154965(0xc2)]);const _0x372117=bufferSha256(readFileSync(_0xf7492c));if(_0x372117!==fileHash(_0x160c35))throw CliErrors[_0x154965(0xb0)](_0x154965(0xd5)+_0x1d8fdb,'Remote\x20Skill\x20would\x20overwrite\x20an\x20unmanaged\x20local\x20file:\x20'+_0x160c35[_0x154965(0xc2)]);}}function materializeFiles(_0x217442,_0x264d9b){const _0x356d86=a156_0x15ca;for(const _0x1e9ab2 of normalizeLocalFiles(_0x264d9b)){const _0x2d72ee=resolveManagedFilePath(_0x217442,_0x1e9ab2[_0x356d86(0xc2)]);mkdirSync(dirname(_0x2d72ee),{'recursive':!![],'mode':0x1c0}),writeBytesAtomic(_0x2d72ee,fileContent(_0x1e9ab2),0x180);}}function removeStaleManagedFiles(_0x242803,_0x18d906,_0x61f0a8){const _0x4bee9f=a156_0x15ca;if(!_0x18d906)return;const _0x38fbbd=new Set(normalizeLocalFiles(_0x61f0a8)[_0x4bee9f(0xb3)](_0x32c8e1=>_0x32c8e1[_0x4bee9f(0xc2)]));for(const _0x1efd08 of Object[_0x4bee9f(0xde)](_0x18d906)){if(_0x38fbbd[_0x4bee9f(0xcb)](_0x1efd08))continue;const _0x1d7f2b=resolveManagedFilePath(_0x242803,_0x1efd08);existsSync(_0x1d7f2b)&&lstatSync(_0x1d7f2b)['isFile']()&&rmSync(_0x1d7f2b,{'force':!![]});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x542d6c,_0x2f0dd9){const _0x2c9841=a157_0x579b,_0x3eda12=_0x542d6c();while(!![]){try{const _0x48783d=parseInt(_0x2c9841(0x1b0))/0x1+parseInt(_0x2c9841(0x1a9))/0x2*(parseInt(_0x2c9841(0x1bb))/0x3)+-parseInt(_0x2c9841(0x1bd))/0x4+-parseInt(_0x2c9841(0x1c3))/0x5+-parseInt(_0x2c9841(0x1ab))/0x6*(-parseInt(_0x2c9841(0x1aa))/0x7)+-parseInt(_0x2c9841(0x1bf))/0x8+-parseInt(_0x2c9841(0x1c5))/0x9*(parseInt(_0x2c9841(0x1ba))/0xa);if(_0x48783d===_0x2f0dd9)break;else _0x3eda12['push'](_0x3eda12['shift']());}catch(_0x1cbbd3){_0x3eda12['push'](_0x3eda12['shift']());}}}(a157_0x513a,0x99a83));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';function a157_0x513a(){const _0x5e758a=['length','tenantCode','readonly','90YMRfGe','258ntGnix','utf8','2714020PVNwHO','files','5656776cZVAfl','forkedFromSkillId','version','map','1948730CHUyGN','skillCode','510399PVZGhJ','example','Runtime\x20Skill\x20is\x20missing\x20skillCode.','validation','zipSha256','description','hasUpstreamUpdate','manifest','tags','personal','userId','26330bgVJLA','3845373ZlHzek','6jQGbdC','isArray','ossPath','trim','fromEntries','1233597fdIreE','string','parse','sourceSessionId','status','forkedFromVersion','path'];a157_0x513a=function(){return _0x5e758a;};return a157_0x513a();}import{buildSkillPackage,localFilesToManifestFiles}from'./zip-package.js';export function buildMetadata(_0x1f9c41,_0x457965,_0x4efc93,_0x308f82,_0x25d2de,_0x450008,_0x573ac3){const _0x46fc51=a157_0x579b,_0x3f0f5a=_0x450008?normalizeLocalFiles(_0x450008):[],_0xc4feef=!_0x573ac3&&_0x3f0f5a[_0x46fc51(0x1b7)]>0x0?buildSkillPackage(_0x3f0f5a):undefined,_0x3551aa=_0x573ac3?bufferSha256(_0x573ac3):_0xc4feef?.[_0x46fc51(0x1cc)][_0x46fc51(0x1c9)],_0x5d5524=_0x573ac3?.[_0x46fc51(0x1b7)]??_0xc4feef?.[_0x46fc51(0x1cc)]['zipSize'],_0x5413c7=_0x3f0f5a['length']>0x0?Object[_0x46fc51(0x1af)](_0x3f0f5a['map'](_0x2cfa34=>[_0x2cfa34[_0x46fc51(0x1b6)],fileHash(_0x2cfa34)])):undefined;return{'schemaVersion':_0x3f0f5a[_0x46fc51(0x1b7)]>0x0?0x2:0x1,'id':_0x1f9c41['id'],'appCode':_0x4efc93,'skillCode':requireSkillCode(_0x1f9c41),'skillName':_0x1f9c41['skillName'],'description':_0x1f9c41[_0x46fc51(0x1ca)],'example':_0x1f9c41[_0x46fc51(0x1c6)],'scope':_0x457965,'readonly':_0x457965!==_0x46fc51(0x1a7)||_0x1f9c41[_0x46fc51(0x1b9)]===!![],'tenantCode':_0x1f9c41[_0x46fc51(0x1b8)],'userId':_0x1f9c41[_0x46fc51(0x1a8)],'version':_0x1f9c41[_0x46fc51(0x1c1)],'status':_0x1f9c41[_0x46fc51(0x1b4)],'tags':Array['isArray'](_0x1f9c41[_0x46fc51(0x1cd)])?_0x1f9c41[_0x46fc51(0x1cd)]:[],'hasUpstreamUpdate':_0x1f9c41[_0x46fc51(0x1cb)],'forkedFromSkillId':_0x1f9c41[_0x46fc51(0x1c0)],'forkedFromVersion':_0x1f9c41[_0x46fc51(0x1b5)],'sourceSessionId':_0x1f9c41[_0x46fc51(0x1b3)],'contentHash':_0x308f82,'fileHashes':_0x5413c7,'treeHash':_0x3f0f5a['length']>0x0?fileTreeHash(localFilesToManifestFiles(_0x3f0f5a)):undefined,'ossPath':remoteManifestOssPath(_0x1f9c41[_0x46fc51(0x1be)]),'zipSha256':_0x3551aa,'zipSize':_0x5d5524,'files':_0x3f0f5a['length']>0x0?_0x3f0f5a[_0x46fc51(0x1c2)](_0x11e4d9=>({'path':_0x11e4d9[_0x46fc51(0x1b6)],'hash':fileHash(_0x11e4d9),'size':fileContent(_0x11e4d9)['length']})):undefined,'pulledAt':_0x25d2de??new Date()['toISOString']()};}function a157_0x579b(_0x4d8d1f,_0x446f13){_0x4d8d1f=_0x4d8d1f-0x1a7;const _0x513a21=a157_0x513a();let _0x579b6a=_0x513a21[_0x4d8d1f];return _0x579b6a;}export function requireSkillCode(_0x3897c1){const _0x15ad8a=a157_0x579b,_0x490809=_0x3897c1[_0x15ad8a(0x1c4)]?.[_0x15ad8a(0x1ae)]();if(!_0x490809)throw CliErrors[_0x15ad8a(0x1c8)](_0x15ad8a(0x1c7));return _0x490809;}export function readMetadataIfPresent(_0x10fc17){const _0x413825=a157_0x579b;if(!existsSync(_0x10fc17))return undefined;try{const _0x3c74b5=JSON[_0x413825(0x1b2)](readFileSync(_0x10fc17,_0x413825(0x1bc)));return _0x3c74b5;}catch{throw CliErrors[_0x413825(0x1c8)]('Invalid\x20'+METADATA_FILE+':\x20'+_0x10fc17);}}function remoteManifestOssPath(_0x447705){const _0xbbba7e=a157_0x579b;if(!_0x447705||typeof _0x447705!=='object'||Array[_0xbbba7e(0x1ac)](_0x447705))return undefined;const _0x292369=_0x447705[_0xbbba7e(0x1ad)];return typeof _0x292369===_0xbbba7e(0x1b1)&&_0x292369[_0xbbba7e(0x1ae)]()?_0x292369['trim']():undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a158_0x39d9c8=a158_0x48e3;function a158_0x48e3(_0x5b2a72,_0x5938c0){_0x5b2a72=_0x5b2a72-0x12e;const _0x42a7c4=a158_0x42a7();let _0x48e331=_0x42a7c4[_0x5b2a72];return _0x48e331;}(function(_0x1c3943,_0x57e221){const _0x2aade6=a158_0x48e3,_0x3a3132=_0x1c3943();while(!![]){try{const _0x7540e8=-parseInt(_0x2aade6(0x145))/0x1*(parseInt(_0x2aade6(0x13a))/0x2)+parseInt(_0x2aade6(0x134))/0x3+parseInt(_0x2aade6(0x14b))/0x4+parseInt(_0x2aade6(0x140))/0x5*(-parseInt(_0x2aade6(0x12f))/0x6)+-parseInt(_0x2aade6(0x13f))/0x7*(-parseInt(_0x2aade6(0x142))/0x8)+parseInt(_0x2aade6(0x13c))/0x9*(parseInt(_0x2aade6(0x146))/0xa)+-parseInt(_0x2aade6(0x138))/0xb*(parseInt(_0x2aade6(0x13b))/0xc);if(_0x7540e8===_0x57e221)break;else _0x3a3132['push'](_0x3a3132['shift']());}catch(_0x5d2384){_0x3a3132['push'](_0x3a3132['shift']());}}}(a158_0x42a7,0x9b7de));import{existsSync}from'node:fs';import{homedir}from'node:os';import{resolve}from'node:path';import{fingerprintAccessKey}from'../../commands/app/cache.js';import{PRODUCT_CONFIG,productEnv}from'../../constant/product.js';import{CliErrors}from'../../errors.js';export function resolveSkillSyncPaths(_0x34e5e5={}){const _0x141f48=a158_0x48e3,_0x103e70=_0x34e5e5['homeDir']??homedir(),_0x129b33=resolve(_0x103e70,PRODUCT_CONFIG['homeDirName'],_0x141f48(0x14a)),_0xd80fff=trimmedEnv(_0x141f48(0x143)),_0x46594f=trimmedEnv(_0x141f48(0x12e)),_0x5c372f=resolve(_0x103e70,'.workbuddy'),_0x37df23=_0x34e5e5[_0x141f48(0x13e)]??(existsSync(_0x5c372f)?resolve(_0x5c372f,_0x141f48(0x148)):undefined);return{'homeDir':_0x103e70,'cacheRoot':_0x129b33,'managedRoot':resolve(_0x103e70,PRODUCT_CONFIG[_0x141f48(0x135)]),'agentsSkillsDir':_0x34e5e5[_0x141f48(0x149)]??_0xd80fff??resolve(_0x103e70,_0x141f48(0x131),_0x141f48(0x148)),'claudeSkillsDir':_0x34e5e5[_0x141f48(0x144)]??_0x46594f??resolve(_0x103e70,_0x141f48(0x13d),_0x141f48(0x148)),'workbuddySkillsDir':_0x37df23};}export function runtimeAgentSkillRoots(_0x405c76){const _0x29b81c=a158_0x48e3;return[_0x405c76[_0x29b81c(0x149)],_0x405c76['claudeSkillsDir'],_0x405c76[_0x29b81c(0x13e)]][_0x29b81c(0x132)](_0x1f768a=>Boolean(_0x1f768a));}export function getRuntimeSkillCacheRoot(_0x2773cd,_0x208e05,_0x16d59d={}){const _0x5c888e=a158_0x48e3,_0x314cf7=resolveSkillSyncPaths(_0x16d59d);return resolve(_0x314cf7[_0x5c888e(0x141)],_0x2773cd,fingerprintAccessKey(_0x208e05),_0x5c888e(0x148));}export function getRuntimeSkillDir(_0x5eafbf,_0x45e8bb,_0x52356b,_0x1c9031,_0x2d232d,_0x3ae18c={}){const _0x2c28a1=a158_0x48e3;return resolve(getRuntimeSkillCacheRoot(_0x5eafbf,_0x45e8bb,_0x3ae18c),safePathSegment(_0x52356b,'appCode'),_0x1c9031,safePathSegment(_0x2d232d,_0x2c28a1(0x139)));}function a158_0x42a7(){const _0x4a8807=['2474340GnCBjd','skillCode','984QHOXiL','48nRYcic','7248438qsgHkR','.claude','workbuddySkillsDir','1076222HgvoRA','18240SOxlsQ','cacheRoot','24mDWSkG','SKILL_ROOT','claudeSkillsDir','206gZxcKt','10KtHtgy','Unsafe\x20','skills','agentsSkillsDir','cache','821860IijfOf','CLAUDE_SKILL_ROOT','1128ehyEGD','\x20for\x20local\x20path:\x20','.agents','filter','includes','2555235PosWLS','homeDirName','trim','path\x20segment'];a158_0x42a7=function(){return _0x4a8807;};return a158_0x42a7();}export function safePathSegment(_0xfd50e4,_0x1d356e=a158_0x39d9c8(0x137)){const _0x152473=a158_0x39d9c8;if(!_0xfd50e4||_0xfd50e4['includes']('/')||_0xfd50e4[_0x152473(0x133)]('\x5c')||_0xfd50e4[_0x152473(0x133)]('..'))throw CliErrors['validation'](_0x152473(0x147)+_0x1d356e+_0x152473(0x130)+_0xfd50e4);return _0xfd50e4;}function trimmedEnv(_0x1db951){const _0x252e68=a158_0x39d9c8,_0x463c34=productEnv(_0x1db951)?.[_0x252e68(0x136)]();return _0x463c34?_0x463c34:undefined;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0xf6a566,_0x187db6){const _0x48a05b=a156_0x13d7,_0xdeb9e5=_0xf6a566();while(!![]){try{const _0x28dccd=parseInt(_0x48a05b(0xe6))/0x1*(-parseInt(_0x48a05b(0x109))/0x2)+-parseInt(_0x48a05b(0xe5))/0x3+-parseInt(_0x48a05b(0xfd))/0x4*(parseInt(_0x48a05b(0xca))/0x5)+parseInt(_0x48a05b(0xf6))/0x6+parseInt(_0x48a05b(0xfc))/0x7+parseInt(_0x48a05b(0xf2))/0x8+-parseInt(_0x48a05b(0x102))/0x9*(-parseInt(_0x48a05b(0xf3))/0xa);if(_0x28dccd===_0x187db6)break;else _0xdeb9e5['push'](_0xdeb9e5['shift']());}catch(_0x209d14){_0xdeb9e5['push'](_0xdeb9e5['shift']());}}}(a156_0xbeac,0xba716));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a156_0x227a2f}from'yaml';import{CliErrors}from'../../errors.js';import{METADATA_FILE,SKILL_FILE}from'./constants.js';import{writeJsonAtomic}from'./fs-utils.js';function a156_0x13d7(_0x44e2ca,_0x67c498){_0x44e2ca=_0x44e2ca-0xc8;const _0xbeac03=a156_0xbeac();let _0x13d749=_0xbeac03[_0x44e2ca];return _0x13d749;}import{contentHash}from'./hashing.js';import{fileText,normalizeLocalFiles,scanSkillDirectory}from'./local-files.js';import{buildMetadata,readMetadataIfPresent}from'./metadata.js';import{buildSkillPackage,tryNormalizePackageManifest}from'./zip-package.js';function a156_0xbeac(){const _0x4f9507=['30adzeIp','description','isFile','isSymbolicLink','1698760NwPxJB','refreshedAt','tags','sourceSessionId','content','appCode','Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20','unknown','(unknown)','ignoreMetadataScope','Remote\x20Skill\x20','isArray','string','startsWith','\x20has\x20unsupported\x20scope\x20\x22','example','match','dir','excludedFilePaths','packageBase64','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','scope','isDirectory','personal','version','metadata','replace','2690226jhHimK','65965DxjYAU','trim','Missing\x20','path','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','Skill\x20directory\x20not\x20found:\x20','builtin','\x20has\x20scope=\x22','allowAppCodeRetarget','files',',\x20or\x20directory\x20name.','some','9284336cGOrjs','20gRJhVz','toLowerCase','utf8','4639050fGNylP','skillName','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','ignoreMetadataAppCodeMismatch','validation','object','2108344nzWHbT','4bikvVf','ignoreInvalidMetadata','\x20name\x20for\x20SkillHub\x20slug\x20generation.','Invalid\x20','name','3396285ovwTIE','pushedAt','ignoreMetadataForPayload','ignoreMetadataSkillCode','length','displayName','company'];a156_0xbeac=function(){return _0x4f9507;};return a156_0xbeac();}export function resolvePushDirectoryIdentity(_0x2e09d1,_0x4ad078,_0x5de309={}){const _0x175009=a156_0x13d7,_0x25435a=resolvePushDirectoryRoot(_0x2e09d1),_0x19a560=readPushMetadataIfPresent(resolve(_0x25435a,METADATA_FILE),{'ignoreInvalidMetadata':_0x5de309[_0x175009(0xfe)]});if(_0x19a560?.[_0x175009(0xcf)]&&_0x19a560[_0x175009(0xcf)]!==_0x4ad078&&!_0x5de309[_0x175009(0xee)]&&!_0x5de309[_0x175009(0xf9)])throw CliErrors[_0x175009(0xfa)]('Skill\x20metadata\x20appCode\x20\x22'+_0x19a560[_0x175009(0xcf)]+_0x175009(0xde)+_0x4ad078+'\x22.');const _0x185ee4=resolvePushSkillCode(_0x25435a,_0x4ad078,_0x19a560,_0x5de309);if(!_0x185ee4)throw CliErrors['validation']('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+_0x175009(0xf0));return{'dir':_0x25435a,'skillCode':_0x185ee4,'metadata':_0x19a560};}export function readPushDirectory(_0xebecfe,_0x189cf5,_0x56269d={}){const _0x52350=a156_0x13d7,_0x38f2b5=resolvePushDirectoryIdentity(_0xebecfe,_0x189cf5,_0x56269d),_0x531ad6=_0x38f2b5[_0x52350(0xdb)],_0x1f83c9=resolve(_0x531ad6,SKILL_FILE);if(!existsSync(_0x1f83c9)||!lstatSync(_0x1f83c9)[_0x52350(0xc8)]())throw CliErrors['validation'](_0x52350(0xe8)+SKILL_FILE+':\x20'+_0x1f83c9);const _0x2ee708=_0x38f2b5[_0x52350(0xe3)],_0x16a587=_0x56269d['targetScope']??'personal';if(!_0x56269d['ignoreMetadataScope']&&_0x2ee708?.['scope']==='builtin')throw CliErrors['validation'](_0x52350(0xd0)+METADATA_FILE+_0x52350(0xed)+_0x2ee708[_0x52350(0xdf)]+'\x22.');if(!_0x56269d[_0x52350(0xd3)]&&_0x16a587===_0x52350(0xe1)&&_0x2ee708?.[_0x52350(0xdf)]&&_0x2ee708[_0x52350(0xdf)]!==_0x52350(0xe1))throw CliErrors['validation'](_0x52350(0xf8)+METADATA_FILE+_0x52350(0xed)+_0x2ee708[_0x52350(0xdf)]+'\x22.','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20'+_0x531ad6+_0x52350(0xea));const _0x188375=scanSkillDirectory(_0x531ad6,{'excludedFilePaths':_0x56269d[_0x52350(0xdc)]}),_0x1e1e68=buildSkillPackage(_0x188375),_0xa8c014=readFileSync(_0x1f83c9,_0x52350(0xf5)),_0x5009b3=_0x38f2b5['skillCode'],_0x5d92b3=_0x56269d[_0x52350(0x104)]?undefined:_0x2ee708,_0xbf6c5c=readSkillDisplayName(_0xa8c014);return{'skillCode':_0x5009b3,'metadata':_0x2ee708,'frontmatterDisplayName':_0xbf6c5c,'input':{'skillCode':_0x5009b3,'skillName':_0xbf6c5c??_0x5d92b3?.[_0x52350(0xf7)],'description':_0x5d92b3?.[_0x52350(0x10a)],'content':_0xa8c014,'files':_0x1e1e68['manifest'],'packageBase64':_0x1e1e68[_0x52350(0xdd)],'tags':_0x5d92b3?.[_0x52350(0xcc)],'version':_0x5d92b3?.[_0x52350(0xe2)],'sourceSessionId':_0x5d92b3?.[_0x52350(0xcd)]}};}export function refreshPushDirectoryMetadataFromRemote(_0x3f4730,_0x5adc1c,_0x373c88,_0x470c31={}){const _0x41c8ae=a156_0x13d7,_0x31d65d=resolvePushDirectoryRoot(_0x3f4730),_0x375a43=readPushMetadataIfPresent(resolve(_0x31d65d,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x2fb8b3=requireRemoteScope(_0x5adc1c),_0x2323e6=readLocalSkillContent(_0x31d65d),_0x3891dd={..._0x5adc1c,'appCode':_0x5adc1c[_0x41c8ae(0xcf)]??_0x373c88,'skillName':_0x5adc1c[_0x41c8ae(0xf7)]??_0x375a43?.[_0x41c8ae(0xf7)],'description':_0x5adc1c['description']??_0x375a43?.[_0x41c8ae(0x10a)],'example':_0x5adc1c['example']??_0x375a43?.[_0x41c8ae(0xd9)],'tags':Array[_0x41c8ae(0xd5)](_0x5adc1c['tags'])?_0x5adc1c[_0x41c8ae(0xcc)]:_0x375a43?.[_0x41c8ae(0xcc)],'sourceSessionId':_0x5adc1c[_0x41c8ae(0xcd)]??_0x375a43?.['sourceSessionId'],'content':_0x5adc1c['content']??_0x2323e6},_0x5cb651=buildMetadata(_0x3891dd,_0x2fb8b3,_0x373c88,contentHash(_0x2323e6),_0x470c31[_0x41c8ae(0xcb)]);writeJsonAtomic(resolve(_0x31d65d,METADATA_FILE),_0x5cb651);}export function recordPushedRuntimeSkill(_0x144183,_0x145d68,_0x48522a,_0x481154={}){const _0x5f2931=a156_0x13d7,_0x888d4e=resolvePushDirectoryRoot(_0x144183),_0x593646=scanSkillDirectory(_0x888d4e),_0x15b32d=_0x593646['find'](_0x5db46c=>_0x5db46c[_0x5f2931(0xe9)]===SKILL_FILE),_0x59a685=_0x15b32d?fileText(_0x15b32d):'',_0x100f58=tryNormalizePackageManifest(_0x145d68['files']),_0x51d16b={..._0x145d68,'content':_0x145d68[_0x5f2931(0xce)]??_0x59a685,'files':_0x100f58},_0x122127=_0x100f58?normalizeLocalFiles(_0x593646)['filter'](_0x5bee30=>_0x100f58[_0x5f2931(0xef)][_0x5f2931(0xf1)](_0x2ce010=>_0x2ce010[_0x5f2931(0xe9)]===_0x5bee30[_0x5f2931(0xe9)])):undefined,_0x362453=buildMetadata(_0x51d16b,_0x481154[_0x5f2931(0xdf)]??_0x5f2931(0xe1),_0x48522a,contentHash(_0x51d16b[_0x5f2931(0xce)]??''),_0x481154[_0x5f2931(0x103)],_0x122127);writeJsonAtomic(resolve(_0x888d4e,METADATA_FILE),_0x362453);}export function deriveSkillCodeFromDirectory(_0x4c2cdd,_0x14973b){const _0x146ccf=a156_0x13d7,_0x75efbe=basename(resolve(_0x4c2cdd)),_0x3a8461=_0x14973b+'--';return _0x75efbe[_0x146ccf(0xd7)](_0x3a8461)?_0x75efbe['slice'](_0x3a8461[_0x146ccf(0x106)]):_0x75efbe;}function resolvePushSkillCode(_0x3175b6,_0xac4578,_0x208f88,_0x2a17c9){const _0x5338f5=a156_0x13d7,_0x348b73=deriveSkillCodeFromSkillFile(_0x3175b6)||deriveSkillCodeFromDirectory(_0x3175b6,_0xac4578);if(_0x2a17c9[_0x5338f5(0x105)])return _0x348b73;return _0x208f88?.['skillCode']?.[_0x5338f5(0xe7)]()||_0x348b73;}function deriveSkillCodeFromSkillFile(_0xf8815){const _0x448f57=a156_0x13d7,_0x48fd6c=resolve(_0xf8815,SKILL_FILE);if(!existsSync(_0x48fd6c)||!lstatSync(_0x48fd6c)['isFile']())return undefined;const _0x17f6c6=readFileSync(_0x48fd6c,'utf8'),_0x25600e=_0x17f6c6[_0x448f57(0xda)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x25600e)return undefined;const _0x1841c9=parseFrontmatterObject(_0x25600e[0x1]??''),_0x2009f7=scalarToString(_0x1841c9?.[_0x448f57(0x101)]);return _0x2009f7?slugifySkillName(_0x2009f7):undefined;}function readSkillDisplayName(_0x12c706){const _0x28a002=a156_0x13d7,_0x422f61=_0x12c706[_0x28a002(0xda)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x422f61)return undefined;const _0x56d7a2=parseFrontmatterObject(_0x422f61[0x1]??'');return scalarToString(_0x56d7a2?.[_0x28a002(0x107)]);}function slugifySkillName(_0x53d44e){const _0x16a1af=a156_0x13d7,_0x2a9814=_0x53d44e['trim']()[_0x16a1af(0xf4)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x16a1af(0xe4)](/^-+/,'')[_0x16a1af(0xe4)](/-+$/,'')[_0x16a1af(0xe4)](/-{2,}/g,'-');if(!_0x2a9814)throw CliErrors[_0x16a1af(0xfa)](_0x16a1af(0x100)+SKILL_FILE+_0x16a1af(0xff));return _0x2a9814;}function parseFrontmatterObject(_0x437420){const _0x41a089=a156_0x13d7;try{const _0x1c899d=a156_0x227a2f(_0x437420);return _0x1c899d&&typeof _0x1c899d===_0x41a089(0xfb)&&!Array[_0x41a089(0xd5)](_0x1c899d)?_0x1c899d:undefined;}catch{return undefined;}}function scalarToString(_0x2bf487){const _0x558d28=a156_0x13d7;if(typeof _0x2bf487===_0x558d28(0xd6))return _0x2bf487[_0x558d28(0xe7)]();if(typeof _0x2bf487==='number'||typeof _0x2bf487==='boolean')return String(_0x2bf487);return undefined;}function resolvePushDirectoryRoot(_0x38dac7){const _0x3a0bff=a156_0x13d7,_0x20955f=resolve(_0x38dac7);if(!existsSync(_0x20955f))throw CliErrors['validation'](_0x3a0bff(0xeb)+_0x38dac7);const _0x3f4fa5=lstatSync(_0x20955f);if(_0x3f4fa5[_0x3a0bff(0xe0)]())return _0x20955f;if(_0x3f4fa5[_0x3a0bff(0xc9)]()){const _0x432e6f=realpathSync(_0x20955f);if(lstatSync(_0x432e6f)[_0x3a0bff(0xe0)]())return _0x432e6f;}throw CliErrors[_0x3a0bff(0xfa)](_0x3a0bff(0xeb)+_0x38dac7);}function requireRemoteScope(_0x212d7c){const _0x5b6b5c=a156_0x13d7;if(_0x212d7c[_0x5b6b5c(0xdf)]===_0x5b6b5c(0xe1)||_0x212d7c[_0x5b6b5c(0xdf)]===_0x5b6b5c(0x108)||_0x212d7c['scope']===_0x5b6b5c(0xec))return _0x212d7c[_0x5b6b5c(0xdf)];throw CliErrors['validation'](_0x5b6b5c(0xd4)+(_0x212d7c['skillCode']||_0x5b6b5c(0xd2))+_0x5b6b5c(0xd8)+(_0x212d7c[_0x5b6b5c(0xdf)]??_0x5b6b5c(0xd1))+'\x22.');}function readLocalSkillContent(_0x4e394a){const _0x635a4d=resolve(_0x4e394a,SKILL_FILE);return existsSync(_0x635a4d)&&lstatSync(_0x635a4d)['isFile']()?readFileSync(_0x635a4d,'utf8'):'';}function readPushMetadataIfPresent(_0x32b6cc,_0x406a72={}){const _0x1cb283=a156_0x13d7;try{return readMetadataIfPresent(_0x32b6cc);}catch(_0x149fdb){if(_0x406a72[_0x1cb283(0xfe)])return undefined;throw _0x149fdb;}}
|
|
1
|
+
(function(_0xf09fa5,_0x199e55){const _0x39e474=a159_0x3db2,_0x3d83cf=_0xf09fa5();while(!![]){try{const _0x347f1f=parseInt(_0x39e474(0x1df))/0x1*(parseInt(_0x39e474(0x1da))/0x2)+-parseInt(_0x39e474(0x1c4))/0x3*(parseInt(_0x39e474(0x1d0))/0x4)+-parseInt(_0x39e474(0x1d3))/0x5+parseInt(_0x39e474(0x1d6))/0x6+-parseInt(_0x39e474(0x1bf))/0x7+parseInt(_0x39e474(0x1b4))/0x8+parseInt(_0x39e474(0x1a6))/0x9*(parseInt(_0x39e474(0x1e1))/0xa);if(_0x347f1f===_0x199e55)break;else _0x3d83cf['push'](_0x3d83cf['shift']());}catch(_0x5b809a){_0x3d83cf['push'](_0x3d83cf['shift']());}}}(a159_0x5987,0xc4596));import{existsSync,lstatSync,readFileSync,realpathSync}from'node:fs';import{basename,resolve}from'node:path';import{parse as a159_0x5b8564}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';function a159_0x5987(){const _0x59dad8=['Skill\x20directory\x20not\x20found:\x20','\x20has\x20scope=\x22','skillCode','Only\x20personal\x20Skills\x20can\x20be\x20pushed;\x20','scope','skillName','pushedAt','32lacHIL','content','\x20has\x20unsupported\x20scope\x20\x22','1478500hBkxZF','version','trim','1558224XZLtfx','startsWith','isFile','ignoreMetadataSkillCode','15362sakjZj','boolean','dir','object','displayName','209YZahRE','personal','627130cmbFXE','some','\x20to\x20submit\x20company\x20Skills\x20for\x20review.','(unknown)','Remote\x20Skill\x20','toLowerCase','153HwPArg','number','\x22\x20does\x20not\x20match\x20current\x20appCode\x20\x22','sourceSessionId','company','excludedFilePaths','metadata','Use\x20lovrabet\x20skill\x20push\x20--scope\x20company\x20--dir\x20','targetScope','utf8','\x20name\x20for\x20SkillHub\x20slug\x20generation.','replace','validation','string','7782728jXEBaT','ignoreMetadataForPayload','isSymbolicLink','manifest','refreshedAt','example','tags','appCode','allowAppCodeRetarget','Invalid\x20','ignoreMetadataScope','8784727iUpzUC','Missing\x20','name','find','description','580908nZGwoI','files','ignoreInvalidMetadata','match','path'];a159_0x5987=function(){return _0x59dad8;};return a159_0x5987();}export function resolvePushDirectoryIdentity(_0x53892a,_0x33d234,_0x246664={}){const _0x1bc9ed=a159_0x3db2,_0x1d5303=resolvePushDirectoryRoot(_0x53892a),_0x5bca6d=readPushMetadataIfPresent(resolve(_0x1d5303,METADATA_FILE),{'ignoreInvalidMetadata':_0x246664[_0x1bc9ed(0x1c6)]});if(_0x5bca6d?.[_0x1bc9ed(0x1bb)]&&_0x5bca6d[_0x1bc9ed(0x1bb)]!==_0x33d234&&!_0x246664[_0x1bc9ed(0x1bc)]&&!_0x246664['ignoreMetadataAppCodeMismatch'])throw CliErrors['validation']('Skill\x20metadata\x20appCode\x20\x22'+_0x5bca6d[_0x1bc9ed(0x1bb)]+_0x1bc9ed(0x1a8)+_0x33d234+'\x22.');const _0x445e2b=resolvePushSkillCode(_0x1d5303,_0x33d234,_0x5bca6d,_0x246664);if(!_0x445e2b)throw CliErrors[_0x1bc9ed(0x1b2)]('Unable\x20to\x20resolve\x20skillCode\x20from\x20'+SKILL_FILE+',\x20'+METADATA_FILE+',\x20or\x20directory\x20name.');return{'dir':_0x1d5303,'skillCode':_0x445e2b,'metadata':_0x5bca6d};}export function readPushDirectory(_0xed1380,_0xb3af8d,_0x1ea1e2={}){const _0x3f27b1=a159_0x3db2,_0x3b3186=resolvePushDirectoryIdentity(_0xed1380,_0xb3af8d,_0x1ea1e2),_0x391109=_0x3b3186[_0x3f27b1(0x1dc)],_0x5c6a63=resolve(_0x391109,SKILL_FILE);if(!existsSync(_0x5c6a63)||!lstatSync(_0x5c6a63)[_0x3f27b1(0x1d8)]())throw CliErrors[_0x3f27b1(0x1b2)](_0x3f27b1(0x1c0)+SKILL_FILE+':\x20'+_0x5c6a63);const _0x426e80=_0x3b3186[_0x3f27b1(0x1ac)],_0x836e36=_0x1ea1e2[_0x3f27b1(0x1ae)]??_0x3f27b1(0x1e0);if(!_0x1ea1e2[_0x3f27b1(0x1be)]&&_0x426e80?.[_0x3f27b1(0x1cd)]==='builtin')throw CliErrors['validation']('Builtin\x20Skills\x20cannot\x20be\x20pushed;\x20'+METADATA_FILE+_0x3f27b1(0x1ca)+_0x426e80[_0x3f27b1(0x1cd)]+'\x22.');if(!_0x1ea1e2[_0x3f27b1(0x1be)]&&_0x836e36==='personal'&&_0x426e80?.['scope']&&_0x426e80[_0x3f27b1(0x1cd)]!==_0x3f27b1(0x1e0))throw CliErrors[_0x3f27b1(0x1b2)](_0x3f27b1(0x1cc)+METADATA_FILE+_0x3f27b1(0x1ca)+_0x426e80['scope']+'\x22.',_0x3f27b1(0x1ad)+_0x391109+_0x3f27b1(0x1e3));const _0x548df3=scanSkillDirectory(_0x391109,{'excludedFilePaths':_0x1ea1e2[_0x3f27b1(0x1ab)]}),_0x43d6c1=buildSkillPackage(_0x548df3),_0x8b54b9=readFileSync(_0x5c6a63,'utf8'),_0x16ba01=_0x3b3186[_0x3f27b1(0x1cb)],_0x498d52=_0x1ea1e2[_0x3f27b1(0x1b5)]?undefined:_0x426e80,_0x514a34=readSkillDisplayName(_0x8b54b9);return{'skillCode':_0x16ba01,'metadata':_0x426e80,'frontmatterDisplayName':_0x514a34,'input':{'skillCode':_0x16ba01,'skillName':_0x514a34??_0x498d52?.[_0x3f27b1(0x1ce)],'description':_0x498d52?.['description'],'content':_0x8b54b9,'files':_0x43d6c1[_0x3f27b1(0x1b7)],'packageBase64':_0x43d6c1['packageBase64'],'tags':_0x498d52?.[_0x3f27b1(0x1ba)],'version':_0x498d52?.[_0x3f27b1(0x1d4)],'sourceSessionId':_0x498d52?.['sourceSessionId']}};}export function refreshPushDirectoryMetadataFromRemote(_0x1b362d,_0x500e02,_0xf3954a,_0x126f50={}){const _0x976c2c=a159_0x3db2,_0x1c8065=resolvePushDirectoryRoot(_0x1b362d),_0x42d6b8=readPushMetadataIfPresent(resolve(_0x1c8065,METADATA_FILE),{'ignoreInvalidMetadata':!![]}),_0x429122=requireRemoteScope(_0x500e02),_0x4fc4fb=readLocalSkillContent(_0x1c8065),_0x1124e2={..._0x500e02,'appCode':_0x500e02[_0x976c2c(0x1bb)]??_0xf3954a,'skillName':_0x500e02[_0x976c2c(0x1ce)]??_0x42d6b8?.[_0x976c2c(0x1ce)],'description':_0x500e02[_0x976c2c(0x1c3)]??_0x42d6b8?.[_0x976c2c(0x1c3)],'example':_0x500e02[_0x976c2c(0x1b9)]??_0x42d6b8?.['example'],'tags':Array['isArray'](_0x500e02[_0x976c2c(0x1ba)])?_0x500e02[_0x976c2c(0x1ba)]:_0x42d6b8?.[_0x976c2c(0x1ba)],'sourceSessionId':_0x500e02[_0x976c2c(0x1a9)]??_0x42d6b8?.[_0x976c2c(0x1a9)],'content':_0x500e02[_0x976c2c(0x1d1)]??_0x4fc4fb},_0x4cd892=buildMetadata(_0x1124e2,_0x429122,_0xf3954a,contentHash(_0x4fc4fb),_0x126f50[_0x976c2c(0x1b8)]);writeJsonAtomic(resolve(_0x1c8065,METADATA_FILE),_0x4cd892);}export function recordPushedRuntimeSkill(_0x21d929,_0x5adea4,_0x381681,_0x2088c1={}){const _0x11d677=a159_0x3db2,_0x533e84=resolvePushDirectoryRoot(_0x21d929),_0x52695d=scanSkillDirectory(_0x533e84),_0x4807be=_0x52695d[_0x11d677(0x1c2)](_0x4fe4c6=>_0x4fe4c6['path']===SKILL_FILE),_0x4d5667=_0x4807be?fileText(_0x4807be):'',_0x43a7ba=tryNormalizePackageManifest(_0x5adea4['files']),_0x154136={..._0x5adea4,'content':_0x5adea4['content']??_0x4d5667,'files':_0x43a7ba},_0x579848=_0x43a7ba?normalizeLocalFiles(_0x52695d)['filter'](_0x2dda08=>_0x43a7ba[_0x11d677(0x1c5)][_0x11d677(0x1e2)](_0x3b050a=>_0x3b050a['path']===_0x2dda08[_0x11d677(0x1c8)])):undefined,_0x4e1e09=buildMetadata(_0x154136,_0x2088c1[_0x11d677(0x1cd)]??_0x11d677(0x1e0),_0x381681,contentHash(_0x154136[_0x11d677(0x1d1)]??''),_0x2088c1[_0x11d677(0x1cf)],_0x579848);writeJsonAtomic(resolve(_0x533e84,METADATA_FILE),_0x4e1e09);}export function deriveSkillCodeFromDirectory(_0x4170b3,_0x35fb81){const _0x3d2cc6=a159_0x3db2,_0x80697d=basename(resolve(_0x4170b3)),_0x47fedb=_0x35fb81+'--';return _0x80697d[_0x3d2cc6(0x1d7)](_0x47fedb)?_0x80697d['slice'](_0x47fedb['length']):_0x80697d;}function resolvePushSkillCode(_0x4b6a4a,_0x47a9dc,_0x4185a1,_0x9ace86){const _0x28b588=a159_0x3db2,_0x46ec99=deriveSkillCodeFromSkillFile(_0x4b6a4a)||deriveSkillCodeFromDirectory(_0x4b6a4a,_0x47a9dc);if(_0x9ace86[_0x28b588(0x1d9)])return _0x46ec99;return _0x4185a1?.[_0x28b588(0x1cb)]?.[_0x28b588(0x1d5)]()||_0x46ec99;}function deriveSkillCodeFromSkillFile(_0x607a4c){const _0x35134d=a159_0x3db2,_0xca3e9b=resolve(_0x607a4c,SKILL_FILE);if(!existsSync(_0xca3e9b)||!lstatSync(_0xca3e9b)[_0x35134d(0x1d8)]())return undefined;const _0x1856ed=readFileSync(_0xca3e9b,_0x35134d(0x1af)),_0x5f270c=_0x1856ed[_0x35134d(0x1c7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x5f270c)return undefined;const _0x4d256b=parseFrontmatterObject(_0x5f270c[0x1]??''),_0x10969f=scalarToString(_0x4d256b?.[_0x35134d(0x1c1)]);return _0x10969f?slugifySkillName(_0x10969f):undefined;}function readSkillDisplayName(_0x1f62a4){const _0x36aa0e=a159_0x3db2,_0x459253=_0x1f62a4[_0x36aa0e(0x1c7)](/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);if(!_0x459253)return undefined;const _0x2a097f=parseFrontmatterObject(_0x459253[0x1]??'');return scalarToString(_0x2a097f?.[_0x36aa0e(0x1de)]);}function slugifySkillName(_0x2ad0f7){const _0x14147b=a159_0x3db2,_0x409fa4=_0x2ad0f7['trim']()[_0x14147b(0x1a5)]()['replace'](/[^\p{L}\p{N}\p{So}]+/gu,'-')[_0x14147b(0x1b1)](/^-+/,'')[_0x14147b(0x1b1)](/-+$/,'')[_0x14147b(0x1b1)](/-{2,}/g,'-');if(!_0x409fa4)throw CliErrors[_0x14147b(0x1b2)](_0x14147b(0x1bd)+SKILL_FILE+_0x14147b(0x1b0));return _0x409fa4;}function a159_0x3db2(_0x46a313,_0x25d0da){_0x46a313=_0x46a313-0x1a4;const _0x59875b=a159_0x5987();let _0x3db241=_0x59875b[_0x46a313];return _0x3db241;}function parseFrontmatterObject(_0x84817f){const _0x2beec5=a159_0x3db2;try{const _0x43e041=a159_0x5b8564(_0x84817f);return _0x43e041&&typeof _0x43e041===_0x2beec5(0x1dd)&&!Array['isArray'](_0x43e041)?_0x43e041:undefined;}catch{return undefined;}}function scalarToString(_0x200919){const _0x4246a6=a159_0x3db2;if(typeof _0x200919===_0x4246a6(0x1b3))return _0x200919[_0x4246a6(0x1d5)]();if(typeof _0x200919===_0x4246a6(0x1a7)||typeof _0x200919===_0x4246a6(0x1db))return String(_0x200919);return undefined;}function resolvePushDirectoryRoot(_0x3d22b2){const _0xec9085=a159_0x3db2,_0x474eab=resolve(_0x3d22b2);if(!existsSync(_0x474eab))throw CliErrors['validation'](_0xec9085(0x1c9)+_0x3d22b2);const _0x2d6dfc=lstatSync(_0x474eab);if(_0x2d6dfc['isDirectory']())return _0x474eab;if(_0x2d6dfc[_0xec9085(0x1b6)]()){const _0x5b9b93=realpathSync(_0x474eab);if(lstatSync(_0x5b9b93)['isDirectory']())return _0x5b9b93;}throw CliErrors[_0xec9085(0x1b2)](_0xec9085(0x1c9)+_0x3d22b2);}function requireRemoteScope(_0x428d0e){const _0x18ded4=a159_0x3db2;if(_0x428d0e[_0x18ded4(0x1cd)]===_0x18ded4(0x1e0)||_0x428d0e['scope']===_0x18ded4(0x1aa)||_0x428d0e['scope']==='builtin')return _0x428d0e[_0x18ded4(0x1cd)];throw CliErrors[_0x18ded4(0x1b2)](_0x18ded4(0x1a4)+(_0x428d0e[_0x18ded4(0x1cb)]||_0x18ded4(0x1e4))+_0x18ded4(0x1d2)+(_0x428d0e['scope']??'unknown')+'\x22.');}function readLocalSkillContent(_0x3428eb){const _0x6e12d8=a159_0x3db2,_0x2f07f5=resolve(_0x3428eb,SKILL_FILE);return existsSync(_0x2f07f5)&&lstatSync(_0x2f07f5)[_0x6e12d8(0x1d8)]()?readFileSync(_0x2f07f5,_0x6e12d8(0x1af)):'';}function readPushMetadataIfPresent(_0x1975e0,_0x3f3f50={}){const _0x5dce54=a159_0x3db2;try{return readMetadataIfPresent(_0x1975e0);}catch(_0x12db9f){if(_0x3f3f50[_0x5dce54(0x1c6)])return undefined;throw _0x12db9f;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd7b33b,_0x43175c){const _0x22be37=a160_0x24b0,_0x5f5ce2=_0xd7b33b();while(!![]){try{const _0x1a5ffc=-parseInt(_0x22be37(0x168))/0x1*(-parseInt(_0x22be37(0x171))/0x2)+parseInt(_0x22be37(0x170))/0x3+-parseInt(_0x22be37(0x16a))/0x4*(-parseInt(_0x22be37(0x163))/0x5)+parseInt(_0x22be37(0x167))/0x6+parseInt(_0x22be37(0x166))/0x7+-parseInt(_0x22be37(0x16b))/0x8+-parseInt(_0x22be37(0x172))/0x9*(parseInt(_0x22be37(0x164))/0xa);if(_0x1a5ffc===_0x43175c)break;else _0x5f5ce2['push'](_0x5f5ce2['shift']());}catch(_0x44aec1){_0x5f5ce2['push'](_0x5f5ce2['shift']());}}}(a160_0x5880,0x686ec));import{CliErrors}from'../../errors.js';export function normalizeRuntimeSkillScopes(_0x50039c){const _0x3494cf=a160_0x24b0,_0x3096f2=_0x50039c&&_0x50039c[_0x3494cf(0x16f)]>0x0?_0x50039c:[_0x3494cf(0x165),_0x3494cf(0x16d),_0x3494cf(0x16c)],_0x4a1123=[];for(const _0x2a61a5 of _0x3096f2){if(!isRuntimeSkillScope(_0x2a61a5))throw CliErrors[_0x3494cf(0x169)]('Unsupported\x20runtime\x20Skill\x20scope:\x20'+_0x2a61a5);!_0x4a1123[_0x3494cf(0x16e)](_0x2a61a5)&&_0x4a1123['push'](_0x2a61a5);}return _0x4a1123;}function a160_0x24b0(_0x48d11d,_0x311627){_0x48d11d=_0x48d11d-0x163;const _0x58808d=a160_0x5880();let _0x24b09a=_0x58808d[_0x48d11d];return _0x24b09a;}function a160_0x5880(){const _0x1b3400=['includes','length','709812rzCSMj','41156dSkLtA','4541157YRrFRh','1608665HDtdNP','20tbXawj','personal','5511709DjLRGt','362724bXmWzf','10RUhzDC','validation','4YSoXxX','1400448tCxWzJ','builtin','company'];a160_0x5880=function(){return _0x1b3400;};return a160_0x5880();}export function isRuntimeSkillScope(_0x2bc18b){const _0x4adcaf=a160_0x24b0;return _0x2bc18b==='personal'||_0x2bc18b==='company'||_0x2bc18b===_0x4adcaf(0x16c);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a162_0x463c24=a162_0x25e6;(function(_0x2b3c5d,_0x4b608d){const _0x1b80ff=a162_0x25e6,_0x2a4f0c=_0x2b3c5d();while(!![]){try{const _0x2eae3f=-parseInt(_0x1b80ff(0x18e))/0x1+parseInt(_0x1b80ff(0x197))/0x2+parseInt(_0x1b80ff(0x186))/0x3+parseInt(_0x1b80ff(0x196))/0x4*(-parseInt(_0x1b80ff(0x18c))/0x5)+parseInt(_0x1b80ff(0x192))/0x6*(parseInt(_0x1b80ff(0x18d))/0x7)+-parseInt(_0x1b80ff(0x18a))/0x8+-parseInt(_0x1b80ff(0x18b))/0x9*(-parseInt(_0x1b80ff(0x198))/0xa);if(_0x2eae3f===_0x4b608d)break;else _0x2a4f0c['push'](_0x2a4f0c['shift']());}catch(_0x5a7d0b){_0x2a4f0c['push'](_0x2a4f0c['shift']());}}}(a162_0x5c7d,0xb156e));import{unzipSync,zipSync}from'fflate';import{CliErrors}from'../../errors.js';function a162_0x5c7d(){const _0x297d7e=['endsWith','380056xjshzQ','991197REjyIV','5lCZScG','2544801LZFASd','460414mmwOoA','Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.','validation','length','18YTYBNJ','object','1980-01-01T00:00:00.000Z','validation_error','5024444TVJbLF','7420hwSDGN','30YaYlRi','entries','map','3197028rFbpyc','from','code'];a162_0x5c7d=function(){return _0x297d7e;};return a162_0x5c7d();}import{compareSkillFiles,fileContent,normalizeLocalFiles,normalizeSkillRelativePath}from'./local-files.js';const ZIP_MTIME=new Date(a162_0x463c24(0x194));export function createDeterministicZipPackage(_0x27969f){const _0x3677c5=a162_0x463c24,_0xdc4511={};for(const _0x5a945c of normalizeLocalFiles(_0x27969f)){_0xdc4511[_0x5a945c['path']]=fileContent(_0x5a945c);}return Buffer[_0x3677c5(0x187)](zipSync(_0xdc4511,{'level':0x0,'mtime':ZIP_MTIME}));}function a162_0x25e6(_0x2681c7,_0x17d8dc){_0x2681c7=_0x2681c7-0x186;const _0x5c7d0d=a162_0x5c7d();let _0x25e617=_0x5c7d0d[_0x2681c7];return _0x25e617;}export function parseZipPackage(_0x4ef5f7){const _0x37cf37=a162_0x463c24;if(_0x4ef5f7[_0x37cf37(0x191)]<0x16)throw CliErrors[_0x37cf37(0x190)]('Runtime\x20Skill\x20package\x20is\x20not\x20a\x20valid\x20zip\x20file.');let _0x3fec61;try{_0x3fec61=unzipSync(_0x4ef5f7,{'filter'(_0x55fdb3){const _0x4f673f=_0x37cf37,_0x2d22df=normalizeSkillRelativePath(_0x55fdb3['name']);if(_0x2d22df[_0x4f673f(0x189)]('/'))throw CliErrors[_0x4f673f(0x190)]('Runtime\x20Skill\x20package\x20contains\x20directory\x20entry:\x20'+_0x2d22df);return!![];}});}catch(_0x349ec5){if(isRuntimeSkillValidationError(_0x349ec5))throw _0x349ec5;throw CliErrors[_0x37cf37(0x190)](_0x37cf37(0x18f));}return Object[_0x37cf37(0x199)](_0x3fec61)[_0x37cf37(0x19a)](([_0x1f3d6d,_0x4d29f2])=>({'path':normalizeSkillRelativePath(_0x1f3d6d),'bytes':Buffer['from'](_0x4d29f2)}))['sort'](compareSkillFiles);}function isRuntimeSkillValidationError(_0x4f43b6){const _0x1d3e30=a162_0x463c24;return typeof _0x4f43b6===_0x1d3e30(0x193)&&_0x4f43b6!==null&&_0x1d3e30(0x188)in _0x4f43b6&&_0x4f43b6[_0x1d3e30(0x188)]===_0x1d3e30(0x195);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a276e,_0x54b010){const _0x33ca2d=a163_0x92f4,_0x56eb1d=_0x2a276e();while(!![]){try{const _0x58e020=-parseInt(_0x33ca2d(0xc8))/0x1*(parseInt(_0x33ca2d(0xd1))/0x2)+parseInt(_0x33ca2d(0xda))/0x3+parseInt(_0x33ca2d(0xd8))/0x4*(-parseInt(_0x33ca2d(0xb5))/0x5)+parseInt(_0x33ca2d(0xca))/0x6+-parseInt(_0x33ca2d(0xc2))/0x7*(-parseInt(_0x33ca2d(0xd2))/0x8)+-parseInt(_0x33ca2d(0xdb))/0x9+-parseInt(_0x33ca2d(0xcc))/0xa*(-parseInt(_0x33ca2d(0xcd))/0xb);if(_0x58e020===_0x54b010)break;else _0x56eb1d['push'](_0x56eb1d['shift']());}catch(_0x34918f){_0x56eb1d['push'](_0x56eb1d['shift']());}}}(a163_0x4cf4,0x8a81b));import{CliErrors}from'../../errors.js';import{SKILL_FILE}from'./constants.js';function a163_0x4cf4(){const _0x5e4ecf=['Runtime\x20Skill\x20package\x20file\x20size\x20mismatch:\x20','10232kVwFPB','has','414318jVuInX','7020999pfAWKt','sha256','trim','base64','Runtime\x20Skill\x20package\x20size\x20is\x20invalid.','Runtime\x20Skill\x20package\x20entry\x20list\x20mismatch.','bytes','Missing\x20','requireOssPath','files','1305JzeLQs','isArray','Runtime\x20Skill\x20package\x20size\x20mismatch.','schemaVersion','size','object','ossPath','length','\x20in\x20Skill\x20file\x20package.','Runtime\x20Skill\x20package\x20file\x20sha256\x20mismatch:\x20','map','isSafeInteger','zipSize','91SQTBhh','path','some','Runtime\x20Skill\x20package\x20sha256\x20mismatch.','Runtime\x20Skill\x20package\x20is\x20missing\x20','toLowerCase','54446vWNdCX','set','37320watYkn','Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.','820SWRLll','188881TjKYJo','treeSha256','Runtime\x20Skill\x20manifest\x20is\x20missing\x20','Runtime\x20Skill\x20package\x20sha256\x20is\x20invalid.','24CHjATd','686816AUBdTC','Runtime\x20Skill\x20file\x20tree\x20sha256\x20mismatch.','zipSha256','validation','toString'];a163_0x4cf4=function(){return _0x5e4ecf;};return a163_0x4cf4();}import{bufferSha256,fileHash,fileTreeHash}from'./hashing.js';import{fileContent,isSha256Hex,normalizeLocalFiles,normalizeManifestFiles}from'./local-files.js';function a163_0x92f4(_0x271115,_0x5d8afa){_0x271115=_0x271115-0xad;const _0x4cf48b=a163_0x4cf4();let _0x92f441=_0x4cf48b[_0x271115];return _0x92f441;}import{createDeterministicZipPackage,parseZipPackage}from'./zip-codec.js';export function buildSkillPackage(_0x56b264){const _0x1673be=a163_0x92f4,_0x869f93=normalizeLocalFiles(_0x56b264);if(!_0x869f93[_0x1673be(0xc4)](_0x20e608=>_0x20e608['path']===SKILL_FILE))throw CliErrors[_0x1673be(0xd5)](_0x1673be(0xb2)+SKILL_FILE+_0x1673be(0xbd));const _0x9c2458=localFilesToManifestFiles(_0x869f93),_0x1e9ab6=createDeterministicZipPackage(_0x869f93);return{'manifest':{'schemaVersion':0x2,'treeSha256':fileTreeHash(_0x9c2458),'zipSha256':bufferSha256(_0x1e9ab6),'zipSize':_0x1e9ab6[_0x1673be(0xbc)],'files':_0x9c2458},'packageBytes':_0x1e9ab6,'packageBase64':_0x1e9ab6[_0x1673be(0xd6)](_0x1673be(0xae))};}export function verifyRuntimeSkillPackage(_0x3d4ce8,_0xfc1fc0){const _0x417432=a163_0x92f4,_0x3656ac=normalizePackageManifest(_0x3d4ce8,{'requireOssPath':![]});if(!_0x3656ac)throw CliErrors[_0x417432(0xd5)]('Runtime\x20Skill\x20package\x20manifest\x20is\x20missing.');return extractAndVerifyPackage(_0x3656ac,_0xfc1fc0);}export function verifyRuntimeSkillBundle(_0x1a1569,_0x3c4ac6){const _0x19b83c=a163_0x92f4,_0x429e3c=normalizePackageManifest(_0x1a1569,{'requireOssPath':![]});if(!_0x429e3c)throw CliErrors[_0x19b83c(0xd5)](_0x19b83c(0xcb));return extractAndVerifyPackageFiles(_0x429e3c,_0x3c4ac6);}export function tryNormalizePackageManifest(_0xecb9d6){return normalizePackageManifest(_0xecb9d6,{'requireOssPath':![]});}export function requirePackageBytes(_0x2ee477,_0x4b342c){const _0x4b3367=a163_0x92f4;if(!_0x4b342c||_0x4b342c[_0x4b3367(0xbc)]===0x0)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20required\x20for\x20Skill\x20install:\x20'+_0x2ee477);return _0x4b342c;}export function extractDownloadedPackage(_0x3073aa){const _0x123413=a163_0x92f4,_0x348166=parseZipPackage(_0x3073aa)[_0x123413(0xbf)](_0x139755=>({'path':_0x139755[_0x123413(0xc3)],'bytes':_0x139755[_0x123413(0xb1)]}));if(!_0x348166[_0x123413(0xc4)](_0x4d4419=>_0x4d4419['path']===SKILL_FILE))throw CliErrors[_0x123413(0xd5)](_0x123413(0xc6)+SKILL_FILE+'.');return normalizeLocalFiles(_0x348166);}export function localFilesToManifestFiles(_0x6900c6){const _0x4b874d=a163_0x92f4;return normalizeLocalFiles(_0x6900c6)[_0x4b874d(0xbf)](_0x12f00a=>({'path':_0x12f00a['path'],'sha256':fileHash(_0x12f00a),'size':fileContent(_0x12f00a)[_0x4b874d(0xbc)]}));}function normalizePackageManifest(_0x1a2ade,_0x1982c7){const _0x6e6005=a163_0x92f4;if(!_0x1a2ade||typeof _0x1a2ade!==_0x6e6005(0xba)||Array[_0x6e6005(0xb6)](_0x1a2ade))return undefined;const _0x2ded30=_0x1a2ade,_0x5c945c=typeof _0x2ded30['ossPath']==='string'?_0x2ded30[_0x6e6005(0xbb)][_0x6e6005(0xad)]():undefined;if(_0x1982c7[_0x6e6005(0xb3)]&&!_0x5c945c)return undefined;if(!Array[_0x6e6005(0xb6)](_0x2ded30[_0x6e6005(0xb4)])||_0x2ded30[_0x6e6005(0xb4)][_0x6e6005(0xbc)]===0x0)return undefined;if(!isSha256Hex(_0x2ded30[_0x6e6005(0xce)]))throw CliErrors[_0x6e6005(0xd5)]('Runtime\x20Skill\x20file\x20tree\x20sha256\x20is\x20invalid.');if(!isSha256Hex(_0x2ded30[_0x6e6005(0xd4)]))throw CliErrors['validation'](_0x6e6005(0xd0));if(!Number[_0x6e6005(0xc0)](_0x2ded30['zipSize'])||_0x2ded30[_0x6e6005(0xc1)]<0x0)throw CliErrors['validation'](_0x6e6005(0xaf));const _0x13ddc3=normalizeManifestFiles(_0x2ded30['files']);if(!_0x13ddc3[_0x6e6005(0xc4)](_0xd2273b=>_0xd2273b[_0x6e6005(0xc3)]===SKILL_FILE))throw CliErrors[_0x6e6005(0xd5)](_0x6e6005(0xcf)+SKILL_FILE+'.');const _0xe9cdef=fileTreeHash(_0x13ddc3);if(_0xe9cdef!==_0x2ded30[_0x6e6005(0xce)][_0x6e6005(0xc7)]())throw CliErrors[_0x6e6005(0xd5)](_0x6e6005(0xd3));return{'schemaVersion':Number['isSafeInteger'](_0x2ded30[_0x6e6005(0xb8)])?_0x2ded30[_0x6e6005(0xb8)]:0x2,'ossPath':_0x5c945c,'treeSha256':_0xe9cdef,'zipSha256':_0x2ded30[_0x6e6005(0xd4)][_0x6e6005(0xc7)](),'zipSize':_0x2ded30[_0x6e6005(0xc1)],'files':_0x13ddc3};}function extractAndVerifyPackage(_0xa0bbb7,_0x1fa7bb){const _0x3766f1=a163_0x92f4,_0x2c5735=normalizePackageManifest(_0xa0bbb7,{'requireOssPath':![]});if(!_0x2c5735)throw CliErrors[_0x3766f1(0xd5)](_0x3766f1(0xcb));if(_0x1fa7bb[_0x3766f1(0xbc)]!==_0x2c5735['zipSize'])throw CliErrors['validation'](_0x3766f1(0xb7));const _0x344d64=bufferSha256(_0x1fa7bb);if(_0x344d64!==_0x2c5735['zipSha256'])throw CliErrors[_0x3766f1(0xd5)](_0x3766f1(0xc5));return extractAndVerifyPackageFiles(_0x2c5735,_0x1fa7bb);}function extractAndVerifyPackageFiles(_0x1bd752,_0x2f9a79){const _0x306a4c=a163_0x92f4,_0x341f4=parseZipPackage(_0x2f9a79);if(_0x341f4[_0x306a4c(0xbc)]!==_0x1bd752[_0x306a4c(0xb4)][_0x306a4c(0xbc)])throw CliErrors[_0x306a4c(0xd5)](_0x306a4c(0xb0));const _0x4593fe=new Map();for(const _0x254990 of _0x341f4){if(_0x4593fe[_0x306a4c(0xd9)](_0x254990['path']))throw CliErrors['validation']('Duplicate\x20Skill\x20package\x20entry:\x20'+_0x254990[_0x306a4c(0xc3)]);_0x4593fe[_0x306a4c(0xc9)](_0x254990[_0x306a4c(0xc3)],_0x254990);}const _0xd20238=[];for(const _0x971c87 of _0x1bd752[_0x306a4c(0xb4)]){const _0x3f4f77=_0x4593fe['get'](_0x971c87['path']);if(!_0x3f4f77)throw CliErrors['validation']('Runtime\x20Skill\x20package\x20is\x20missing\x20entry:\x20'+_0x971c87[_0x306a4c(0xc3)]);if(_0x3f4f77[_0x306a4c(0xb1)]['length']!==_0x971c87[_0x306a4c(0xb9)])throw CliErrors[_0x306a4c(0xd5)](_0x306a4c(0xd7)+_0x971c87[_0x306a4c(0xc3)]);const _0x1c12e8=bufferSha256(_0x3f4f77[_0x306a4c(0xb1)]);if(_0x1c12e8!==_0x971c87[_0x306a4c(0xdc)])throw CliErrors[_0x306a4c(0xd5)](_0x306a4c(0xbe)+_0x971c87['path']);_0xd20238['push']({'path':_0x971c87[_0x306a4c(0xc3)],'bytes':_0x3f4f77[_0x306a4c(0xb1)]});}return normalizeLocalFiles(_0xd20238);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3748d2,_0xf1ae7){var _0x22b5fe=a164_0x2650,_0x3b4487=_0x3748d2();while(!![]){try{var _0x215053=parseInt(_0x22b5fe(0xf9))/0x1*(-parseInt(_0x22b5fe(0xf8))/0x2)+-parseInt(_0x22b5fe(0x101))/0x3*(parseInt(_0x22b5fe(0xfc))/0x4)+-parseInt(_0x22b5fe(0xff))/0x5+parseInt(_0x22b5fe(0xfa))/0x6+-parseInt(_0x22b5fe(0xfe))/0x7*(-parseInt(_0x22b5fe(0xfb))/0x8)+parseInt(_0x22b5fe(0xfd))/0x9+-parseInt(_0x22b5fe(0x102))/0xa*(-parseInt(_0x22b5fe(0x100))/0xb);if(_0x215053===_0xf1ae7)break;else _0x3b4487['push'](_0x3b4487['shift']());}catch(_0x545f34){_0x3b4487['push'](_0x3b4487['shift']());}}}(a164_0xd877,0x760e4));export{contentHash,fileTreeHash}from'./runtime-skill-sync/hashing.js';export{linkEffectiveRuntimeSkills,linkGlobalRuntimeSkills,pruneStaleRuntimeSkillCache,pruneStaleRuntimeSkillLinks}from'./runtime-skill-sync/links.js';export{resolveRuntimeSkillInstallTarget}from'./runtime-skill-sync/install-target.js';export{listLocalRuntimeSkills}from'./runtime-skill-sync/list-local.js';function a164_0xd877(){var _0x5cf6b4=['673727BNFhtX','3469296aEJtJo','16OGEWoB','76XaJaTp','4885713wefCLZ','1147986xXruwE','1665285NLNVwa','151228Pddhuq','80313ZGjbyZ','400IFxaQo','2kRAYsV'];a164_0xd877=function(){return _0x5cf6b4;};return a164_0xd877();}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';function a164_0x2650(_0xcc471,_0x5dc5bd){_0xcc471=_0xcc471-0xf8;var _0xd87785=a164_0xd877();var _0x265089=_0xd87785[_0xcc471];return _0x265089;}export{deriveSkillCodeFromDirectory,readPushDirectory,refreshPushDirectoryMetadataFromRemote,recordPushedRuntimeSkill,resolvePushDirectoryIdentity}from'./runtime-skill-sync/push.js';export{buildSkillPackage,verifyRuntimeSkillBundle,verifyRuntimeSkillPackage}from'./runtime-skill-sync/zip-package.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a165_0x3b040c=a165_0x2c31;(function(_0x401556,_0x59a841){const _0x202f9a=a165_0x2c31,_0x15fb11=_0x401556();while(!![]){try{const _0x426ed6=-parseInt(_0x202f9a(0x1d2))/0x1+parseInt(_0x202f9a(0x1c6))/0x2+parseInt(_0x202f9a(0x1c9))/0x3*(parseInt(_0x202f9a(0x1c0))/0x4)+-parseInt(_0x202f9a(0x1cc))/0x5*(parseInt(_0x202f9a(0x1d8))/0x6)+-parseInt(_0x202f9a(0x1c4))/0x7+-parseInt(_0x202f9a(0x1c1))/0x8*(parseInt(_0x202f9a(0x1c5))/0x9)+parseInt(_0x202f9a(0x1d6))/0xa;if(_0x426ed6===_0x59a841)break;else _0x15fb11['push'](_0x15fb11['shift']());}catch(_0x2d7e42){_0x15fb11['push'](_0x15fb11['shift']());}}}(a165_0x1a0b,0x55a4e));import{existsSync,readFileSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a165_0x3b040c(0x1ce),'.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join(a165_0x3b040c(0x1ce),a165_0x3b040c(0x1bc)),join(a165_0x3b040c(0x1c7),a165_0x3b040c(0x1bc))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0x2e8549,_0x2625fb){const _0x2882dd=a165_0x3b040c;if(!existsSync(_0x2e8549))return{'kind':'not-recorded'};let _0x40db25;try{_0x40db25=JSON[_0x2882dd(0x1bf)](readFileSync(_0x2e8549,_0x2882dd(0x1ca)));}catch(_0xe3de30){return{'kind':_0x2882dd(0x1c2),'reason':_0x2e8549+_0x2882dd(0x1db)+_0xe3de30[_0x2882dd(0x1cd)]};}const _0x5a93a4=_0x40db25;if(typeof _0x5a93a4?.[_0x2882dd(0x1da)]!==_0x2882dd(0x1d5)||!SUPPORTED_LOCK_VERSIONS[_0x2882dd(0x1d7)](_0x5a93a4[_0x2882dd(0x1da)]))return{'kind':'unusable','reason':_0x2e8549+_0x2882dd(0x1c8)+String(_0x5a93a4?.[_0x2882dd(0x1da)])};if(!_0x5a93a4[_0x2882dd(0x1bc)]||typeof _0x5a93a4[_0x2882dd(0x1bc)]!==_0x2882dd(0x1cf))return{'kind':_0x2882dd(0x1c2),'reason':_0x2e8549+_0x2882dd(0x1dc)};return _0x5a93a4[_0x2882dd(0x1bc)][_0x2625fb]?{'kind':_0x2882dd(0x1d9)}:{'kind':'not-recorded'};}export function resolveInstalledSkill(_0x243c59,_0x4d7dbc){const _0x27d0f0=a165_0x3b040c,_0x59763a=_0x4d7dbc?.[_0x27d0f0(0x1c3)]??homedir(),_0x39ad56=_0x4d7dbc?.[_0x27d0f0(0x1d1)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x27d0f0(0x1d0)](_0x28a46c=>join(_0x59763a,_0x28a46c)),_0x2bbe8f=_0x4d7dbc?.['lockFile']??join(_0x59763a,SKILL_LOCK_RELATIVE_PATH),_0x195f68=_0x39ad56[_0x27d0f0(0x1d0)](_0x5058f4=>join(_0x5058f4,_0x243c59,'SKILL.md')),_0x34925e=_0x195f68['find'](_0x3f17bc=>existsSync(_0x3f17bc));if(_0x34925e)return{'state':_0x27d0f0(0x1cb),'path':_0x34925e};const _0x25d2fb=readLockLookup(_0x2bbe8f,_0x243c59);if(_0x25d2fb[_0x27d0f0(0x1d3)]==='unusable')return{'state':'unverifiable','reason':_0x25d2fb[_0x27d0f0(0x1be)]};if(_0x25d2fb['kind']===_0x27d0f0(0x1d9))return{'state':_0x27d0f0(0x1bd),'reason':_0x2bbe8f+'\x20records\x20\x22'+_0x243c59+_0x27d0f0(0x1dd)+('('+_0x195f68['join'](',\x20')+')')};return{'state':_0x27d0f0(0x1d4),'checked':_0x195f68};}function a165_0x2c31(_0x5305bf,_0x2ebd0c){_0x5305bf=_0x5305bf-0x1bc;const _0x1a0b9d=a165_0x1a0b();let _0x2c31fe=_0x1a0b9d[_0x5305bf];return _0x2c31fe;}function a165_0x1a0b(){const _0xe349dc=['312018NrcTYC','.claude','\x20uses\x20unsupported\x20version\x20','54psZgSu','utf8','present','751190LqKAXT','message','.agents','object','map','globalSkillsDirs','85101GHMSZY','kind','absent','number','5831350edyTiO','includes','6DOwZVZ','recorded','version','\x20is\x20unreadable:\x20','\x20has\x20no\x20skills\x20map','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','skills','unverifiable','reason','parse','46532wFUuoU','3224ljmTTX','unusable','home','1625624QKPYXO','2907MZcueg'];a165_0x1a0b=function(){return _0xe349dc;};return a165_0x1a0b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a166_0x5507(){const _0x1c91ef=['2898YYARAE','repeat','527686YktwQs','12fwfPkZ','120JHcdyH','26525050nTECQe','4761144tzfNNW','accessKey','length','object','prototype','2821696BgnBay','11QfMteq','124988SjwPtD','call','223895dWubqi','apps','string','slice','2365NHQeaH','test','entries','<redacted>','hasOwnProperty','isArray'];a166_0x5507=function(){return _0x1c91ef;};return a166_0x5507();}const a166_0x3a319e=a166_0x2aa8;(function(_0x430cc1,_0x28729d){const _0x329a78=a166_0x2aa8,_0x53605f=_0x430cc1();while(!![]){try{const _0x38b5b2=-parseInt(_0x329a78(0x1b3))/0x1+-parseInt(_0x329a78(0x1a5))/0x2*(parseInt(_0x329a78(0x1b4))/0x3)+-parseInt(_0x329a78(0x1a3))/0x4+parseInt(_0x329a78(0x1ab))/0x5*(parseInt(_0x329a78(0x1b1))/0x6)+parseInt(_0x329a78(0x1a7))/0x7*(-parseInt(_0x329a78(0x1b5))/0x8)+-parseInt(_0x329a78(0x19e))/0x9+-parseInt(_0x329a78(0x1b6))/0xa*(-parseInt(_0x329a78(0x1a4))/0xb);if(_0x38b5b2===_0x28729d)break;else _0x53605f['push'](_0x53605f['shift']());}catch(_0x4c6cfb){_0x53605f['push'](_0x53605f['shift']());}}}(a166_0x5507,0x5efdf));const REDACTED_ACCESS_KEY=a166_0x3a319e(0x1ae);function a166_0x2aa8(_0xc190f0,_0xfb2964){_0xc190f0=_0xc190f0-0x19e;const _0x55076b=a166_0x5507();let _0x2aa8db=_0x55076b[_0xc190f0];return _0x2aa8db;}export function maskCliAccessKey(_0x39ab3a){const _0x1097ce=a166_0x3a319e;if(typeof _0x39ab3a!==_0x1097ce(0x1a9)||_0x39ab3a[_0x1097ce(0x1a0)]<=0x8)return REDACTED_ACCESS_KEY;return''+_0x39ab3a[_0x1097ce(0x1aa)](0x0,0x8)+'*'[_0x1097ce(0x1b2)](_0x39ab3a[_0x1097ce(0x1a0)]-0x8);}export function redactCliConfigCredentials(_0x3114a1){const _0x2ec034=a166_0x3a319e,_0x3644f3={..._0x3114a1};return Object[_0x2ec034(0x1a2)][_0x2ec034(0x1af)][_0x2ec034(0x1a6)](_0x3644f3,_0x2ec034(0x19f))&&(_0x3644f3[_0x2ec034(0x19f)]=maskCliAccessKey(_0x3644f3[_0x2ec034(0x19f)])),_0x3644f3['apps']&&typeof _0x3644f3['apps']===_0x2ec034(0x1a1)&&!Array[_0x2ec034(0x1b0)](_0x3644f3[_0x2ec034(0x1a8)])&&(_0x3644f3['apps']=redactLegacyAppCredentials(_0x3644f3['apps'])),_0x3644f3;}export function redactCliConfigValue(_0x4085ee,_0xdfdb50){const _0x8f7b96=a166_0x3a319e;if(_0x4085ee==='accessKey'||/^apps\.[^.]+\.accessKey$/[_0x8f7b96(0x1ac)](_0x4085ee))return maskCliAccessKey(_0xdfdb50);if(_0x4085ee===_0x8f7b96(0x1a8)&&_0xdfdb50&&typeof _0xdfdb50===_0x8f7b96(0x1a1)&&!Array[_0x8f7b96(0x1b0)](_0xdfdb50))return redactLegacyAppCredentials(_0xdfdb50);if(/^apps\.[^.]+$/[_0x8f7b96(0x1ac)](_0x4085ee)&&_0xdfdb50&&typeof _0xdfdb50===_0x8f7b96(0x1a1)&&!Array[_0x8f7b96(0x1b0)](_0xdfdb50)){const _0x5e7457=_0xdfdb50;return Object[_0x8f7b96(0x1a2)][_0x8f7b96(0x1af)][_0x8f7b96(0x1a6)](_0x5e7457,_0x8f7b96(0x19f))?{..._0x5e7457,'accessKey':maskCliAccessKey(_0x5e7457[_0x8f7b96(0x19f)])}:_0xdfdb50;}return _0xdfdb50;}function redactLegacyAppCredentials(_0x52997d){const _0x59444d=a166_0x3a319e;return Object['fromEntries'](Object[_0x59444d(0x1ad)](_0x52997d)['map'](([_0x104721,_0x6724be])=>{const _0x3143f2=_0x59444d;if(!_0x6724be||typeof _0x6724be!==_0x3143f2(0x1a1)||Array['isArray'](_0x6724be))return[_0x104721,_0x6724be];const _0x237730={..._0x6724be};return Object[_0x3143f2(0x1a2)][_0x3143f2(0x1af)][_0x3143f2(0x1a6)](_0x237730,'accessKey')&&(_0x237730[_0x3143f2(0x19f)]=maskCliAccessKey(_0x237730[_0x3143f2(0x19f)])),[_0x104721,_0x237730];}));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x26b8c5,_0xdda8f3){const _0x5888e5=a167_0xc340,_0x1c6190=_0x26b8c5();while(!![]){try{const _0xe867ed=-parseInt(_0x5888e5(0x178))/0x1*(-parseInt(_0x5888e5(0x171))/0x2)+parseInt(_0x5888e5(0x16e))/0x3+parseInt(_0x5888e5(0x170))/0x4*(parseInt(_0x5888e5(0x175))/0x5)+-parseInt(_0x5888e5(0x173))/0x6+parseInt(_0x5888e5(0x16f))/0x7*(-parseInt(_0x5888e5(0x177))/0x8)+-parseInt(_0x5888e5(0x172))/0x9*(-parseInt(_0x5888e5(0x174))/0xa)+-parseInt(_0x5888e5(0x176))/0xb;if(_0xe867ed===_0xdda8f3)break;else _0x1c6190['push'](_0x1c6190['shift']());}catch(_0x6f15a6){_0x1c6190['push'](_0x1c6190['shift']());}}}(a167_0x3d49,0xda8fa));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a167_0xc340(_0x419f78,_0x23e72c){_0x419f78=_0x419f78-0x16e;const _0x3d4944=a167_0x3d49();let _0xc34004=_0x3d4944[_0x419f78];return _0xc34004;}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});function a167_0x3d49(){const _0x9204eb=['245cqwHNw','9560628FUMYTL','4434984AaqVDp','13373dszDQZ','3040620ddQjmv','21uLbAgG','86512MEbyfK','4MXNHqT','27KsXTlI','1905204SrmDFP','5483230SxrvYY'];a167_0x3d49=function(){return _0x9204eb;};return a167_0x3d49();}
|